|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hello,
I was wondering how I could get my owner draw buttons to repaint. For example, I want them to repaint when a user clicks the mouse...I tried sending a WM_DRAWITEM message, but that doesn't seem to work. Any suggestions would be great. (win32 and c) Thanks |
|
#2
|
||||
|
||||
|
Are you sure that your owner-drawn buttons have the BS_OWNERDRAW style set?
|
|
#3
|
|||
|
|||
|
Hey,
I'm positive that I am...I am manually drawing my button. Maybe I'm just getting the lParam and wParam wrong when sending the WM_DRAWITEM message. THe format that I am using is, lParam = NULL, and wParam = ID of control sending the message. |
|
#4
|
||||
|
||||
|
lParam should be a pointer to a DRAWITEMSTRUCT structure. See http://msdn.microsoft.com/library/d...wm_drawitem.asp for details.
Also, here's an example using a button control (using MFC though, but you should be able to adapt it to your needs), http://msdn.microsoft.com/library/d...3a.drawitem.asp |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Manually repainting owner draw buttons? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|