Click here to Skip to main content
15,904,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: swap two values withou using temp. storage Pin
Member 322138523-Jul-10 7:16
Member 322138523-Jul-10 7:16 
AnswerRe: swap two values withou using temp. storage Pin
Kenneth Kasajian23-Jul-10 14:40
Kenneth Kasajian23-Jul-10 14:40 
AnswerRe: swap two values withou using temp. storage Pin
manjulameganathan23-Jul-10 18:00
manjulameganathan23-Jul-10 18:00 
AnswerRe: swap two values withou using temp. storage Pin
Jigar Sheth25-Jul-10 20:38
Jigar Sheth25-Jul-10 20:38 
QuestionWaveInOpen Help?? Pin
AmbiguousName21-Jul-10 19:36
AmbiguousName21-Jul-10 19:36 
AnswerRe: WaveInOpen Help?? Pin
«_Superman_»21-Jul-10 19:38
professional«_Superman_»21-Jul-10 19:38 
QuestionHow can disable a subitem where i use COutlook2Ctrl::OCL_SELECT? Pin
Le@rner21-Jul-10 19:23
Le@rner21-Jul-10 19:23 
Questionhow Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 18:54
zxjun8421-Jul-10 18:54 
AnswerRe: how Does CWinApp realize the singleton pattern? Pin
«_Superman_»21-Jul-10 19:45
professional«_Superman_»21-Jul-10 19:45 
GeneralRe: how Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 20:39
zxjun8421-Jul-10 20:39 
GeneralRe: how Does CWinApp realize the singleton pattern? Pin
«_Superman_»21-Jul-10 21:26
professional«_Superman_»21-Jul-10 21:26 
GeneralRe: how Does CWinApp realize the singleton pattern? Pin
zxjun8421-Jul-10 22:18
zxjun8421-Jul-10 22:18 
Questionproblem between OS of 32bit ans 64 bits Pin
xjh_sz21-Jul-10 15:03
xjh_sz21-Jul-10 15:03 
AnswerRe: problem between OS of 32bit ans 64 bits Pin
«_Superman_»21-Jul-10 19:53
professional«_Superman_»21-Jul-10 19:53 
QuestionCrash Window on Close [modified] Pin
Fareed Rizkalla21-Jul-10 14:10
Fareed Rizkalla21-Jul-10 14:10 
AnswerRe: Crash Window on Close Pin
«_Superman_»21-Jul-10 20:00
professional«_Superman_»21-Jul-10 20:00 
AnswerRe: Crash Window on Close Pin
ThatsAlok22-Jul-10 0:35
ThatsAlok22-Jul-10 0:35 
QuestionMemory Leak Pin
Fareed Rizkalla21-Jul-10 13:36
Fareed Rizkalla21-Jul-10 13:36 
JokeRe: Memory Leak Pin
Maximilien21-Jul-10 13:54
Maximilien21-Jul-10 13:54 
GeneralRe: Memory Leak Pin
Fareed Rizkalla21-Jul-10 14:08
Fareed Rizkalla21-Jul-10 14:08 
AnswerRe: Memory Leak Pin
Aescleal21-Jul-10 22:14
Aescleal21-Jul-10 22:14 
GeneralRe: Memory Leak Pin
David Crow22-Jul-10 3:03
David Crow22-Jul-10 3:03 
QuestionCTabCtrl color background Problem [modified] Pin
etipaq21-Jul-10 5:50
etipaq21-Jul-10 5:50 
Hi all,

I have a problem to set correctly the color background of a CTabCtrl under Windows XP. IT work great under Vista/Seven. But XP still not working after many try.

So you can see 2 print screen (one in Vista and one in XP) you will see that the one on XP don't paint correctly the background windows (right beside the last tab).

http://www.devntic.com/IMAGES/PrintSreenVista.jpg[^]

http://www.devntic.com/IMAGES/printscreenXP.JPG[^]



this is my code to do what you see in these print screen..

I have a Class to manage CTabCtrl --> in this case COnglet (it's Tab in french)

BOOL COnglet::OnEraseBkgnd(CDC* pDC)
{
	//(HDC)wParam3
	RECT rect;
	this->GetWindowRect(&rect);
	::FillRect(pDC->GetSafeHdc(), &rect, static_cast<HBRUSH>(((CDlg_Modele*)m_TabOnglet[0]->ptrEcran)->m_DlgBGColor));

	return FALSE; // don't do the default erase
}


void COnglet::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) 
{	
	CRect rect = lpDrawItemStruct->rcItem;
	rect.top += ::GetSystemMetrics(SM_CYEDGE);
....
...

	pDC->SetBkMode(TRANSPARENT);
	pDC->FillSolidRect(rect, ((CDlg_Modele*)m_TabOnglet[0]->ptrEcran)->m_bgColor);
	
...
...

	pDC->RestoreDC(nSavedDC);
}





Thanks in advance for any help you could provide to me


regard Etienne


PS: sorry, my english is not perfect.

modified on Wednesday, July 21, 2010 3:18 PM

AnswerRe: CTabCtrl color background Problem Pin
Niklas L21-Jul-10 10:12
Niklas L21-Jul-10 10:12 
JokeRe: CTabCtrl color background Problem Pin
Code-o-mat21-Jul-10 10:34
Code-o-mat21-Jul-10 10:34 

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.