Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
in the name of allah
have a good time

i'm working on a graphical project so i should write the drawing codes in WM_PAINT event to do it's work, but when i paint the background of the form, the child window like Button, Text and ... will redraw and owner image of that will clear.
how can i draw the owner picture of an object( Buttons ...) or what event can manages it?
unlikely the WM_PAINT can't do it.

thanks in advance
Posted
Comments
Richard MacCutchan 4-Oct-14 4:17am    
WM_PAINT is exactly the correct message to perform all this work, but it is not clear what your problem is. Maybe you could show some of the code and indicate where it is failing.
Sergey Alexandrovich Kryukov 4-Oct-14 7:29am    
Not clear at all.
—SA
Mahdi Nejadsahebi 4-Oct-14 8:17am    
i want to draw a picture on the button and another picture for the background(CWnd Dialog).
i write the drawing button and background's pictures in the WM_PAINT ,but when i click on the button,
the button's picture will clear and the background's picture will draw crrectly.
really i want to manage the WM_PAINT of button(or even each objects).
Style-7 7-Oct-14 4:30am    
For button use BM_SETIMAGE
Mahdi Nejadsahebi 8-Oct-14 0:18am    
can you tell me what the BM_SETIMAGE is?
event or function?
how can i use that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900