Click here to Skip to main content

C / C++ / MFC

QuestionRe: InitInstance() Problem PinmvpCPallini26-Feb-13 22:08 
AnswerRe: InitInstance() Problem PinmemberAlbert Holguin27-Feb-13 5:45 
QuestionHandling WinHttp Redirects Pinmemberendemoniada25-Feb-13 16:57 
SuggestionFix: Ribbon text displays inactive after migrating to VS2012 PinmemberDataFlask25-Feb-13 14:48 
This fix applies to VS2012 MFC projects that use the Windows7 Visual Manager style. It causes active button caption text to draw in color 0,0,0 and not the same color as inactive.
This restores VS2010/2008 Feature Pack behavior.
Hello, I thought to post this to CP in case others had this issue. In 2012 MFC was 'fixed' to draw text using TextNormal as specified in Style.xml resource (I suspect that TextNormal should have been 0,0,0 in 2010 but it went unoticed).
class CFixMFCVisualManagerWindows7 : public CMFCVisualManagerWindows7
	COLORREF OnDrawRibbonPanel(CDC* pDC, CMFCRibbonPanel* pPanel, CRect rectPanel, CRect rectCaption);
IMPLEMENT_DYNCREATE(CFixMFCVisualManagerWindows7, CMFCVisualManagerWindows7)
COLORREF CFixMFCVisualManagerWindows7::OnDrawRibbonPanel(CDC* pDC, CMFCRibbonPanel* pPanel, CRect rectPanel, CRect rectCaption)
	CMFCVisualManagerWindows7::OnDrawRibbonPanel(pDC, pPanel, rectPanel, rectCaption);
	return GetGlobalData()->clrBarText; //2010 Compatible Behavior
//Replace CFixMFCVisualManagerWindows7 below
//CAppMainFrame::OnCreate(LPCREATESTRUCT lpcs)
rsf - Interscape

QuestionRe: Fix: Ribbon text displays inactive after migrating to VS2012 PinmvpRichard MacCutchan25-Feb-13 22:49 
QuestionMemory leak Pinmembera_matseevsky25-Feb-13 10:19 
AnswerRe: Memory leak PinmemberRichard Andrew x6425-Feb-13 11:11 
GeneralRe: Memory leak Pinmembera_matseevsky25-Feb-13 17:07 
GeneralRe: Memory leak PinmemberStephen Hewitt25-Feb-13 17:43 
GeneralRe: Memory leak PinmemberRichard Andrew x6426-Feb-13 10:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web04 | 2.8.150326.1 | Last Updated 27 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid