Re: Safe ID Range for my COMMAND_RANGE message map entry

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Edward Mitchell wrote:
I am using COMMAND_RANGE to create fairly long list of items for one of my menus. If I create an id such as ID_ITEM1, the system seems to pick a number in the 32000 on up range. I could spell out all the commands ID_ITEM1, ID_ITEM2, ID_ITEM3, etc. but what I'd like to do is to define ID_FIRST and ID_LAST. I'm worried if I define first as 33000 and last as 33050, then sometime later, the automatic assignment will come along and fill in the hole.

I notice the MRU list is spelled out for every entry (ID_FILE_MRU_FILE1, 2, 3, ... 16 with the actual numbers going from 57616 to 57631.

My question is if there is a range of numbers in the 16 bit ID set which is completely under my control. Someplace where I am guaranteed that one of the wizards won't allocate numbers between my beginning and end?

There is no range that is explicitly reserved. However, the numbers that the wizard uses are controlled by the counters in last few lines in the project's resource.h file, so you can see where it's going and add your own #defines in that file for your own ID ranges.

--
Scott McPhillips [MVP VC++]

.



Relevant Pages

  • Re: Check a radio button
    ... controls, he would have gotten a pointer to my essay on control member variables. ... You and I can program without the wizards because we know the paradigms and can actually ... to the "real programmers" mythos. ... I can understand how some would not want to use MFC (although the ...
    (microsoft.public.vc.mfc)
  • Re: Sony A100 - shortcomings
    ... -no dedicated meter control switch ... -Menus are basically the Minolta menus which are reasonably ... -Carl Zeiss lens designs to follow. ... What made cameras like the Maxxum 9 and 7 great ...
    (rec.photo.digital.slr-systems)
  • Re: How do I merge menus from one form onto another?
    ... I need to engineer an application framework which will ... controls do merge their menus ... How do I dynamically load an ActiveX control at run time? ... Add a UserControl to the project. ...
    (microsoft.public.vb.winapi)
  • Re: ATL Wizard question
    ... "Igor Tandetnik" wrote: ... >> I am attempting to build an ActiveX control using ATL Wizards. ... >> to add or change a property's DISPID in the .idl file I get an error. ...
    (microsoft.public.win32.programmer.ole)
  • Re: Parameter passing VFP6.0 to Foxpro 2.6a
    ... HOW CAN I CHANGE THE BACKGROUND COLOR / FONT OF MENUS / SUB MENUS ... CONTROL WILL SKIP ... Right click on your windows desktop, ... This is a user setting and you should respect their setting ...
    (microsoft.public.fox.programmer.exchange)