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 


Changing my form's bg color

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

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 10, 2009 6:14 pm    Post subject: Changing my form's bg color Reply with quote

Well all I know is I need to handle the WM_CTLCOLORDLG message. Neutral
Back to top
View user's profile Send private message
NoManchesPuto
I post too much
Reputation: 0

Joined: 24 Jan 2009
Posts: 2820

PostPosted: Sat Oct 10, 2009 6:32 pm    Post subject: Reply with quote

What language? Can't you do it via the properties menu?
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sat Oct 10, 2009 6:38 pm    Post subject: Reply with quote

While I believe that it is a good idea to learn Win32, you're a complete tool if you make a serious GUI with it.

1 wrote:
What language? Can't you do it via the properties menu?


Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Oct 10, 2009 7:14 pm    Post subject: Reply with quote

Yes, I can totally use my properties because I made my form using pure win32 APIs w/ no resources.

Flyte: I am creating a simple dialog box with 3 controls, that's it.
Back to top
View user's profile Send private message
Bswap
Newbie cheater
Reputation: 0

Joined: 18 Aug 2009
Posts: 21

PostPosted: Sun Oct 11, 2009 5:36 pm    Post subject: Reply with quote

For future reference, this will make the dialog background colour black. Create any brushes (colours) you want to use in WM_INITDIALOG or WM_CREATE then pass this brush handle in eax in WM_CTLCOLORDLG.

In C you would process WM_CTLCOLORDLG msg then go;

return hBlackBrush

Code:
.const
   CLR_BLACK = 00000000h
 .data?
   hBlackBrush HBRUSH ?
 .code
   ;
   .if wParam == WM_INITDIALOG

      call    CreateSolidBrush, CLR_BLACK
      mov   hBlackBrush, eax

   .elseif wParam == WM_CTLCOLORDLG

      mov   eax, hBlackBrush
      ret
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sun Oct 11, 2009 5:52 pm    Post subject: Reply with quote

Alright, thanks.
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