menu bar
-
hi all; I am writting an MFC app using the Doc/View and MDI. My problem is my additional menu bar was grayed and can not click but i dont set it as grayed. And the original menu bar was appear and can click on it. So how to solve this problem.
Maybe it has to do with command update handlers. Have you
ON_COMMAND_UPDATE_UI
handlers for the new commands in the additional menu bar? (I'm asuming you already haveON_COMMAND
handlers for them) Also you might find interesting to have a look at the flag[CFrameWnd::m_bAutoMenuEnable](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cframewnd.3a3a.m_bautomenuenable.asp)
, which gives you control over this kind of things. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -
hi all; I am writting an MFC app using the Doc/View and MDI. My problem is my additional menu bar was grayed and can not click but i dont set it as grayed. And the original menu bar was appear and can click on it. So how to solve this problem.
-
Maybe it has to do with command update handlers. Have you
ON_COMMAND_UPDATE_UI
handlers for the new commands in the additional menu bar? (I'm asuming you already haveON_COMMAND
handlers for them) Also you might find interesting to have a look at the flag[CFrameWnd::m_bAutoMenuEnable](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cframewnd.3a3a.m_bautomenuenable.asp)
, which gives you control over this kind of things. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo -
thanks... it's work, but can you tell me how to appear the dialog box after we click the menu bar?????
If I'm understanding your question, you should write something like this on your command handler:
CYourDialog dlg;
dlg.DoModal();Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
If I'm understanding your question, you should write something like this on your command handler:
CYourDialog dlg;
dlg.DoModal();Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
i do this void CMainFrame::OnLogin() { login dlg; dlg.DoModal(); } but this error appear!! error C2065: 'login' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'dlg' error C2065: 'dlg' : undeclared identifier error C2228: left of '.DoModal' must have class/struct/union type
-
i do this void CMainFrame::OnLogin() { login dlg; dlg.DoModal(); } but this error appear!! error C2065: 'login' : undeclared identifier error C2146: syntax error : missing ';' before identifier 'dlg' error C2065: 'dlg' : undeclared identifier error C2228: left of '.DoModal' must have class/struct/union type
mmmh... What is that
login
? It is aCDialog
class, right? Then in your project you'll see a .cpp and a .h (possiblylogin.h
) files associated with the class. Include this line at the beggining of the file where the error is:#include "login.h" // or whatever the header file for the class is named
You know, this is pretty basic C/C++ stuff. Maybe you should spend some time reading some C/C++ primer to get the fundamentals learnt. Do a search on Internet, there must be plenty of tutorials. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
-
mmmh... What is that
login
? It is aCDialog
class, right? Then in your project you'll see a .cpp and a .h (possiblylogin.h
) files associated with the class. Include this line at the beggining of the file where the error is:#include "login.h" // or whatever the header file for the class is named
You know, this is pretty basic C/C++ stuff. Maybe you should spend some time reading some C/C++ primer to get the fundamentals learnt. Do a search on Internet, there must be plenty of tutorials. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo