Click here to Skip to main content
12,623,511 members (31,670 online)

C / C++ / MFC

 
QuestionInitInstance() Problem Pin
Anu_Bala25-Feb-13 20:19
memberAnu_Bala25-Feb-13 20:19 
AnswerRe: InitInstance() Problem Pin
Richard MacCutchan25-Feb-13 22:52
mvpRichard MacCutchan25-Feb-13 22:52 
AnswerRe: InitInstance() Problem Pin
Max_Power_Up26-Feb-13 6:44
memberMax_Power_Up26-Feb-13 6:44 
AnswerRe: InitInstance() Problem Pin
«_Superman_»26-Feb-13 16:20
member«_Superman_»26-Feb-13 16:20 
QuestionRe: InitInstance() Problem Pin
CPallini26-Feb-13 22:08
mvpCPallini26-Feb-13 22:08 
AnswerRe: InitInstance() Problem Pin
Albert Holguin27-Feb-13 5:45
memberAlbert Holguin27-Feb-13 5:45 
QuestionHandling WinHttp Redirects Pin
endemoniada25-Feb-13 16:57
memberendemoniada25-Feb-13 16:57 
SuggestionFix: Ribbon text displays inactive after migrating to VS2012 Pin
DataFlask25-Feb-13 14:48
memberDataFlask25-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 Pin
Richard MacCutchan25-Feb-13 22:49
mvpRichard MacCutchan25-Feb-13 22:49 
QuestionMemory leak Pin
a_matseevsky25-Feb-13 10:19
membera_matseevsky25-Feb-13 10:19 
AnswerRe: Memory leak Pin
Richard Andrew x6425-Feb-13 11:11
memberRichard Andrew x6425-Feb-13 11:11 
GeneralRe: Memory leak Pin
a_matseevsky25-Feb-13 17:07
membera_matseevsky25-Feb-13 17:07 
GeneralRe: Memory leak Pin
Stephen Hewitt25-Feb-13 17:43
memberStephen Hewitt25-Feb-13 17:43 
GeneralRe: Memory leak Pin
Richard Andrew x6426-Feb-13 10:11
memberRichard Andrew x6426-Feb-13 10:11 
AnswerRe: Memory leak Pin
DavidCrow25-Feb-13 14:24
memberDavidCrow25-Feb-13 14:24 
AnswerRe: Memory leak Pin
Stefan_Lang26-Feb-13 5:04
memberStefan_Lang26-Feb-13 5:04 
GeneralRe: Memory leak Pin
a_matseevsky26-Feb-13 11:59
membera_matseevsky26-Feb-13 11:59 
GeneralRe: Memory leak Pin
Stefan_Lang26-Feb-13 23:44
memberStefan_Lang26-Feb-13 23:44 
GeneralRe: Memory leak Pin
a_matseevsky27-Feb-13 3:09
membera_matseevsky27-Feb-13 3:09 
GeneralRe: Memory leak Pin
Stefan_Lang27-Feb-13 3:52
memberStefan_Lang27-Feb-13 3:52 
GeneralRe: Memory leak Pin
a_matseevsky27-Feb-13 12:44
membera_matseevsky27-Feb-13 12:44 
Question[Solved] Memory leak in producer-consumer program Pin
noislude25-Feb-13 8:30
membernoislude25-Feb-13 8:30 
AnswerRe: Memory leak in producer-consumer program Pin
Richard Andrew x6425-Feb-13 11:08
memberRichard Andrew x6425-Feb-13 11:08 
GeneralRe: Memory leak in producer-consumer program Pin
noislude25-Feb-13 11:23
membernoislude25-Feb-13 11:23 
GeneralRe: Memory leak in producer-consumer program Pin
Richard Andrew x6425-Feb-13 11:33
memberRichard Andrew x6425-Feb-13 11:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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
Web02 | 2.8.161128.1 | Last Updated 2 Dec 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid