Re: [Dev-C++] IDC_NUMBER, windows programming
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-06-27 18:12:17
|
Your dialog is IDD_DIALOG but the controls don't have IDC identifiers, which is odd. Is this generated or have you typed it in yourself? Remember you can't use #define IDD_ etc. as a literal number, you use the identifiers to send messages to controls (like SetDlgText()). >From: "Jorge Abramian" <jab...@ma...> >Reply-To: <jab...@ma...> >To: <dev...@li...> >Subject: [Dev-C++] IDC_NUMBER, windows programming >Date: Fri, 27 Jun 2003 08:40:10 -0400 > >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 > > >------------------------------------------------------- >This SF.Net email is sponsored by: INetU >Attention Web Developers & Consultants: Become An INetU Hosting Partner. >Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! >INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php >_______________________________________________ >Dev-cpp-users mailing list >Dev...@li... >TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger |