Button Color In MFC
-
Hello JohnCz I tried to use CMFCButton but there is no class in VS2008 prof. Do i need to link up something? Thanks Again. Regards Yogesh
yogeshs wrote:
I tried to use CMFCButton...
How? When you added a button to the dialog template and went to assign a variable to it, the Add Member Variable Wizard defaulted to
CButton
. All you need to do is change that toCMFCButton
. The appropriate header file (i.e.,afxbutton.h
) would have been added automatically, if it was not already included."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
-
Hello JohnCz I tried to use CMFCButton but there is no class in VS2008 prof. Do i need to link up something? Thanks Again. Regards Yogesh
Hi yogeshs, You have to learn how to be patient and read all answers and documentation without skipping some parts. I have already mentioned twice: If you are using VS 2008 with feature pack or with SP1 use CMFCButton class. You need Visual Studio SP1 installed. Web installer[^] ISO image[^] Than you can subclass button using CMFCCustButton. Subclassing is easy if you use wizard: Right click on the button in the resource editor and choose Add Variable. The only option you have is CButton, so select it. After wizard closes, open dialog’s header file and change CButton to CMFCMenuButton.
JohnCz