Click here to Skip to main content
15,905,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help me!! Pin
John Simmons24-Aug-00 0:53
John Simmons24-Aug-00 0:53 
GeneralATL Control Resize Pin
Chris Losinger23-Aug-00 19:25
professionalChris Losinger23-Aug-00 19:25 
GeneralRe: ATL Control Resize Pin
Steven Mitcham31-Aug-00 7:22
Steven Mitcham31-Aug-00 7:22 
QuestionPutting CHTMLView::GetHtmlDocument() in a CString? Pin
James Corrie23-Aug-00 10:01
sussJames Corrie23-Aug-00 10:01 
General** Changing TEXT FILES to Access Tables ** Pin
Steve Lai23-Aug-00 9:23
Steve Lai23-Aug-00 9:23 
GeneralCursor Postition Pin
sunny23-Aug-00 7:27
sunny23-Aug-00 7:27 
GeneralRe: Cursor Postition Pin
#realJSOP23-Aug-00 8:59
professional#realJSOP23-Aug-00 8:59 
GeneralRe: Cursor Postition Pin
Philip Nicoletti23-Aug-00 9:19
Philip Nicoletti23-Aug-00 9:19 
The following code gets the current mouse position :

POINT point;
GetCursorPos(&point);

// point.x   and  point.y   have the mouse position
//           with respect to the entire screen
//           NOT the application


The problem is to get this code called whenever the
mouse moves. WM_MOUSEMOVE only generates messages
when in the application window. The only way I have
found to do it is as follows:

1) add a WM_TIMER message to your application

2) code it as follows :

void YOUR_CLASS::OnTimer(UINT nIDEvent) 
{
   // TODO: Add your message handler code here and/or call default
	
   CDialog::OnTimer(nIDEvent);

   POINT point;
   GetCursorPos(&point);

// point.x   and  point.y   have the mouse position
//           with respect to the entire screen
//           not the application

// do whatever you want with these values



3) start the timer :

SetTimer(1,200,NULL);   // calls OnTimer() every 200 milliseconds

GeneralI know WTL doesn't dock... Pin
Scott Leonard23-Aug-00 6:53
Scott Leonard23-Aug-00 6:53 
GeneralBSTR vs. LPSTR Pin
Jonas23-Aug-00 5:45
Jonas23-Aug-00 5:45 
GeneralRe: BSTR vs. LPSTR Pin
#realJSOP23-Aug-00 6:31
professional#realJSOP23-Aug-00 6:31 
GeneralRe: BSTR vs. LPSTR Pin
Richard Warg23-Aug-00 14:06
Richard Warg23-Aug-00 14:06 
GeneralCString search Pin
sspcmp23-Aug-00 4:37
susssspcmp23-Aug-00 4:37 
GeneralRe: CString search Pin
Philip Nicoletti23-Aug-00 5:13
Philip Nicoletti23-Aug-00 5:13 
GeneralRe: CString search Pin
sspcmp23-Aug-00 5:42
susssspcmp23-Aug-00 5:42 
GeneralRe: CString search Pin
Philip Nicoletti23-Aug-00 6:37
Philip Nicoletti23-Aug-00 6:37 
GeneralRe: CString search Pin
#realJSOP23-Aug-00 6:26
professional#realJSOP23-Aug-00 6:26 
GeneralRe: CString search Pin
sspcmp23-Aug-00 7:21
susssspcmp23-Aug-00 7:21 
GeneralRe: CString search Pin
Philip Nicoletti23-Aug-00 7:59
Philip Nicoletti23-Aug-00 7:59 
GeneralRe: CString search Pin
#realJSOP23-Aug-00 8:45
professional#realJSOP23-Aug-00 8:45 
GeneralRe: CString search Pin
Paolo Messina23-Aug-00 9:55
professionalPaolo Messina23-Aug-00 9:55 
GeneralHOWTO: Find Height of stacked tabs in CPropertySheet Pin
Jeremy Davis23-Aug-00 2:20
Jeremy Davis23-Aug-00 2:20 
Generaldialog and large font Pin
Broker23-Aug-00 1:56
Broker23-Aug-00 1:56 
GeneralRe: dialog and large font Pin
Aquitaine24-Aug-00 9:16
Aquitaine24-Aug-00 9:16 
QuestionDDE...or: Why does my Thread stop Oracle Report Server??? Pin
didi23-Aug-00 1:48
didi23-Aug-00 1:48 

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.