After a couple days of looking and trying, I have become weary. WM_CTLCOLORxxx is used to color controls on startup, so how do you change them on the fly? I have tried working with WM_PAINT and InvalidateRect, but have not had any success.
Posted on 2009-03-15 07:48:55 by green
Finally found the answer and here it is:
		mov colx,00000000h

.elseif eax==WM_CTLCOLOREDIT
mov eax,lParam
.if eax==hIDC_EDT1
    invoke SetTextColor,wParam,Red
    invoke SetBkMode,wParam,OPAQUE
    invoke SetBkColor,wParam,Black ; Background color of text
    invoke CreateSolidBrush,colx ; Background color of control
.elseif eax==WM_COMMAND
mov eax,wParam
and eax,0FFFFh
.if eax==BTN_STATIC
mov colx,00FF0000h
invoke GetClientRect,hIDC_EDT1,addr rect
invoke InvalidateRect,hIDC_EDT1,addr rect,TRUE

This will first set the background to black on startup. Press the button and get blue. If anyone finds any issues, let me know.
Posted on 2009-03-15 17:52:27 by green
Remember to deselect/destroy old handles, though, in order to avoid leaks :)
Posted on 2009-03-15 21:09:23 by f0dder
And you don't need to get the client rect and pass it to InvalidateRect... just pass NULL instead, and it will be the same effect (the whole client area)
Posted on 2009-03-15 22:04:57 by comrade
Thanks for the additional help, it is all appreciated.
Posted on 2009-03-16 14:27:26 by green