how can i change the background color of a static control?
please don't give me links to other posts in this forum, coz i've looked in them all and still didn't understand.
how can i change the background color of a static control?
please don't give me links to other posts in this forum, coz i've looked in them all and still didn't understand.
Handle the WM_CTLCOLORSTATIC message.
thanks, it works =)
i have another question:
how can i make the cursor change to that specific cursor (don't know its name) when it hovers the text?
if you want to do it for the whole window it's
Code:LoadCursor(NULL, IDC_IBEAM);
I started out with nothing and I still have most of it left.
but then it will be the cursor even when my mouse isn't over the text right? i want it to be like when u move ur mouse over the text of this message and the cursor changes
algi: doesn't that just load a system icon?? that's got nothing to do with setting it?
hiya: just use SetIcon() to set the icon when the cursor is over text. It's that simple!
but it's in MFC right? and i'm using API
It's not MFC.
Look it up in MSDN
The only way I know of to set a window's cursor when using APIs is by setting the cursor in the WNDCLASSEX structure when the window's class is registered. Maybe you could create your own static control window.
Use SetCursor()
Works fine for me in APICode:HICON hCurDrag, hCurNoDrop; hCurDrag = (HICON)LoadImage(d->hInst, MAKEINTRESOURCE(CUR_DRAG), IMAGE_CURSOR, 0, 0, LR_DEFAULTCOLOR); hCurNoDrop = (HICON)LoadImage(d->hInst, MAKEINTRESOURCE(CUR_NODROP), IMAGE_CURSOR, 0, 0, LR_DEFAULTCOLOR); SetCursor(hCurDrag); SetCursor(hNoDrop);
hehe you said SetIcon at start (i also didn't notice it has nothing to do with cursors).
ok it's ok now, thanks.