Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiWindow program problem

Status
Not open for further replies.

atferraz

Technical User
Aug 23, 2003
129
PT
Hello, I'm developing a GDI program with 3 windows and can’t make menus to work.

All 3 windows are created, but when I try to use options from menu, the program stop responding.

Please any One
 
You should have the handler implementation for each menu item , something like here where ID_PAYMENTSEARCH is the id associated to the Search menu item and OnPaymentSearch() and OnUpdatePaymentSearch() are the handlers to be executed:
BEGIN_MESSAGE_MAP(class1, class 2)
ON_COMMAND(ID_PAYMENTSEARCH, OnPaymentSearch)
ON_UPDATE_COMMAND_UI(ID_PAYMENTSEARCH, OnUpdatePaymentSearch)
END_MESSAGE_MAP()

//called when the menu item is clicked.
void Class1::OnPaymentSearch()
{
//LaunchScreen();
}
// called when the menu popup is shown
void Class1::OnUpdatePaymentSearch(CCmdUI* pCmdUI)
{ // some enable/disable conditions
{
pCmdUI->Enable( FALSE );
} else
{
}
}
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top