How can I change the window color (in C++)

Cd4ab42f26b55d276e932167c53a2b6a
0
The_Crash 101 Oct 18, 2005 at 13:41

Good Day..:lol:
I Want To Change The Window Color in C++ From The Code..I Cann’t Change it as far as From The Inside Of Language:blink: ..Can I Use An Api function ..to take note of I Use The

Dialog Wizard .
Thank You

21 Replies

Please log in or register to post a reply.

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Oct 18, 2005 at 15:53

Why Are You Writing Each First Letter Of Each Word In Capital?

And what is “the window color”? Be more specific. Do you mean the background color of a simple dialog? If you do, you can either handle the WM_ERASEBKGND message and clear the background in the color you like (using FillRect()), or set the background brush using SetClassLong on your dialog’s window class.

2b97deded6213469bcd87b65cce5d014
0
Mihail121 102 Oct 18, 2005 at 16:54

@.oisyn

Why Are You Writing Each First Letter Of Each Word In Capital?

What’s wrong with that If I my ask?

Cd4ab42f26b55d276e932167c53a2b6a
0
The_Crash 101 Oct 18, 2005 at 18:48

Thank You .oisyn & Mihail121..

Why Are You Writing Each First Letter Of Each Word In Capital?

I think That The Typical ENGLISH Do That..and that more beautiful..But If That anger I Will write in the way that you Like :lol:
I ment background color of a simple dialog..I Understand your method but I need an examlpe in code of this Messages because I am a beginner .. :lol:

F6ad85487ec271d99a0ef7a4e1b426d6
0
corey 101 Oct 18, 2005 at 19:20
340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Oct 19, 2005 at 09:35

@Mihail121

What’s wrong with that If I my ask?

Maybe it’s just me, but I think it’s hard to read, just like writing in all caps. Because it has a meaning; you’re putting the emphasis on every word in the sentence and it’s harder to distinguish where one sentence ends and the other starts.

Cd4ab42f26b55d276e932167c53a2b6a
0
The_Crash 101 Oct 25, 2005 at 18:10

Thank yOU ………

2b97deded6213469bcd87b65cce5d014
0
Mihail121 102 Oct 25, 2005 at 18:29

@.oisyn

Maybe it’s just me, but I think it’s hard to read, just like writing in all caps. Because it has a meaning; you’re putting the emphasis on every word in the sentence and it’s harder to distinguish where one sentence ends and the other starts.

I agree but according to a linguistical theory a pure language should only concern the correct understanding of the message and should not follow any grammatical, lexical or etc. rules.

Another interesting theory states, that it’s enough writing only the first and last letter of each word at their correct places to read the whole. Just as that:

My pgis aer gnoe!!!

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Oct 25, 2005 at 21:04

Another interesting theory states, that it’s enough writing only the first and last letter of each word at their correct places to read the whole.

Yaeh tihs is ture. I rmemeber wehn it aslo cmae up on filpcdoe. But it’s ichty to wirte a lot in taht pratiuclar sytle. Lol.

p.s there was actually some study behind not only a theory.

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Oct 26, 2005 at 10:51

@Mihail121

I agree but according to a linguistical theory a pure language should only concern the correct understanding of the message and should not follow any grammatical, lexical or etc. rules.

Unfortunately we did not grow up with such a pure language and thus we have learned to interprete grammar and symbols, and it’s very hard to get rid of those automatic interpretations :)

2b97deded6213469bcd87b65cce5d014
0
Mihail121 102 Oct 26, 2005 at 11:44

moe: yse, I tihnk so, btu I cna’t fnid ayn mroe ifno on it :(

.oisyn: yes, you’re right however it’s not impossible. The question is if we should all continue using a spefic common style and most importantly - why?

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Oct 26, 2005 at 12:41

First plz note I stay off topic only because the original question has been answered. So I shouldn’t be drawing attention away from it.

Those who learn English at school or in a course will be told that in English you write all letters small. There are very few exceptions:
- first letter in a sentence
- the word “I”
- most of the words in a title (except things like “of”, “for”…)

The reason why people think it is strange to do otherwise is because we are slaves of habitude.

Mihail121: maybe this is what you were looking for http://www.snopes.com/language/apocryph/cambridge.asp

6f0a333c785da81d479a0f58c2ccb203
0
monjardin 102 Oct 26, 2005 at 12:59

It’s hrad to gogloe for tihs sutff thugoh.

Cd4ab42f26b55d276e932167c53a2b6a
0
The_Crash 101 Oct 29, 2005 at 05:15

Are you still speaking on this point? :lol:
I think this write will take your admire \^.\^..Are you satisfied \^.\^ ?
I take this grammer from 12 years untill this moment ..but I write by this way because we write like this in C++..
But just a moment ..my question was on MFC and you answered on API ..
Get me the suitable answer before argument in grammer :lol: \^.\^.
Eias

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 29, 2005 at 07:04

You never mentioned that you were using MFC in the original post. His answer was perfectly valid. In fact, you specifically asked if you could use an API function :-D

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Oct 29, 2005 at 17:34

You wrote yourself

Thank yOU ………

This let’s people assume your question has been answered…

Now you say you need an answer in MFC. What’s wrong with the link posted by corey?

Assuming that you’re using MFC:

http://support.microsoft.com/default…b;en-us;103786

corey

Maybe it would be helpful if you could point out what didn’t work or why that wasn’t helpful. Like this I have honestly no clue where your problem lies. Did you try and it didn’t work?

Cd4ab42f26b55d276e932167c53a2b6a
0
The_Crash 101 Oct 29, 2005 at 20:58

The link is not able to open now !!!!
but I mean there are diffrence between
The function and the Message ..
I hope you understand me.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Oct 29, 2005 at 21:18

The correct link is http://support.microsoft.com/default.aspx?scid=kb;en-us;103786. (DevMaster’s forum software automatically shortens long links by placing a “…” in the displayed text.)

Anyway, there is no real difference between handling WM_ERASEBKGND and implementing CWnd::OnEraseBkgnd. The MFC is simply a thin wrapper over the Windows API; it causes that function to be called when the window recieves that message.

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Oct 29, 2005 at 21:54

Sorry about the broken link I just copy-pasted the earlier post and didn’t check if it would work. My bad, didn’t mean to be more confusing.

7080263e628a42ddfb94033a1ff7af83
0
mstr99 101 Nov 01, 2005 at 12:03

@Mihail121

Another interesting theory states, that it’s enough writing only the first and last letter of each word at their correct places to read the whole. Just as that: My pgis aer gnoe!!!

Try this one:

And waeehrs in msot peioonfrsss tehse wluod be caeiobdlnrse daabckrws, in caeehrrtd aaoutcccnny tehy are a piiovste boon.

:w00t:

340bf64ac6abda6e40f7e860279823cb
0
_oisyn 101 Nov 01, 2005 at 15:40

Tough one, for some of the words it took me a while to understand, and “caeehrrtd” I just can’t figure out :)

“And whereas in most professions these would be considerable drawbacks, in ??? accountancy they are a positive boon”

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Nov 01, 2005 at 18:51

nice sample
caeehrrtd -> chartered
so i am not all sure :)