Click here to Skip to main content
15,923,197 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Setting window Icon Pin
Shay Harel24-Jul-03 7:53
Shay Harel24-Jul-03 7:53 
GeneralRe: Setting window Icon Pin
Dangleberry25-Jul-03 3:43
sussDangleberry25-Jul-03 3:43 
GeneralRe: Setting window Icon Pin
Beer2624-Jul-03 10:26
Beer2624-Jul-03 10:26 
GeneralSetting menu item as checked Pin
Jay Hova24-Jul-03 7:12
Jay Hova24-Jul-03 7:12 
GeneralRe: Setting menu item as checked Pin
Toni7824-Jul-03 7:37
Toni7824-Jul-03 7:37 
GeneralRe: Setting menu item as checked Pin
Jay Hova24-Jul-03 7:43
Jay Hova24-Jul-03 7:43 
GeneralRe: Setting menu item as checked Pin
Toni7824-Jul-03 12:37
Toni7824-Jul-03 12:37 
GeneralRe: Setting menu item as checked Pin
Beer2624-Jul-03 10:40
Beer2624-Jul-03 10:40 
Here is the answer you were probably looking for, but until now, didn't get

in the new dialog class add this function. Now the new dialogs will control that menu item in it's parent.

void MyClass::checkmymenuitem(int checked)
{
CMenu* pMainMenu = GetParent()->GetMenu();
CMenu *submenu = pMainMenu->GetSubMenu(1); // replace 1 by the horizontal menu position
UINT g = submenu->GetMenuItemID(3); // replace 3 by the actual vertical item position
CString mnustr;
submenu->GetMenuString(3, mnustr, MF_BYPOSITION); // replace 3 by the actual vertical item position
// you can optionally change mnustr to a text here
if (checked) submenu->ModifyMenu(3, MF_BYPOSITION | MF_STRING | MF_CHECKED, g, mnustr);
else submenu->ModifyMenu(3, MF_BYPOSITION | MF_STRING | MF_UNCHECKED, g, mnustr);
}

in initdialog

checkmymenuitem(true);

then in onclose

checkmymenuitem(false);
GeneralRe: Setting menu item as checked Pin
Jay Hova25-Jul-03 1:54
Jay Hova25-Jul-03 1:54 
GeneralRe: Setting menu item as checked Pin
Beer2625-Jul-03 2:47
Beer2625-Jul-03 2:47 
Generalsoftware and security Pin
Cyberizen24-Jul-03 5:53
Cyberizen24-Jul-03 5:53 
GeneralRe: software and security Pin
Alexander M.,24-Jul-03 6:47
Alexander M.,24-Jul-03 6:47 
GeneralRe: software and security Pin
Toni7824-Jul-03 7:21
Toni7824-Jul-03 7:21 
GeneralRe: software and security Pin
AlexO24-Jul-03 7:55
AlexO24-Jul-03 7:55 
GeneralMultiple Threads Pin
Dangleberry24-Jul-03 5:46
sussDangleberry24-Jul-03 5:46 
GeneralRe: Multiple Threads Pin
John M. Drescher24-Jul-03 5:50
John M. Drescher24-Jul-03 5:50 
GeneralRe: Multiple Threads Pin
Anonymous24-Jul-03 6:26
Anonymous24-Jul-03 6:26 
GeneralRe: Multiple Threads Pin
Dangleberry24-Jul-03 6:27
sussDangleberry24-Jul-03 6:27 
GeneralRe: Multiple Threads Pin
Alexander M.,24-Jul-03 6:49
Alexander M.,24-Jul-03 6:49 
GeneralRe: Multiple Threads Pin
John M. Drescher24-Jul-03 6:55
John M. Drescher24-Jul-03 6:55 
GeneralRe: Multiple Threads Pin
Alexander M.,25-Jul-03 2:33
Alexander M.,25-Jul-03 2:33 
GeneralRe: Multiple Threads Pin
Dangleberry25-Jul-03 3:52
sussDangleberry25-Jul-03 3:52 
Generaldetecting screen display area Pin
Shay Harel24-Jul-03 4:16
Shay Harel24-Jul-03 4:16 
GeneralRe: detecting screen display area Pin
Iain Clarke, Warrior Programmer24-Jul-03 4:29
Iain Clarke, Warrior Programmer24-Jul-03 4:29 
GeneralRe: detecting screen display area Pin
Shay Harel24-Jul-03 4:48
Shay Harel24-Jul-03 4:48 

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.