Does anybody know why this piece of code does not work? It gives me an "invalid pointer operation".
//this is part of main.h file
#define IDD_ABOUT 100
#define IDC_MAIN_TEXT 1001
#define IDI_ICON 1
#define IDD_DIALOG 600
#define IDC_NUMBER 610
........
//this is part of the resource file
600 DIALOG DISCARDABLE 0, 0, 300, 150
STYLE WS_VISIBLE | WS_SYSMENU | WS_POPUP | WS_CAPTION | DS_MODALFRAME
CAPTION "Dialog Box Example"
FONT 8,"Helv"
BEGIN
ICON 1,5,11,17,20,20
DEFPUSHBUTTON "&OK",IDOK,220,18,50,14
PUSHBUTTON "&Cancel",IDCANCEL,220,35,50,14
GROUPBOX "Random Numbers Generator Version 1.0",102,7,60,200,60
CTEXT "dialog box example", 103,40,75,130,40
LTEXT "Low Limit",103,7,10,50,8
LTEXT "High Limit",103,7,20,50,8
EDITTEXT IDC_NUMBER,150,7,21,14,ES_NUMBER
.....
Instead if I eliminate the "#define IDC_NUMBER 1100" line of the main.h file and make "EDITTEXT 610,150,7,21,14,ES_NUMBER" IT WORKS!!
Thanks.
JEA
|