Click here to Skip to main content
15,886,101 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Global Hit Test Pin
Parthi_Appu15-Mar-07 1:39
Parthi_Appu15-Mar-07 1:39 
GeneralRe: Global Hit Test Pin
Sydes15-Mar-07 1:41
Sydes15-Mar-07 1:41 
QuestionMouse move Pin
deeps_cute15-Mar-07 1:23
deeps_cute15-Mar-07 1:23 
AnswerRe: Mouse move Pin
_AnsHUMAN_ 15-Mar-07 1:27
_AnsHUMAN_ 15-Mar-07 1:27 
QuestionRe: Mouse move Pin
CPallini15-Mar-07 1:29
mveCPallini15-Mar-07 1:29 
AnswerRe: Mouse move Pin
deeps_cute15-Mar-07 1:35
deeps_cute15-Mar-07 1:35 
AnswerRe: Mouse move Pin
prasad_som15-Mar-07 2:06
prasad_som15-Mar-07 2:06 
GeneralRe: Mouse move Pin
Mike Dimmick15-Mar-07 3:03
Mike Dimmick15-Mar-07 3:03 
I recommend reading "Programming Windows, Fifth Edition" by Charles Petzold.

Invalidate is used to inform Windows that the window needs redrawing. When the thread's input queue is otherwise idle, Windows will generate a WM_PAINT message for any window that has an invalid region. This has two effects: it centralises all painting in the WM_PAINT handler, and it defers painting until all the user's input has been processed. To inform Windows that an area of the window needs repainting, use InvalidateRect or InvalidateRgn. Multiple calls to InvalidateRect or InvalidateRgn build up an invalid region.

In your WM_PAINT handler, you can find out from the device context which areas of the window are invalid and hence need repainting. The PAINTSTRUCT returned by BeginPaint (from MFC, the CPaintDC's m_ps member) has a member rcPaint which is the bounding box of the invalid region. If you want to get the invalid region itself, you can call GetUpdateRgn but you need to call it before BeginPaint (i.e. before constructing your CPaintDC for an MFC window).

Stability. What an interesting concept. -- Chris Maunder

AnswerRe: Mouse move Pin
ThatsAlok15-Mar-07 1:36
ThatsAlok15-Mar-07 1:36 
GeneralRe: Mouse move Pin
Rajesh R Subramanian15-Mar-07 19:04
professionalRajesh R Subramanian15-Mar-07 19:04 
GeneralRe: Mouse move Pin
ThatsAlok15-Mar-07 19:22
ThatsAlok15-Mar-07 19:22 
QuestionUnhandled exception Pin
RajiRaghu14-Mar-07 23:57
RajiRaghu14-Mar-07 23:57 
GeneralRe: Unhandled exception Pin
prasad_som14-Mar-07 23:59
prasad_som14-Mar-07 23:59 
AnswerRe: Unhandled exception Pin
benjymous15-Mar-07 0:15
benjymous15-Mar-07 0:15 
GeneralRe: Unhandled exception Pin
RajiRaghu15-Mar-07 0:19
RajiRaghu15-Mar-07 0:19 
QuestionRe: Unhandled exception Pin
prasad_som15-Mar-07 0:22
prasad_som15-Mar-07 0:22 
AnswerRe: Unhandled exception Pin
cp987615-Mar-07 0:47
cp987615-Mar-07 0:47 
QuestionLock Window Refresh Pin
baerten14-Mar-07 23:57
baerten14-Mar-07 23:57 
AnswerRe: Lock Window Refresh Pin
Stephen Hewitt15-Mar-07 13:07
Stephen Hewitt15-Mar-07 13:07 
GeneralRe: Lock Window Refresh Pin
baerten19-Mar-07 23:06
baerten19-Mar-07 23:06 
Questionicon on button Pin
janpoo14-Mar-07 23:16
janpoo14-Mar-07 23:16 
QuestionRe: icon on button Pin
prasad_som14-Mar-07 23:56
prasad_som14-Mar-07 23:56 
AnswerRe: icon on button Pin
Hamid_RT15-Mar-07 19:24
Hamid_RT15-Mar-07 19:24 
AnswerRe: icon on button Pin
ThatsAlok15-Mar-07 20:37
ThatsAlok15-Mar-07 20:37 
QuestionNew to VC++ Pin
Cmania14-Mar-07 22:42
Cmania14-Mar-07 22:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.