Click here to Skip to main content
15,917,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCrystal reports Pin
RADSGR8-Oct-04 15:35
RADSGR8-Oct-04 15:35 
GeneralWaitForMultipleObjects() error Pin
Anonymous8-Oct-04 14:56
Anonymous8-Oct-04 14:56 
GeneralRe: WaitForMultipleObjects() error Pin
Bob Stanneveld8-Oct-04 21:41
Bob Stanneveld8-Oct-04 21:41 
GeneralRe: WaitForMultipleObjects() error Pin
Anonymous11-Oct-04 7:01
Anonymous11-Oct-04 7:01 
Generalgenerate blue screen of death Pin
Member 1855338-Oct-04 14:20
Member 1855338-Oct-04 14:20 
GeneralRe: generate blue screen of death Pin
Michael Dunn9-Oct-04 6:20
sitebuilderMichael Dunn9-Oct-04 6:20 
GeneralDialog app - menu Pin
Andre Massada8-Oct-04 12:24
Andre Massada8-Oct-04 12:24 
GeneralRe: Dialog app - menu Pin
Andrzej Markowski8-Oct-04 20:43
Andrzej Markowski8-Oct-04 20:43 
This is a working example:
CMenu m_menu; // declared in CYourDlg header file
//
// Load the menu and assign to the dialog
BOOL CYourDlg::OnInitDialog()
{
...
m_menu.LoadMenu(IDR_MENU1);
SetMenu(&m_menu);
...
}
// on menu command (ID_XXX) message-handler function 
void CYourDlg::OnMenuXXXCommand() 
{
CMenu * menu = GetMenu();
if(menu)
{
// check/uncheck the menu item
CMenu* pPopup = menu->GetSubMenu(0);
if(pPopup->GetMenuState(ID_XXX,MF_BYCOMMAND)&MF_CHECKED)
pPopup->CheckMenuItem(ID_XXX, MF_BYCOMMAND | MF_UNCHECKED);
else
pPopup->CheckMenuItem(ID_XXX, MF_BYCOMMAND | MF_CHECKED);
// do something
}
// on some button click message-handler function
void CYourDlg::OnButtonClick() 
{
// show/hide the menu
if(GetMenu())
SetMenu(NULL);	
else
SetMenu(&m_menu);
}




Regards,
Andrzej Markowski

My Latest ArticlesCCustomBitmapButton: An owner-draw button and a frame for the caption bar, in one class.
CCustomTabCtrl: A clone of the Excel tab sheet control.

Generalseekin help fr voip application Pin
amitranjanmishra8-Oct-04 11:47
amitranjanmishra8-Oct-04 11:47 
Generalhaving trouble timing my program... Pin
Moochie58-Oct-04 11:14
Moochie58-Oct-04 11:14 
GeneralRe: having trouble timing my program... Pin
Neville Franks8-Oct-04 12:37
Neville Franks8-Oct-04 12:37 
GeneralRe: having trouble timing my program... Pin
Moochie58-Oct-04 13:22
Moochie58-Oct-04 13:22 
GeneralRe: having trouble timing my program... Pin
Moochie510-Oct-04 10:55
Moochie510-Oct-04 10:55 
QuestionGet default browser? Pin
Dominik Reichl8-Oct-04 11:09
Dominik Reichl8-Oct-04 11:09 
AnswerRe: Get default browser? Pin
Michael Dunn9-Oct-04 6:23
sitebuilderMichael Dunn9-Oct-04 6:23 
GeneralRe: Get default browser? Pin
Anonymous26-Nov-04 23:55
Anonymous26-Nov-04 23:55 
Generalactive-x DLL & Memory Management Pin
beerc0der8-Oct-04 10:20
beerc0der8-Oct-04 10:20 
Generalquestion Pin
Anonymous8-Oct-04 7:58
Anonymous8-Oct-04 7:58 
GeneralRe: question Pin
Bob Stanneveld8-Oct-04 8:07
Bob Stanneveld8-Oct-04 8:07 
Generalhelp needed: calling bmp images. Pin
hanivoo8-Oct-04 7:20
hanivoo8-Oct-04 7:20 
GeneralRe: help needed: calling bmp images. Pin
Branislav9-Oct-04 0:55
Branislav9-Oct-04 0:55 
Questionget and give data from my programe to another applications? Pin
medlteam8-Oct-04 7:06
medlteam8-Oct-04 7:06 
Generaldialog question Pin
m668-Oct-04 6:18
m668-Oct-04 6:18 
GeneralRe: dialog question Pin
Bob Stanneveld8-Oct-04 8:08
Bob Stanneveld8-Oct-04 8:08 
GeneralRe: dialog question Pin
m668-Oct-04 8:57
m668-Oct-04 8:57 

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.