Jump to content


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


21 replies to this topic

#1 The Crash

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 18 October 2005 - 01:41 PM

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
VB.NET \VB6\C++

#2 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 18 October 2005 - 03:53 PM

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.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#3 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1059 posts

Posted 18 October 2005 - 04:54 PM

.oisyn said:

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

What's wrong with that If I my ask?

#4 The Crash

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 18 October 2005 - 06:48 PM

Thank You .oisyn & Mihail121..

Quote

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:
VB.NET \VB6\C++

#5 corey

    Member

  • Members
  • PipPip
  • 78 posts

Posted 18 October 2005 - 07:20 PM

Assuming that you're using MFC:

http://support.micro...kb;en-us;103786

corey

#6 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 19 October 2005 - 09:35 AM

Mihail121 said:

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.
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#7 The Crash

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 25 October 2005 - 06:10 PM

Thank yOU .........
VB.NET \VB6\C++

#8 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1059 posts

Posted 25 October 2005 - 06:29 PM

.oisyn said:

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!!!

#9 moe

    Valued Member

  • Members
  • PipPipPip
  • 276 posts

Posted 25 October 2005 - 09:04 PM

Quote

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.

#10 .oisyn

    DevMaster Staff

  • Moderators
  • 1842 posts

Posted 26 October 2005 - 10:51 AM

Mihail121 said:

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 :)
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#11 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1059 posts

Posted 26 October 2005 - 11: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?

#12 moe

    Valued Member

  • Members
  • PipPipPip
  • 276 posts

Posted 26 October 2005 - 12:41 PM

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.co...h/cambridge.asp

#13 monjardin

    Senior Member

  • Members
  • PipPipPipPip
  • 1033 posts

Posted 26 October 2005 - 12:59 PM

It's hrad to gogloe for tihs sutff thugoh.

#14 The Crash

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 29 October 2005 - 05:15 AM

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
VB.NET \VB6\C++

#15 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 29 October 2005 - 07: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
reedbeta.com - developer blog, OpenGL demos, and other projects

#16 moe

    Valued Member

  • Members
  • PipPipPip
  • 276 posts

Posted 29 October 2005 - 05:34 PM

You wrote yourself

Quote

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?

Quote

Assuming that you're using MFC:

http://support.micro....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?

#17 The Crash

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 29 October 2005 - 08: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.
VB.NET \VB6\C++

#18 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 29 October 2005 - 09:18 PM

The correct link is http://support.micro...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.
reedbeta.com - developer blog, OpenGL demos, and other projects

#19 moe

    Valued Member

  • Members
  • PipPipPip
  • 276 posts

Posted 29 October 2005 - 09: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.

#20 mstr99

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 November 2005 - 12:03 PM

Mihail121 said:

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:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users