I haven't worked with MFC for a long time. I just tried a simple ribbon application. After adding a button to a group and add a handler for the button. I added a value in the string table for the button as well as in the afxres.h. The problem I have, when I click on the button, I try to display a messagebox, however the button is disable when I ran the program. I want to know how to fix that. Maybe I don't remember. I haven't been using MFC for a long time.
I do not use ribbon bars in my projects because I consider them to be absolutely unusable.
As for old style MFC application the toolbar button stays disabled unless either ON_COMMAND or ON_UPDATE_COMMAND_UI message handler for it has been implemented.
I do not use ribbon bars in my projects because I consider them to be absolutely unusable.
As for old style MFC application the toolbar button stays disabled unless either ON_COMMAND or ON_UPDATE_COMMAND_UI message handler for it has been implemented.
First, please use Code tags while posting code snippes.
Second, I have no idea what ID_BUTTON2 is and where is it supposed to be placed. BTW, did you added your ribbon bar to the CAboutDlg dialog?
ID_BUTTON2 is the ID of the button in the ribbon. I tried to zip the project and attached it, but it is too big after I zip it. It looks like the wirzard created a big SQL Compaq file.
ID_BUTTON2 is the ID of the button in the ribbon. I tried to zip the project and attached it, but it is too big after I zip it. It looks like the wirzard created a big SQL Compaq file.
Delete the SQL file and debug and release folders, then rezip.
ID_BUTTON2 is the ID of the button in the ribbon. I tried to zip the project and attached it, but it is too big after I zip it. It looks like the wirzard created a big SQL Compaq file.
Don't include Debug, Release, ipch folders, nor any unneed file (like .suo, .aps, .sdf.)
You haven't answer my question about where is your ribbon bar belong to and where do you try to handle messages from it.
I created the test project from the wizard. When I added the handler for the button, it looks like it choose the CDialog class, so that may be the problem. Maybe it should be in CView.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.