Hello I'm trying to get my first FWH program working. It is based on the testxbrw example, but it uses an RC file for the menu. The only problem I'm having is with the action oWnd:End() which is connected to one of my menu options. It causes a "No exported method: END" error, but the method END was used in the original example. What is the proper way to end a program from a menu Action? Here is the code:
function Main()
local oBmp, oWnd
REQUEST DBFCDX
rddsetdefault( "DBFCDX" )
USE D_Header NEW
DEFINE WINDOW oWnd TITLE "DonorQuest 7.0 For Windows";
MENU RCBuildMenu( oWnd ) MDI;
MENUINFO 3
DEFINE BITMAP oBmp RESOURCE "Background"
SET MESSAGE OF oWnd TO "DonorQuest 7.0, (c) Intrepid Systems, Inc. " CENTERED
oWnd:bPainted = { | hDC | BmpTiled( hDC, oWnd, oBmp ) }
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function RCBuildMenu( oWnd )
local oMenu, oItem
DEFINE MENU oMenu RESOURCE FRAME_MENU
REDEFINE MENUITEM oItem ID FRAME_MENU OF oMenu ACTION MsgInfo( "DonorQuest in 32 bits!" )
REDEFINE MENUITEM oItem ID FMID_FILE_OPEN OF oMenu ACTION AutoEdit( oWnd )
REDEFINE MENUITEM oItem ID FMID_FILE_EXIT OF oMenu ACTION oWnd:End()
return( oMenu )
//----------------------------------------------------------------------------//
Thanks,
-Patrick
[list=][/list]