| View previous topic :: View next topic |
| Author |
Message |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sat Oct 10, 2009 6:14 pm Post subject: Changing my form's bg color |
|
|
Well all I know is I need to handle the WM_CTLCOLORDLG message.
|
|
| Back to top |
|
 |
NoManchesPuto I post too much
Reputation: 0
Joined: 24 Jan 2009 Posts: 2820
|
Posted: Sat Oct 10, 2009 6:32 pm Post subject: |
|
|
| What language? Can't you do it via the properties menu?
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sat Oct 10, 2009 6:38 pm Post subject: |
|
|
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 |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sat Oct 10, 2009 7:14 pm Post subject: |
|
|
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 |
|
 |
Bswap Newbie cheater
Reputation: 0
Joined: 18 Aug 2009 Posts: 21
|
Posted: Sun Oct 11, 2009 5:36 pm Post subject: |
|
|
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 |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sun Oct 11, 2009 5:52 pm Post subject: |
|
|
| Alright, thanks.
|
|
| Back to top |
|
 |
|