Click to See Complete Forum and Search --> : How to change background color


sheetal
June 29th, 1999, 09:56 AM
Am vb chap with little knowlege of vc/mfc/subclassing

I am using an API call CreateWindowsEx function
to create an windows with SysAnimate32 Class
I want to change the background color of this
window
I have set dwexstyle to WS_EX_TRANSPARENT
I have also tried setwindowlong and
setbkmode,setbkcolor
but nothing seems to working !
any help would be appriciated

Gerd Mayer
June 30th, 1999, 05:06 PM
Hi,
SetBkColor is only for Text - OutPut.
But if you want to change the BK color of the window, you must handle the message
WM_CTLCOLOR
There, you can return your self - defined brush ( use a CBrush - object - member varaiable in your window class)
Good luck