ce0.cpp Aggiunti messaggio d'errore
sesadump.cpp Messo a 0 il WPARAM di WM_WAKEUP git-svn-id: svn://10.65.10.50/trunk@5723 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
23f30ca09d
commit
29dc209df8
41
ce/ce0.cpp
41
ce/ce0.cpp
@ -1,9 +1,10 @@
|
|||||||
#include <windows.h>
|
#define STRICT
|
||||||
|
#define XVT_INCL_NATIVE
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <filetext.h>
|
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <relation.h>
|
#include <filetext.h>
|
||||||
#include <urldefid.h>
|
#include <isam.h>
|
||||||
|
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <anafis.h>
|
#include <anafis.h>
|
||||||
@ -11,11 +12,10 @@
|
|||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
#include <unloc.h>
|
#include <unloc.h>
|
||||||
|
|
||||||
class TSESA_anagr : public TApplication
|
class TSESA_anagr : public TSkeleton_application
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual bool menu(MENU_TAG mt);
|
virtual void main_loop();
|
||||||
virtual bool create();
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool is_sigla32() const;
|
bool is_sigla32() const;
|
||||||
@ -27,8 +27,7 @@ bool TSESA_anagr::is_sigla32() const
|
|||||||
{
|
{
|
||||||
char szBuffer[80];
|
char szBuffer[80];
|
||||||
GetPrivateProfileString("SIGLAPP",
|
GetPrivateProfileString("SIGLAPP",
|
||||||
"Driver32",
|
"Driver32", "", szBuffer, sizeof(szBuffer), "odbc.ini");
|
||||||
"", szBuffer, sizeof(szBuffer), "odbc.ini");
|
|
||||||
return *szBuffer != '\0';
|
return *szBuffer != '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,7 +64,7 @@ int TSESA_anagr::write(TLocalisamfile& file, bool re)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSESA_anagr::menu(MENU_TAG mt)
|
void TSESA_anagr::main_loop()
|
||||||
{
|
{
|
||||||
TFilename tmp; tmp.tempdir();
|
TFilename tmp; tmp.tempdir();
|
||||||
TString cmdline(80);
|
TString cmdline(80);
|
||||||
@ -78,7 +77,11 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
|||||||
TExternal_app app(cmdline);
|
TExternal_app app(cmdline);
|
||||||
int err = app.run(FALSE,3);
|
int err = app.run(FALSE,3);
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
return error_box("Impossibile eseguire il programma di scarico anagrafiche");
|
{
|
||||||
|
error_box("Errore %d nell'esecuzione del programma %s",
|
||||||
|
err, (const char*)cmdline);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TFilename txt = tmp; txt.add("ditte.txt");
|
TFilename txt = tmp; txt.add("ditte.txt");
|
||||||
TFilename ini = tmp; ini.add("ditte.ini");
|
TFilename ini = tmp; ini.add("ditte.ini");
|
||||||
@ -86,8 +89,10 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
|||||||
err = file.open('r');
|
err = file.open('r');
|
||||||
if (err != 0)
|
if (err != 0)
|
||||||
{
|
{
|
||||||
remove(ini); // Lo rimuove in caso lo crei vuoto il TConfig di TFile_text
|
::remove(ini); // Lo rimuove in caso crei vuoto il TConfig di TFile_text
|
||||||
return error_box("Aggiornamento anagrafiche non effettuato");
|
error_box("Aggiornamento anagrafiche non effettuato:\n"
|
||||||
|
"impossibile aprire il file %s", (const char*)txt);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
TLocalisamfile ditte(LF_NDITTE);
|
||||||
@ -191,17 +196,11 @@ bool TSESA_anagr::menu(MENU_TAG mt)
|
|||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
error_box("Errore %d in scrittura\ndell'unita' locale della ditta %ld", err, codditta);
|
error_box("Errore %d in scrittura\ndell'unita' locale della ditta %ld", err, codditta);
|
||||||
}
|
}
|
||||||
|
if (rig <= 1)
|
||||||
|
warning_box("Non e' stata trasferita nessuna ditta");
|
||||||
|
|
||||||
remove(txt);
|
remove(txt);
|
||||||
remove(ini);
|
remove(ini);
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TSESA_anagr::create()
|
|
||||||
{
|
|
||||||
dispatch_e_menu(BAR_ITEM(1));
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
|
@ -88,8 +88,8 @@ BOOL CSesadumpApp::InitInstance()
|
|||||||
SESA_DumpTable(strTable);
|
SESA_DumpTable(strTable);
|
||||||
|
|
||||||
const UINT WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
const UINT WM_WAKEUP = RegisterWindowMessage("WAKEUP");
|
||||||
const HTASK ht = 0; // GetCurrentTask();
|
//const HTASK ht = GetCurrentTask();
|
||||||
PostMessage(HWND_BROADCAST, WM_WAKEUP, (WPARAM)ht, 0L);
|
PostMessage(HWND_BROADCAST, WM_WAKEUP, 0 /*(WPARAM)ht*/, 0L);
|
||||||
|
|
||||||
return FALSE; // Batch mode
|
return FALSE; // Batch mode
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Microsoft Visual C++ generated build script - Do not modify
|
# Microsoft Visual C++ generated build script - Do not modify
|
||||||
|
|
||||||
PROJ = SESADUMP
|
PROJ = SESADUMP
|
||||||
DEBUG = 1
|
DEBUG = 0
|
||||||
PROGTYPE = 0
|
PROGTYPE = 0
|
||||||
CALLER =
|
CALLER =
|
||||||
ARGS = ditte c:\temp\guy
|
ARGS = ditte c:\temp\guy
|
||||||
@ -10,7 +10,7 @@ D_RCDEFINES = /d_DEBUG
|
|||||||
R_RCDEFINES = /dNDEBUG
|
R_RCDEFINES = /dNDEBUG
|
||||||
ORIGIN = MSVC
|
ORIGIN = MSVC
|
||||||
ORIGIN_VER = 1.00
|
ORIGIN_VER = 1.00
|
||||||
PROJPATH = C:\U\GUY\SESADUMP\
|
PROJPATH = C:\U\GUY\P.DUE\CE\
|
||||||
USEMFC = 1
|
USEMFC = 1
|
||||||
CC = cl
|
CC = cl
|
||||||
CPP = cl
|
CPP = cl
|
||||||
@ -22,8 +22,8 @@ CPPUSEPCHFLAG = /YuSTDAFX.H
|
|||||||
FIRSTC =
|
FIRSTC =
|
||||||
FIRSTCPP = STDAFX.CPP
|
FIRSTCPP = STDAFX.CPP
|
||||||
RC = rc
|
RC = rc
|
||||||
CFLAGS_D_WEXE = /nologo /G2 /W3 /Zi /AL /Od /D "_DEBUG" /FR /GA /Fd"SESADUMP.PDB"
|
CFLAGS_D_WEXE = /nologo /G2 /W3 /Zi /AL /Od /D "_DEBUG" /I "\u\guy\p.due\cb5" /FR /GA /Fd"SESADUMP.PDB"
|
||||||
CFLAGS_R_WEXE = /nologo /Gs /G2 /W3 /AL /O1 /D "NDEBUG" /FR /GA
|
CFLAGS_R_WEXE = /nologo /Gs /G2 /W3 /AL /O1 /D "NDEBUG" /I "\u\guy\p.due\cb5" /FR /GA
|
||||||
LFLAGS_D_WEXE = /NOLOGO /NOD /NOE /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO
|
LFLAGS_D_WEXE = /NOLOGO /NOD /NOE /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE /CO
|
||||||
LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE
|
LFLAGS_R_WEXE = /NOLOGO /NOD /PACKC:61440 /STACK:10240 /ALIGN:16 /ONERROR:NOEXE
|
||||||
LIBS_D_WEXE = lafxcwd oldnames libw llibcew commdlg.lib shell.lib
|
LIBS_D_WEXE = lafxcwd oldnames libw llibcew commdlg.lib shell.lib
|
||||||
@ -33,7 +33,7 @@ RESFLAGS = /nologo /t
|
|||||||
RUNFLAGS =
|
RUNFLAGS =
|
||||||
DEFFILE = SESADUMP.DEF
|
DEFFILE = SESADUMP.DEF
|
||||||
OBJS_EXT =
|
OBJS_EXT =
|
||||||
LIBS_EXT = ..\..\..\MSVC\LIB\ODBC.LIB
|
LIBS_EXT = ..\..\..\..\MSVC\LIB\ODBC.LIB
|
||||||
!if "$(DEBUG)" == "1"
|
!if "$(DEBUG)" == "1"
|
||||||
CFLAGS = $(CFLAGS_D_WEXE)
|
CFLAGS = $(CFLAGS_D_WEXE)
|
||||||
LFLAGS = $(LFLAGS_D_WEXE)
|
LFLAGS = $(LFLAGS_D_WEXE)
|
||||||
@ -59,43 +59,51 @@ SBRS = STDAFX.SBR \
|
|||||||
SESADLG.SBR
|
SESADLG.SBR
|
||||||
|
|
||||||
|
|
||||||
SESADUMP_RCDEP = c:\u\guy\sesadump\res\sesadump.ico \
|
SESADUMP_RCDEP = c:\u\guy\p.due\ce\sesadump.ico \
|
||||||
c:\u\guy\sesadump\res\sesadump.rc2
|
c:\u\guy\p.due\ce\sesadump.rc2
|
||||||
|
|
||||||
|
|
||||||
STDAFX_DEP = c:\u\guy\sesadump\stdafx.h
|
STDAFX_DEP = c:\u\guy\p.due\ce\stdafx.h
|
||||||
|
|
||||||
|
|
||||||
SESADUMP_DEP = c:\u\guy\sesadump\stdafx.h \
|
SESADUMP_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\sesadump.h \
|
c:\u\guy\p.due\ce\sesadump.h \
|
||||||
c:\u\guy\sesadump\mainfrm.h \
|
c:\u\guy\p.due\ce\mainfrm.h \
|
||||||
c:\u\guy\sesadump\sesaddoc.h \
|
c:\u\guy\p.due\ce\sesaddoc.h \
|
||||||
c:\u\guy\sesadump\sesadvw.h
|
c:\u\guy\p.due\ce\sesadvw.h \
|
||||||
|
c:\u\guy\p.due\ce\sesa.h
|
||||||
|
|
||||||
|
|
||||||
MAINFRM_DEP = c:\u\guy\sesadump\stdafx.h \
|
MAINFRM_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\sesadump.h \
|
c:\u\guy\p.due\ce\sesadump.h \
|
||||||
c:\u\guy\sesadump\mainfrm.h
|
c:\u\guy\p.due\ce\mainfrm.h \
|
||||||
|
c:\u\guy\p.due\ce\sesadlg.h \
|
||||||
|
c:\u\guy\p.due\ce\sesa.h
|
||||||
|
|
||||||
|
|
||||||
SESADDOC_DEP = c:\u\guy\sesadump\stdafx.h \
|
SESADDOC_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\sesadump.h \
|
c:\u\guy\p.due\ce\sesadump.h \
|
||||||
c:\u\guy\sesadump\sesaddoc.h
|
c:\u\guy\p.due\ce\sesaddoc.h
|
||||||
|
|
||||||
|
|
||||||
SESADVW_DEP = c:\u\guy\sesadump\stdafx.h \
|
SESADVW_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\sesadump.h \
|
c:\u\guy\p.due\ce\sesadump.h \
|
||||||
c:\u\guy\sesadump\sesaddoc.h \
|
c:\u\guy\p.due\ce\sesaddoc.h \
|
||||||
c:\u\guy\sesadump\sesadvw.h
|
c:\u\guy\p.due\ce\sesadvw.h
|
||||||
|
|
||||||
|
|
||||||
SESA_DEP = c:\u\guy\sesadump\stdafx.h \
|
SESA_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\columnst.h \
|
c:\u\guy\p.due\ce\columnst.h \
|
||||||
c:\u\guy\sesadump\sesa.h
|
c:\u\guy\p.due\ce\sesa.h
|
||||||
|
|
||||||
|
|
||||||
COLUMNST_DEP = c:\u\guy\sesadump\stdafx.h \
|
COLUMNST_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
c:\u\guy\sesadump\columnst.h
|
c:\u\guy\p.due\ce\columnst.h
|
||||||
|
|
||||||
|
|
||||||
|
SESADLG_DEP = c:\u\guy\p.due\ce\stdafx.h \
|
||||||
|
c:\u\guy\p.due\ce\sesadump.h \
|
||||||
|
c:\u\guy\p.due\ce\sesadlg.h
|
||||||
|
|
||||||
|
|
||||||
ODBC_DEP =
|
ODBC_DEP =
|
||||||
@ -148,7 +156,7 @@ $(PROJ).EXE
|
|||||||
$(MAPFILE)
|
$(MAPFILE)
|
||||||
c:\msvc\lib\+
|
c:\msvc\lib\+
|
||||||
c:\msvc\mfc\lib\+
|
c:\msvc\mfc\lib\+
|
||||||
..\..\..\MSVC\LIB\ODBC.LIB+
|
..\..\..\..\MSVC\LIB\ODBC.LIB+
|
||||||
$(LIBS)
|
$(LIBS)
|
||||||
$(DEFFILE);
|
$(DEFFILE);
|
||||||
<<
|
<<
|
||||||
|
Loading…
x
Reference in New Issue
Block a user