i am drawing graphics on a static control in a ddt dialog, which has other controls
that are looked after by ddt itself. what is the correct way to process the wm_paint
message in the dialog's callback procedure?
pseudocode:
in lance's example at:
http://www.powerbasic.com/support/pb...ead.php?t=1625
he puts function=1 to stop ddt doing its own wm_paint processing, but in that
example he has updated the whole dialog - there are no other controls.
in my case, function=1 stops ddt from drawing its own buttons.
the problem i get is that sometimes my graphics control comes out plain grey
(particularly after a screen save). this is probably because ddt has done its
screen update first and has validated the entire dialog area, leaving my beginpaint
routine no remaining unvalidated areas on which to draw. conversely, if i get
to draw first, my endpaint validates my static control, usually preventing ddt
from painting over it.
how do i get my wm_paint to run before ddt paints the remainder of the dialog?
should i use getdc in place of beginpaint?
regards, simon
that are looked after by ddt itself. what is the correct way to process the wm_paint
message in the dialog's callback procedure?
pseudocode:
Code:
callback function mydlgproc select case cbmsg ... case %wm_paint control handle cbhndl, %idstatic to hstatic hdc=beginpaint(hstatic,lppaint) .... gdi drawing commands using hdc endpaint hstatic,lppaint function=??? end select end function
http://www.powerbasic.com/support/pb...ead.php?t=1625
he puts function=1 to stop ddt doing its own wm_paint processing, but in that
example he has updated the whole dialog - there are no other controls.
in my case, function=1 stops ddt from drawing its own buttons.
the problem i get is that sometimes my graphics control comes out plain grey
(particularly after a screen save). this is probably because ddt has done its
screen update first and has validated the entire dialog area, leaving my beginpaint
routine no remaining unvalidated areas on which to draw. conversely, if i get
to draw first, my endpaint validates my static control, usually preventing ddt
from painting over it.
how do i get my wm_paint to run before ddt paints the remainder of the dialog?
should i use getdc in place of beginpaint?
regards, simon
Comment