Click here to Skip to main content
15,895,799 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: CTabCtrl color background Problem Pin
Niklas L21-Jul-10 10:54
Niklas L21-Jul-10 10:54 
GeneralRe: CTabCtrl color background Problem Pin
etipaq21-Jul-10 15:59
etipaq21-Jul-10 15:59 
QuestionCharacter Exception Pin
Pryabu21-Jul-10 3:54
Pryabu21-Jul-10 3:54 
AnswerRe: Character Exception PinPopular
Aescleal21-Jul-10 4:15
Aescleal21-Jul-10 4:15 
AnswerRe: Character Exception Pin
Sauro Viti21-Jul-10 4:35
professionalSauro Viti21-Jul-10 4:35 
GeneralRe: Character Exception Pin
Aescleal21-Jul-10 4:55
Aescleal21-Jul-10 4:55 
GeneralRe: Character Exception Pin
Richard MacCutchan21-Jul-10 5:19
mveRichard MacCutchan21-Jul-10 5:19 
AnswerRe: Character Exception Pin
Chris Losinger21-Jul-10 4:36
professionalChris Losinger21-Jul-10 4:36 
AnswerRe: Character Exception Pin
Cool_Dev21-Jul-10 4:38
Cool_Dev21-Jul-10 4:38 
Question关于32/64位操作系统下,应用程序兼容性问题 Pin
xjh_sz20-Jul-10 23:38
xjh_sz20-Jul-10 23:38 
AnswerRe: 关于32/64位操作系统下,应用程序兼容性问题 PinPopular
Richard MacCutchan21-Jul-10 0:13
mveRichard MacCutchan21-Jul-10 0:13 
AnswerRe: 关于32/64位操作系统下,应用程序兼容性问题 Pin
Sauro Viti21-Jul-10 1:00
professionalSauro Viti21-Jul-10 1:00 
AnswerRe: 关于32/64位操作系统下,应用程序兼容性问题 Pin
Luc Pattyn21-Jul-10 14:41
sitebuilderLuc Pattyn21-Jul-10 14:41 
QuestionRe: About 32/64 bit operating system, application compatibility issues Pin
David Crow21-Jul-10 3:09
David Crow21-Jul-10 3:09 
JokeRe: About 32/64 bit operating system, application compatibility issues Pin
Yusuf21-Jul-10 7:08
Yusuf21-Jul-10 7:08 

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.