Click here to Skip to main content
15,892,674 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VC++ 6 Reading MS Excel fields Pin
Dmytro Skrypnyk23-Mar-09 11:56
Dmytro Skrypnyk23-Mar-09 11:56 
QuestionC++ reads utf-8 xml file Pin
Member 47565741-Mar-09 11:52
Member 47565741-Mar-09 11:52 
AnswerRe: C++ reads utf-8 xml file Pin
Sarath C1-Mar-09 17:36
Sarath C1-Mar-09 17:36 
QuestionGetShortPathName Pin
tom groezer1-Mar-09 9:54
tom groezer1-Mar-09 9:54 
AnswerRe: GetShortPathName Pin
Stuart Dootson1-Mar-09 10:09
professionalStuart Dootson1-Mar-09 10:09 
GeneralRe: GetShortPathName Pin
tom groezer1-Mar-09 21:08
tom groezer1-Mar-09 21:08 
GeneralRe: GetShortPathName Pin
Stuart Dootson1-Mar-09 21:55
professionalStuart Dootson1-Mar-09 21:55 
QuestionStupid Menu Question Pin
Mats Selen1-Mar-09 8:19
Mats Selen1-Mar-09 8:19 
I have written a small C++ program using Visual Studio 2008. I use the resource editor to create some menus and then look for the appropriate events in the callback routine to perform whatever action is needed when a certain menu item is selected (part of the callback routine is below):

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
int wmId;
switch (message) {
case WM_COMMAND:
wmId = LOWORD(wParam);
// Parse the menu selections:
switch (wmId) {
case ID_TOOLS_INITIALIZECOMPORT:
SetupStuff();
initialized = true;
break;
case ID_TOOLS_CALIBRATE:
reCalibrate();
break;
...

I'd like to know how to modify the properties of the menu items from the code (for example changing the text or setting a check-mark etc) but since I used the resource editor to create the menus I don't know how to get their handles or how to access their properties - all I know for each menu item is its ID.

I'm sure I'm just being stupid but any advice would be greatly appreciated.

Mats
AnswerRe: Stupid Menu Question [modified] Pin
Stuart Dootson1-Mar-09 10:06
professionalStuart Dootson1-Mar-09 10:06 
GeneralRe: Stupid Menu Question Pin
Mats Selen1-Mar-09 10:47
Mats Selen1-Mar-09 10:47 
GeneralRe: Stupid Menu Question Pin
Stuart Dootson1-Mar-09 11:29
professionalStuart Dootson1-Mar-09 11:29 
GeneralRe: Stupid Menu Question Pin
Richard Andrew x641-Mar-09 13:22
professionalRichard Andrew x641-Mar-09 13:22 
GeneralRe: Stupid Menu Question Pin
Mats Selen2-Mar-09 1:40
Mats Selen2-Mar-09 1:40 
Questiontemplate and vector [modified] Pin
transoft1-Mar-09 7:24
transoft1-Mar-09 7:24 
AnswerRe: template and vector Pin
Code-o-mat1-Mar-09 7:59
Code-o-mat1-Mar-09 7:59 
GeneralRe: template and vector Pin
transoft1-Mar-09 8:14
transoft1-Mar-09 8:14 
GeneralRe: template and vector Pin
Code-o-mat1-Mar-09 8:18
Code-o-mat1-Mar-09 8:18 
GeneralRe: template and vector Pin
transoft1-Mar-09 8:22
transoft1-Mar-09 8:22 
GeneralRe: template and vector Pin
Code-o-mat1-Mar-09 8:43
Code-o-mat1-Mar-09 8:43 
GeneralRe: template and vector Pin
transoft1-Mar-09 8:45
transoft1-Mar-09 8:45 
GeneralRe: template and vector Pin
Code-o-mat1-Mar-09 9:08
Code-o-mat1-Mar-09 9:08 
GeneralRe: template and vector Pin
transoft1-Mar-09 9:50
transoft1-Mar-09 9:50 
GeneralRe: template and vector Pin
Stuart Dootson1-Mar-09 9:30
professionalStuart Dootson1-Mar-09 9:30 
QuestionCan a ellipsis (Variadic) function i.e Func(...) be exported from a DLL Pin
Ru_Coding1-Mar-09 4:06
Ru_Coding1-Mar-09 4:06 
AnswerRe: Can a ellipsis (Variadic) function i.e Func(...) be exported from a DLL Pin
Stuart Dootson1-Mar-09 4:50
professionalStuart Dootson1-Mar-09 4:50 

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.