Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can i get the database list in a Sql Server? Pin
Peter Keung30-May-03 20:16
Peter Keung30-May-03 20:16 
QuestionWave equations? Pin
Henry P.30-May-03 20:11
Henry P.30-May-03 20:11 
QuestionHow to capture and highlight a word and copy it to clipboard in any application using a mouse click? Pin
sledge197800130-May-03 16:45
sledge197800130-May-03 16:45 
AnswerRe: How to capture and highlight a word and copy it to clipboard in any application using a mouse click? Pin
Neville Franks31-May-03 2:03
Neville Franks31-May-03 2:03 
GeneralRe: How to capture and highlight a word and copy it to clipboard in any application using a mouse click? Pin
sledge19780014-Jun-03 23:05
sledge19780014-Jun-03 23:05 
GeneralRe: How to capture and highlight a word and copy it to clipboard in any application using a mouse click? Pin
Neville Franks5-Jun-03 20:45
Neville Franks5-Jun-03 20:45 
Generaluse C++ to open dicom data Pin
mpf30-May-03 15:24
mpf30-May-03 15:24 
QuestionWhat's wrong with my hook? Pin
Old Gun30-May-03 14:43
Old Gun30-May-03 14:43 
1.What 's wrong with my MouseProc hook?

LRESULT CALLBACK MouseProc(int nCode,WPARAM wParam,LPARAM lParam)
{
LPMOUSEHOOKSTRUCT pMouseHook=(MOUSEHOOKSTRUCT FAR *)lParam;
if (nCode>=0)
{
HWND glhTargetWnd=pMouseHook->hwnd;
HWND ParentWnd=glhTargetWnd;
while (ParentWnd !=NULL)
{
glhTargetWnd=ParentWnd;
ParentWnd=GetParent(glhTargetWnd);
}
if(glhTargetWnd!=glhPrevTarWnd)
{
char szClassName[40];
GetClassName(glhTargetWnd,szClassName,20);
if (stricmp(szClassName,"XLMAIN")==0)//Excel Main Window
{
switch(wParam)
{
case WM_RBUTTONUP:
case WM_RBUTTONDOWN:

//....
//Here I want stop the message to XLMAIN Window
//
strcat(szClassName,"You press right mouse button");
//Infact my program never go here when I click each mouse button,Why?
TRACE0(szClassName);
break;
case WM_LBUTTONUP:
case WM_LBUTTONDOWN:
strcat(szClassName,"You press left mouse butto");
//Infact my program never go here when I click each mouse button,Why
TRACE0(szClassName);
default:
AfxMessageBox("Mouse is in Excel Window");//program goes here
}
glhPrevTarWnd=glhTargetWnd;
}
SendMessage(glhDisplayWnd,WM_SETTEXT,0,(LPARAM)(LPCTSTR)szClassName);
//glhDisplayWnd-CEdit window HWND,This is just for test.
}
}
return CallNextHookEx(glhHook,nCode,wParam,lParam);
}


2.how to cancel special message to a special window
AnswerRe: How to deal windows message in MouseProc Hook? Pin
Neville Franks31-May-03 2:04
Neville Franks31-May-03 2:04 
GeneralRe: How to deal windows message in MouseProc Hook? Pin
Neville Franks31-May-03 21:53
Neville Franks31-May-03 21:53 
Generaldialog created with DialogBox not receiving all messages Pin
Kibble30-May-03 13:15
Kibble30-May-03 13:15 
GeneralRe: dialog created with DialogBox not receiving all messages Pin
Neville Franks31-May-03 2:06
Neville Franks31-May-03 2:06 
GeneralRe: dialog created with DialogBox not receiving all messages Pin
Kibble31-May-03 11:26
Kibble31-May-03 11:26 
GeneralCEdit updates in dialog box Pin
rpadrela30-May-03 11:49
rpadrela30-May-03 11:49 
GeneralRe: CEdit updates in dialog box Pin
valikac30-May-03 13:24
valikac30-May-03 13:24 
GeneralRe: CEdit updates in dialog box Pin
Peter Weyzen30-May-03 21:49
Peter Weyzen30-May-03 21:49 
GeneralKeep the cursor inside a window Pin
Daniela12330-May-03 11:36
Daniela12330-May-03 11:36 
GeneralRe: Keep the cursor inside a window Pin
Michael Dunn30-May-03 11:50
sitebuilderMichael Dunn30-May-03 11:50 
GeneralRe: Keep the cursor inside a window Pin
Anonymous31-May-03 17:18
Anonymous31-May-03 17:18 
Generalraw packet with setsockopt() and sendto() Pin
Kuniva30-May-03 11:32
Kuniva30-May-03 11:32 
GeneralRe: raw packet with setsockopt() and sendto() Pin
JohnnyG30-May-03 18:34
JohnnyG30-May-03 18:34 
GeneralRe: raw packet with setsockopt() and sendto() Pin
Kuniva31-May-03 5:11
Kuniva31-May-03 5:11 
GeneralRe: raw packet with setsockopt() and sendto() Pin
JohnnyG31-May-03 13:20
JohnnyG31-May-03 13:20 
GeneralRe: raw packet with setsockopt() and sendto() Pin
Peter Weyzen30-May-03 22:01
Peter Weyzen30-May-03 22:01 
GeneralMySQL in a small app... Pin
Gnascher30-May-03 10:25
Gnascher30-May-03 10:25 

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.