Click here to Skip to main content
15,887,864 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: looking for particular xp color Pin
Iain Clarke, Warrior Programmer30-Nov-04 0:59
Iain Clarke, Warrior Programmer30-Nov-04 0:59 
GeneralRe: looking for particular xp color Pin
dude7730-Nov-04 2:15
dude7730-Nov-04 2:15 
GeneralRe: looking for particular xp color Pin
Marcus Spitzmiller30-Nov-04 3:23
Marcus Spitzmiller30-Nov-04 3:23 
GeneralRe: looking for particular xp color Pin
dude7730-Nov-04 3:44
dude7730-Nov-04 3:44 
GeneralRe: looking for particular xp color Pin
Marcus Spitzmiller30-Nov-04 4:00
Marcus Spitzmiller30-Nov-04 4:00 
GeneralRe: looking for particular xp color Pin
dude7730-Nov-04 4:33
dude7730-Nov-04 4:33 
GeneralRe: looking for particular xp color Pin
Iain Clarke, Warrior Programmer30-Nov-04 3:50
Iain Clarke, Warrior Programmer30-Nov-04 3:50 
GeneralRe: looking for particular xp color Pin
Iain Clarke, Warrior Programmer30-Nov-04 4:08
Iain Clarke, Warrior Programmer30-Nov-04 4:08 
I've been experimenting, and made a small SDI application.
I added the following code to the OnDraw method of the view:

void CColourTestView::OnDraw(CDC* pDC)
{
	CColourTestDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here

	CRect rc;
	GetClientRect (&rc);

	pDC->FillSolidRect (&rc, RGB(255,0,0));  // Make a red border.
	rc.DeflateRect (20,20);
	pDC->FillSolidRect (&rc, GetSysColor (COLOR_3DSHADOW)); // Fill the bulk with BK colour.

}


On 2000, changing the colours gets reflected in the view.
Most colours are grey, but it does work.

In XP, if you choose Windows And Buttons to be Windows Classic
Style
, then choose a colour scheme, it works.

But select Windows XP Style, and it stops working (as
you've seen yourself).

This is because XP used the Theme API to draw UI elements.
So a "DrawThemedButton" API function can add shiny 3D effects
and so on.

Unfortunately, I've not used the Theme API, so my help runs
out at this point. But at least you know where to look! And
there are several articles on Theming here on CP.

Iain.
GeneralRe: looking for particular xp color Pin
dude7730-Nov-04 4:23
dude7730-Nov-04 4:23 
GeneralRe: looking for particular xp color Pin
Iain Clarke, Warrior Programmer30-Nov-04 5:19
Iain Clarke, Warrior Programmer30-Nov-04 5:19 
GeneralRe: looking for particular xp color Pin
dude7730-Nov-04 5:56
dude7730-Nov-04 5:56 
QuestionHow to detect Windows shutting down Pin
normanS30-Nov-04 0:16
normanS30-Nov-04 0:16 
AnswerRe: How to detect Windows shutting down Pin
ThatsAlok30-Nov-04 0:36
ThatsAlok30-Nov-04 0:36 
GeneralRe: How to detect Windows shutting down Pin
normanS30-Nov-04 19:19
normanS30-Nov-04 19:19 
GeneralDocking deskband on the right side of the window Pin
kumarbp30-Nov-04 0:02
kumarbp30-Nov-04 0:02 
GeneralMFC Dialog Box Caption Pin
shijuck29-Nov-04 23:57
shijuck29-Nov-04 23:57 
GeneralRe: MFC Dialog Box Caption Pin
Iain Clarke, Warrior Programmer30-Nov-04 0:44
Iain Clarke, Warrior Programmer30-Nov-04 0:44 
GeneralDisabling ALT-TAB Pin
Atlence29-Nov-04 22:48
Atlence29-Nov-04 22:48 
GeneralFormat Conversion Pin
Anonymous29-Nov-04 22:46
Anonymous29-Nov-04 22:46 
GeneralRe: Format Conversion Pin
Arsalan Malik29-Nov-04 23:09
Arsalan Malik29-Nov-04 23:09 
GeneralRe: Format Conversion Pin
David Crow30-Nov-04 3:03
David Crow30-Nov-04 3:03 
GeneralDialog Resource Problem Pin
Member 1697729-Nov-04 21:51
Member 1697729-Nov-04 21:51 
Questionhow to restricted browser Pin
vc-programmer-29-Nov-04 21:43
vc-programmer-29-Nov-04 21:43 
AnswerRe: how to restricted browser Pin
ThatsAlok30-Nov-04 0:58
ThatsAlok30-Nov-04 0:58 
Questionwhat the hell is this grammar all about Pin
LiYS29-Nov-04 21:20
LiYS29-Nov-04 21:20 

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.