Click here to Skip to main content

C / C++ / MFC

 
QuestionInitInstance() Problem PinmemberAnu_Bala25-Feb-13 20:19 
AnswerRe: InitInstance() Problem PinmvpRichard MacCutchan25-Feb-13 22:52 
AnswerRe: InitInstance() Problem PinmemberMax_Power_Up26-Feb-13 6:44 
AnswerRe: InitInstance() Problem Pinmember«_Superman_»26-Feb-13 16:20 
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).
 
//h
class CFixMFCVisualManagerWindows7 : public CMFCVisualManagerWindows7
{
	COLORREF OnDrawRibbonPanel(CDC* pDC, CMFCRibbonPanel* pPanel, CRect rectPanel, CRect rectCaption);
	DECLARE_DYNCREATE(CFixMFCVisualManagerWindows7)
};
 
//cpp
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)
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CFixMFCVisualManagerWindows7));
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 
AnswerRe: Memory leak PinmemberDavidCrow25-Feb-13 14:24 
AnswerRe: Memory leak PinmemberStefan_Lang26-Feb-13 5:04 
GeneralRe: Memory leak Pinmembera_matseevsky26-Feb-13 11:59 
GeneralRe: Memory leak PinmemberStefan_Lang26-Feb-13 23:44 
GeneralRe: Memory leak Pinmembera_matseevsky27-Feb-13 3:09 
GeneralRe: Memory leak [modified] PinmemberStefan_Lang27-Feb-13 3:52 
GeneralRe: Memory leak Pinmembera_matseevsky27-Feb-13 12:44 
Question[Solved] Memory leak in producer-consumer program [modified] Pinmembernoislude25-Feb-13 8:30 
AnswerRe: Memory leak in producer-consumer program PinmemberRichard Andrew x6425-Feb-13 11:08 
GeneralRe: Memory leak in producer-consumer program Pinmembernoislude25-Feb-13 11:23 
GeneralRe: Memory leak in producer-consumer program PinmemberRichard Andrew x6425-Feb-13 11:33 

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
Web01 | 2.8.150301.1 | Last Updated 3 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid