Controls redrawn in odd places??
-
Hello, I have a dialog bar that contains the following SliderCtrl message handler:
OnCustomdrawSliderProg(NMHDR* pNMHDR, LRESULT* pResult)
Inside this handler, I call another function to update a 2nd dialog bar's windows. However, when this occurs, the slider control is randomly (time) redrawn on the 2nd dialogbar's client area at random places. I assume I'm mixing device contexts somehow. Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar. Has anyone a solution for a clean way to do this? I've tried to handle the lose-focus SliderCtrl message (works without odd slider drawing), but then if the user uses the arrow keys, the 2nd dialog bar is not updated. Thanks! JennyP -
Hello, I have a dialog bar that contains the following SliderCtrl message handler:
OnCustomdrawSliderProg(NMHDR* pNMHDR, LRESULT* pResult)
Inside this handler, I call another function to update a 2nd dialog bar's windows. However, when this occurs, the slider control is randomly (time) redrawn on the 2nd dialogbar's client area at random places. I assume I'm mixing device contexts somehow. Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar. Has anyone a solution for a clean way to do this? I've tried to handle the lose-focus SliderCtrl message (works without odd slider drawing), but then if the user uses the arrow keys, the 2nd dialog bar is not updated. Thanks! JennyPJennyP wrote: Functionally I want my 2nd dialog bar to have a 'live' response to a user adjusting the CSliderCtrl on the 1st dialog bar Handle WM_HSCROLL - this message is sent whenever thumb is moved using mouse/keyboard. When user releases the mouse, you'll get WM_HSCROLL with TB_ENDTRACK code. You'll also get TB_ENDTRACK after each keypress changing thumb position. Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?