Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
Yes Arjay it sets the button text to OKAY,even button font is also getting bold if i use CFont concept,even position of button is also changing if i use Movewindow..Only thing and most painful for me button Color which is not changing.
Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
Victor ,you may see compilation errors coz i am writing manually ,i cant copy paste as it is due to some norms..But code is 100% compilable and i have shared both cpp and header files above with you.so please ignore spelling mistakes ...just tell where color change logic is getting failed
Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
Originally Posted by Sparsh_21j
Victor ,you may see compilation errors coz i am writing manually ,i cant copy paste as it is due to some norms..But code is 100% compilable and i have shared both cpp and header files above with you.so please ignore spelling mistakes ...just tell where color change logic is getting failed
1. Yes, you have to copy/paste your code, not just "rewrite" it from scratch!
2. Since you did not provide the correct code I could not test it. Instead I had to create a test App, add a button (CMFCButton testButton) and use your code
Code:
testButton.SetFaceColor(RGB(255, 102, 0));
Last edited by VictorN; October 8th, 2019 at 05:32 AM.
Reason: the "corrupted" attachment was removed
Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
I have no idea why... I do see it within my post in this thread.
When trying to open, get the message 'Invalid Attachment specified. If you followed a valid link, please notify the administrator'
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
How about this one?
There doesn't appear to be an attachment with that post?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
Re: Changing background Color of standard buttons (ok,cancel,help) of Cpropertysheet
I can see the attachment, but that's not exactly what the OP is trying to do. He has a CPropertySheet which has the OK button on it and he's trying to change its face color. I've duplicated what I think his code is supposed to be and it doesn't work for me other.
Ok, I figured it out. The problem is CPropertySheet::OnInitDialog doesn't call UpdateData, so his control variable isn't mapped to the OK button. If you call UpdateData(FALSE) before SetFaceColor, the call works.
Last edited by GCDEF; October 8th, 2019 at 10:01 AM.
* 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.