RE: [Dev-C++] IDC_NUMBER, windows programming
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Abhijit S. <mu...@gm...> - 2003-06-28 17:55:14
|
> Does anybody know why this piece of code does not work? It gives > me an "invalid pointer operation". Have you actually #include'd main.h from resource.h? If not, try including it. If it gives errors, move all the resource-related defines into a separate file (usually with an extention .rh) and included it in both the main header and resource file. It would be a good idea to make the rh file re-entrant using this technique: -- start file `foo.rh' -- #ifndef _FOO_RH #define _FOO_RH #define IDC_NUMBER 610 #endif // _FOO_RH -- stop file `foo.h' -- If you understand how a pre-processor works, this should make sense. The _FOO_RH is only convention (generated from the filename). You can name it anyway you like, as long as it doesn't conflict with any other macros. HTH. -- Abhijit Shylanath Homepage: http://mudeth.tripod.com/ |