This is my first try to use a resource editor to design dialog's in my application
I am giving a try to create a Dialog using a Resource Editor ResEd 2.2
Unfortunately I am getting a CREATEDLGERROR(0)
This is the screen snapshot of the Dialog which I have created using ResEd 2.2
I am using "Pelles C" Resorce Compiler instead of Borland Resource Compiler.
Any Idea where I have went wrong ?
Error Description
- Code: Select all Expand view RUN
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: TESTDLG
Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(0)
Called from: User.Prg => DUMMY(964)
Called from: WinAcs.Prg => (b)BUILDMENU(588)
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND(0)
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: .\source\classes\MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: WinAcs.Prg => MAIN(59)
My FWH Code
- Code: Select all Expand view RUN
*----------------------------------------*
FUNCTION Dummy()
*----------------------------------------*
LOCAL oDlg,aMySay,aMyGet
LOCAL cVar1,cVar2,cVar3
LOCAL oBtn1,oBtn2
aMySay:={NIL,NIL,NIL}
aMyGet:={NIL,NIL,NIL}
cVar1:=cVar2:=cVar3:=Space(10)
DEFINE DIALOG oDlg RESOURCE "TESTDLG"
REDEFINE SAY aMySay[1] ID 1001 OF oDlg
REDEFINE SAY aMySay[2] ID 1002 OF oDlg
REDEFINE SAY aMySay[3] ID 1003 OF oDlg
REDEFINE GET aMyGet[1] VAR cVar1 ID 1004 OF oDlg
REDEFINE GET aMyGet[2] VAR cVar2 ID 1005 OF oDlg
REDEFINE GET aMyGet[3] VAR cVar3 ID 1006 OF oDlg
REDEFINE BUTTONBMP oBtn1 ID 1007 OF oDlg
REDEFINE BUTTONBMP oBtn2 ID 1008 OF oDlg
ACTIVATE DIALOG oDlg // Here I get Error (Line 964 as per the error)
Return
My .RC file
- Code: Select all Expand view RUN
#define TESTDLG 1000
#define IDC_STC1 1001
#define IDC_STC2 1002
#define IDC_STC3 1003
#define IDC_EDT1 1004
#define IDC_EDT2 1005
#define IDC_EDT3 1006
#define IDC_BTN1 1007
#define IDC_BTN2 1008
TESTDLG DIALOGEX 10,10,327,193
CAPTION "Test Resource Dialog"
FONT 8,"MS Sans Serif",0,0,0
STYLE WS_VISIBLE|WS_OVERLAPPEDWINDOW
BEGIN
CONTROL "Employee Name",IDC_STC1,"Static",WS_CHILD|WS_VISIBLE,63,51,54,9
CONTROL "Employee Code",IDC_STC2,"Static",WS_CHILD|WS_VISIBLE,63,75,54,9
CONTROL "Employee Age",IDC_STC3,"Static",WS_CHILD|WS_VISIBLE,63,96,54,9
CONTROL "",IDC_EDT1,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,135,48,54,15,WS_EX_CLIENTEDGE
CONTROL "",IDC_EDT2,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,135,75,54,15,WS_EX_CLIENTEDGE
CONTROL "",IDC_EDT3,"Edit",WS_CHILD|WS_VISIBLE|WS_TABSTOP,138,99,54,15,WS_EX_CLIENTEDGE
CONTROL "OK",IDC_BTN1,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,90,147,54,15
CONTROL "Cancel",IDC_BTN2,"Button",WS_CHILD|WS_VISIBLE|WS_TABSTOP,165,147,54,15
END
Is it something wrong with the control names used in the .RC, If so from where can I get the list of control names to be used
Regards
Anser