Click here to Skip to main content
15,921,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Default ID for the "Enter" button Pin
Frank Christensen24-Jun-02 1:03
Frank Christensen24-Jun-02 1:03 
GeneralAddress Book Pin
lavrik23-Jun-02 22:47
lavrik23-Jun-02 22:47 
QuestionNorton AntiVirus and Hook ??? Pin
Alek23-Jun-02 21:10
Alek23-Jun-02 21:10 
GeneralIts about duplicate ID given to controls Pin
Abhishek Narula23-Jun-02 20:15
Abhishek Narula23-Jun-02 20:15 
GeneralRe: Its about duplicate ID given to controls Pin
Christian Graus23-Jun-02 20:46
protectorChristian Graus23-Jun-02 20:46 
GeneralThanks for the prompt answer, here is the next question Pin
Abhishek Narula23-Jun-02 22:56
Abhishek Narula23-Jun-02 22:56 
GeneralRe: Thanks for the prompt answer, here is the next question Pin
Christian Graus23-Jun-02 23:23
protectorChristian Graus23-Jun-02 23:23 
GeneralRe: Thanks for the prompt answer, here is the next question Pin
jbarton24-Jun-02 8:07
jbarton24-Jun-02 8:07 
There are defined limits for the various ID ranges in resource.h. Microsoft describes these ranges in technical note 35.

From TN035:
---------------------------------------------------------------------------------------------------------

_APS_NEXT_RESOURCE_VALUE is the next symbol value that will be used for a dialog resource, menu resource, and so on. The valid range for resource symbol values is 1 to 0x6FFF.

_APS_NEXT_COMMAND_VALUE is the next symbol value that will be used for a command identification. The valid range for command symbol values is 0x8000 to 0xDFFF.

_APS_NEXT_CONTROL_VALUE is the next symbol value that will be used for a dialog control. The valid range for dialog control symbol values is 8 to 0xDFFF.

---------------------------------------------------------------------------------------------------------

It is best to keep your resource #defines within these ranges, as some things may break if you use values outside these ranges.

Certain MFC data types are written assuming that the resource id values fit within a 16 bit unsigned int. For instance, the CString object allows a string to be loaded from the resources during its construction by passing its resource id to the constructor, but only works if HIWORD(id) is 0.

In order to load a string this way, you use the following form of the constructor:
CString string( LPCTSTR(RESOURCE_ID) );

This constructor distinguishes between a resource id and a pointer to an existing character buffer by looking at the hiword of the LPCTSTR pointer. If the hiword is 0, a string is loaded from the resources. If the hiword is not 0, a string is copied from an existing buffer.

Best regards,
John

GeneralLink error Pin
23-Jun-02 18:14
suss23-Jun-02 18:14 
GeneralRe: Link error Pin
Christian Graus23-Jun-02 18:23
protectorChristian Graus23-Jun-02 18:23 
QuestionGet directory read/write status?? Pin
philip andrew23-Jun-02 17:57
philip andrew23-Jun-02 17:57 
AnswerRe: Get directory read/write status?? Pin
Prem Kumar23-Jun-02 18:49
Prem Kumar23-Jun-02 18:49 
QuestionHow can I see line numbers? Pin
rbc23-Jun-02 17:22
rbc23-Jun-02 17:22 
AnswerRe: How can I see line numbers? Pin
Shog923-Jun-02 17:34
sitebuilderShog923-Jun-02 17:34 
AnswerRe: How can I see line numbers? Pin
Rama Krishna Vavilala23-Jun-02 17:39
Rama Krishna Vavilala23-Jun-02 17:39 
AnswerRe: How can I see line numbers? Pin
Rick Crone26-Jun-02 10:25
Rick Crone26-Jun-02 10:25 
Generalprint message in VC IDE's debug window Pin
zecodela23-Jun-02 17:20
zecodela23-Jun-02 17:20 
GeneralRe: print message in VC IDE's debug window Pin
Shog923-Jun-02 17:35
sitebuilderShog923-Jun-02 17:35 
GeneralRe: print message in VC IDE's debug window Pin
zecodela23-Jun-02 19:49
zecodela23-Jun-02 19:49 
Generaln i disableHow can i disable the shadows for the menus... Pin
MaTrIX2k223-Jun-02 12:18
MaTrIX2k223-Jun-02 12:18 
GeneralPosition in midi Pin
23-Jun-02 11:26
suss23-Jun-02 11:26 
GeneralCreating Links On windows 2000 Pin
Bill SerGio23-Jun-02 10:00
Bill SerGio23-Jun-02 10:00 
GeneralRe: Creating Links On windows 2000 Pin
ColinDavies23-Jun-02 10:13
ColinDavies23-Jun-02 10:13 
GeneralRe: Creating Links On windows 2000 Pin
Bill SerGio23-Jun-02 10:23
Bill SerGio23-Jun-02 10:23 
GeneralRe: Creating Links On windows 2000 Pin
Tim Smith23-Jun-02 10:35
Tim Smith23-Jun-02 10:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.