PDA

View Full Version : How can I change the window color (in C++)


The Crash
10-18-2005, 06:41 AM
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

.oisyn
10-18-2005, 08:53 AM
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.

Mihail121
10-18-2005, 09:54 AM
Why Are You Writing Each First Letter Of Each Word In Capital?


What's wrong with that If I my ask?

The Crash
10-18-2005, 11:48 AM
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:

corey
10-18-2005, 12:20 PM
Assuming that you're using MFC:

http://support.microsoft.com/default.aspx?scid=kb;en-us;103786

corey

.oisyn
10-19-2005, 02:35 AM
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.

The Crash
10-25-2005, 11:10 AM
Thank yOU .........

Mihail121
10-25-2005, 11:29 AM
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!!!

moe
10-25-2005, 02:04 PM
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.

.oisyn
10-26-2005, 03:51 AM
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 ;)

Mihail121
10-26-2005, 04:44 AM
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?

moe
10-26-2005, 05:41 AM
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

monjardin
10-26-2005, 05:59 AM
It's hrad to gogloe for tihs sutff thugoh.

The Crash
10-28-2005, 10:15 PM
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

Reedbeta
10-29-2005, 12:04 AM
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

moe
10-29-2005, 10:34 AM
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?

The Crash
10-29-2005, 01:58 PM
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.

Reedbeta
10-29-2005, 02:18 PM
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.

moe
10-29-2005, 02:54 PM
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.

mstr99
11-01-2005, 04:03 AM
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:

.oisyn
11-01-2005, 07:40 AM
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"

moe
11-01-2005, 10:51 AM
nice sample
caeehrrtd -> chartered
so i am not all sure :)