I have managed to get to the point of the application starting when compiled with FWH and VC98. I have several MsgInfo() calls in the code so I can see something happening.
I can even get to the point where my main application screen appears, but then I get errors. But in order to get to that point, I've de-activated many lines of code in my main program just to get to the activated window. I'm just de-activating code that gives an error.
You can see the de-activated code which is still included with #ifndef __HARBOUR__ compile time directive. If I compile with the normal FW, clipper, and blinker the code is included and all is good.
I suppose that these deactivated lines are causing trouble when the window actually activates.
The following error info happens before it reaches the line:
MsgInfo( "After Activate" )
Error description: Error BASE/1004 No exported method: APPLY
Args:
[ 1] = U
[ 2] = O Object
Stack Calls
===========
Called from APPLY@0
Called from ONINIT@202
Called from (b)WINMAIN@80
Called from CPCREG:ACTIVATE@0
Called from WINMAIN@126
Is there some basic requirement I'm missing that is keeping me from just compiling with FWH and vc98? Thanks for your help, Paul
- Code: Select all Expand view
#include "FiveWin.ch"
#include "commport.ch"
#include "GETKEY.CH"
// include "pcreg.ch"
#include "fileio.ch"
#include "inkey.ch"
#include "bitmap.ch"
#include "xfivewin.ch"
#include "showwin.ch"
#include "aprinter.ch"
#include "aobject.ch"
#include "igroup.ch"
#include "default.ch"
#define CLR_LIGHTBLUE 16744448
#define GWL_STYLE -16
//#xtranslate mdichild =>
//#xtranslate :oWndClient =>
MemVar cTecInfo
//----------------------------------------------------------------------------//
static aObject:=;
{;
{,,,,,}; // Totals
,{,{,}}; // Entry
,{,{,,,,}}; // Customer
,{,}; // Journal
,; // BigNum
,{,,}; // Fonts
,{{,0,.f.,},{,0,.f.,},{,0,.f.,},{,0,.f.,}}; // Button bars
,; // Service Timer
,; // ECR
,; // Menu
,{,,,}; // Option
,; // bInkey
,{}; // Queue
,; // Show help
,-1; // Crypkey
,2; // Auto delay
,{{,}}; // Color
,.f.; // Design
,; // IsWinNT
}
static nRes:=0.8
//----------------------------------------------------------------------------//
function WinMain()
local cIniFile := GetWinDir()+"\FiveWin.ini"
local oWnd
Splash('bitmap\splash.bmp',{|| Starting() })
#ifdef __HARBOUR__
MsgInfo( "start, cIniFile = " + cIniFile )
#endif
oWnd := CPcreg():New()
#ifdef __HARBOUR__
MsgInfo( "after CPcreg" )
#endif
// Add event handlers
oWnd:bKeyChar := {|nKey,nFlags| OnKeyChar(nKey,nFlags)}
oWnd:bKeyDown := {|nKey,nFlags| OnKeyDown(nKey,nFlags)}
oWnd:bInit := {|| OnInit() }
oWnd:bValid := {|| Exit(,.t.) }
if lSkin()
// OnPaint
oWnd:oWndClient:bPainted := {|hDC,cPS| OnPaint(hDC,cPS)}
#ifdef __HARBOUR__
MsgInfo( "PCREGW: OnPaint" )
#endif
endif
// Add message bar with date
// Don't need two clocks on the screen, so only
// add the clock to message bar when maximized - alOption(3)
#ifndef __HARBOUR__
oWnd:oMsgBar := TMsgBar():New(oWnd,cProgTitle(),,alOption(3),.t.,.f.,,,,.f.)
#endif
// Don't change applicaton caption to resources usage when the bottom status bar is double clicked 10/24/2003 02:53PM GJH
#ifndef __HARBOUR__
oWnd:oMsgBar:lInfoRes := .f.
#endif
// Require manager security level to set date or time
#ifndef __HARBOUR__
oWnd:oMsgBar:aItem[1]:bAction := {|| if(nSecLvl()>=MemVar->nMgrLvl,WinExec("Control date/time"),)}
#endif
if alOption(3)
#ifndef __HARBOUR__
oWnd:oMsgBar:aItem[2]:bAction := oWnd:oMsgBar:aItem[1]:bAction
#endif
endif
// Set the help file
if file('pcreg.chm')
setHelpFile('pcreg.chm')
else
setHelpFile('pcreg.hlp')
endif
// Set the timer for SERVER.REQ for every 2 seconds
aObject[AO_SERVERTIMER] := TTimer():New(2000,{|| aObject[AO_SERVERTIMER]:Deactivate(),memory(-1),AutoScript(),aObject[AO_SERVERTIMER]:Activate()},oWnd)
// Show the window
// oWnd:Activate(if(alOption(3),"MAXIMIZE","NORMAL"))
// Let CRect:Apply handle the size and maximize, don't maximize here
#ifdef __HARBOUR__
MsgInfo( "Ready to Activate" )
#endif
oWnd:Activate("NORMAL")
#ifdef __HARBOUR__
MsgInfo( "After Activate" )
#endif
return NIL