Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Setting the background of a static control C

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu May 20, 2010 1:40 am    Post subject: Setting the background of a static control C Reply with quote

I created a static control on a window that created with background style: COLOR_3DHIGHLIGHT.
And the background of the static control still has the default color of the gray window as you can see at the picture:
[img]
http://img38.yfrog.com/img38/1719/staticr.jpg
[/img]
how would i set it's background to the window's color?

_________________
Stylo
Back to top
View user's profile Send private message
Dami
Master Cheater
Reputation: 0

Joined: 23 Oct 2006
Posts: 336

PostPosted: Thu May 20, 2010 8:15 am    Post subject: Reply with quote

I was actually just wondering this same thing as i just picked up with Win32 API c++~
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu May 20, 2010 9:12 am    Post subject: This post has 1 review(s) Reply with quote

uggh, this is one of the things that i absolutely hate about the win32 stuff.

look into: WM_CTLCOLORSTATIC + SetBkMode()
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu May 20, 2010 11:45 am    Post subject: Reply with quote

Well, i've reached this situation
Code:

case WM_CTLCOLORSTATIC:
      if ((HWND)lParam == static_status) {
         SetBkMode((HDC)wParam,OPAQUE);
      }

but the background is still remains the same

_________________
Stylo
Back to top
View user's profile Send private message
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Thu May 20, 2010 1:36 pm    Post subject: Reply with quote

Not sure, but doesn't lParam have a low/high word?
Back to top
View user's profile Send private message
Dami
Master Cheater
Reputation: 0

Joined: 23 Oct 2006
Posts: 336

PostPosted: Thu May 20, 2010 2:25 pm    Post subject: Reply with quote

slovach wrote:
uggh, this is one of the things that i absolutely hate about the win32 stuff.

look into: WM_CTLCOLORSTATIC + SetBkMode()


Thanks mate, that solved my problem.
And here i was spending time on looking at the styles if i had missed one part O.o

+1 for you.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Thu May 20, 2010 2:43 pm    Post subject: Reply with quote

Därk Byte wrote:
Not sure, but doesn't lParam have a low/high word?

http://msdn.microsoft.com/en-us/library/bb787524%28VS.85%29.aspx
lParam is the handle to the static control
Dam!! what the hell is wrong here :s

_________________
Stylo
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu May 20, 2010 3:15 pm    Post subject: Reply with quote

Stylo wrote:
Well, i've reached this situation
Code:

case WM_CTLCOLORSTATIC:
      if ((HWND)lParam == static_status) {
         SetBkMode((HDC)wParam,OPAQUE);
      }

but the background is still remains the same


try TRANSPARENT instead.
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Fri May 21, 2010 12:54 am    Post subject: Reply with quote

slovach wrote:
Stylo wrote:
Well, i've reached this situation
Code:

case WM_CTLCOLORSTATIC:
      if ((HWND)lParam == static_status) {
         SetBkMode((HDC)wParam,OPAQUE);
      }

but the background is still remains the same


try TRANSPARENT instead.

Tried that already, didn't help.
Did you make it?

_________________
Stylo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites