Click here to Skip to main content
15,914,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralClient Area Pin
syedhassan43-Feb-02 7:48
syedhassan43-Feb-02 7:48 
GeneralRe: Client Area Pin
PJ Arends3-Feb-02 9:47
professionalPJ Arends3-Feb-02 9:47 
GeneralWTL CHyperLink errors Pin
IGx893-Feb-02 7:45
IGx893-Feb-02 7:45 
GeneralAccess a control from a DLL Pin
NikoTanghe3-Feb-02 7:34
NikoTanghe3-Feb-02 7:34 
GeneralRe: Access a control from a DLL Pin
Joaquín M López Muñoz3-Feb-02 9:01
Joaquín M López Muñoz3-Feb-02 9:01 
GeneralRe: Access a control from a DLL Pin
Mazdak3-Feb-02 10:01
Mazdak3-Feb-02 10:01 
QuestionBest way to use a clipping region? Pin
Jay Beckert3-Feb-02 7:02
Jay Beckert3-Feb-02 7:02 
AnswerRe: Best way to use a clipping region? Pin
Paul M Watt3-Feb-02 14:30
mentorPaul M Watt3-Feb-02 14:30 
Feng Yuans's book is very good, But I do not think that there is anything in his book about hittesting.

What you can do is call the SetCapture function which will capture the mouse for the target window that wants to capture and contain the mouse. Then you can handle the WM_NCHITTEST message for that window. This message is called every time a mouse message is generated such as a WM_MOUSEMOVE, WM_LBUTTONDOWN and even the NC versions of all of these messages. There are about 20 altogether.

Inside of your WM_NCHITTEST handler you can determine the current position of the cursor. Use this data to determine if the cursor is in the region that you want to use to contain the cursor. Use the PtInRegion function. If the cursor is outside of the region call the SetCursorPos function to clip the position of the cursor.
GeneralSearch for a certain character in a sentence Pin
3-Feb-02 6:38
suss3-Feb-02 6:38 
GeneralRe: Search for a certain character in a sentence Pin
Vladimir Georgiev3-Feb-02 7:21
Vladimir Georgiev3-Feb-02 7:21 
GeneralRe: Search for a certain character in a sentence Pin
Fredrik Skog4-Feb-02 0:10
Fredrik Skog4-Feb-02 0:10 
QuestionHow can I tab through a MsFlexGrid control? Pin
DanYELL3-Feb-02 6:33
DanYELL3-Feb-02 6:33 
AnswerRe: How can I tab through a MsFlexGrid control? Pin
Mazdak3-Feb-02 6:41
Mazdak3-Feb-02 6:41 
Generalloading icon to mainframe Pin
3-Feb-02 5:58
suss3-Feb-02 5:58 
GeneralRe: loading icon to mainframe Pin
Mazdak3-Feb-02 7:01
Mazdak3-Feb-02 7:01 
GeneralRe: loading icon to mainframe Pin
3-Feb-02 13:41
suss3-Feb-02 13:41 
GeneralRe: loading icon to mainframe Pin
Jay Beckert3-Feb-02 14:57
Jay Beckert3-Feb-02 14:57 
GeneralRe: loading icon to mainframe Pin
Jay Beckert3-Feb-02 15:09
Jay Beckert3-Feb-02 15:09 
GeneralRe: loading icon to mainframe Pin
Fredrik Skog4-Feb-02 0:17
Fredrik Skog4-Feb-02 0:17 
GeneralRe: loading icon to mainframe Pin
5-Feb-02 2:08
suss5-Feb-02 2:08 
Generalan event from comm-port Pin
Sergei3-Feb-02 3:32
Sergei3-Feb-02 3:32 
GeneralRe: an event from comm-port Pin
.:: RockNix ::.3-Feb-02 21:37
.:: RockNix ::.3-Feb-02 21:37 
GeneralPrinter Pin
Stan the man3-Feb-02 2:04
Stan the man3-Feb-02 2:04 
GeneralRe: Printer Pin
56789012343-Feb-02 21:00
56789012343-Feb-02 21:00 
GeneralMediaplayer Pin
RichardWdy3-Feb-02 1:36
RichardWdy3-Feb-02 1:36 

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.