MFC resource.h command/message IDs

Posted by ak on Stack Overflow See other posts from Stack Overflow or by ak
Published on 2010-04-03T19:19:18Z Indexed on 2010/04/03 19:23 UTC
Read the original article Hit count: 311

Filed under:
|
|
|

Hi

I'm working on an MFC application, that got pretty messy over years and over different teams of developers. The resource.h file, which contains all command/message mappings grew pretty big over time, and has lots of problems (like duplicate IDs). I am not proficient with MFC, so the question might sound pretty stupid...

MSDN docs mention that Command IDs and Message IDs should not be less than WM_USER and WM_APP correspondingly. I saw that most of the command IDs in resource.h generated by Visual Studio begin around 100. Shouldn't this cause some interfering with MFC/Windows commands and messages, that overlap with the application defined IDs? For example, I have a command ID :

#define ID_MY_ID 101

and there is a windows command that has the same ID. When MC send this command to the APP, it's handled like an application defined ID_MY_ID, and the app is taking unnecessary actions. Is it a possible scenario?

Also, is there some third party tool that helps to profile the project resources?

© Stack Overflow or respective owner

Related posts about mfc

Related posts about resources