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

C / C++ / MFC

 
GeneralRe: CreateProcessWithLogonW Pin
Michael Dunn22-Dec-02 5:41
sitebuilderMichael Dunn22-Dec-02 5:41 
Generalcallback Pin
king_of_the_world21-Dec-02 20:51
king_of_the_world21-Dec-02 20:51 
GeneralRe: callback Pin
Paul M Watt21-Dec-02 21:48
mentorPaul M Watt21-Dec-02 21:48 
GeneralRe: callback Pin
king_of_the_world22-Dec-02 2:16
king_of_the_world22-Dec-02 2:16 
GeneralRe: callback Pin
Paul M Watt22-Dec-02 7:11
mentorPaul M Watt22-Dec-02 7:11 
GeneralRe: callback Pin
king_of_the_world22-Dec-02 9:46
king_of_the_world22-Dec-02 9:46 
GeneralRe: callback Pin
Paul M Watt22-Dec-02 12:20
mentorPaul M Watt22-Dec-02 12:20 
GeneralRe: callback Pin
king_of_the_world25-Dec-02 20:11
king_of_the_world25-Dec-02 20:11 
thanks, I installed a global hook and played around with it. but it doesn't work well, in particular, if I do the following, does it it put all the variables in global dll? it got lots of weird behavior from my diligently produced code(I copy and pasted below). Sometimes if I restarted my computer it seems that the hook was catching the mousedown message if i press anywhere on desktop, but sometimes it doesn't, in the best case it's crashing the system. would you provide me with some code snipet that install a mousehook and print the mouse position when the user left click the mouse?
thanks a million!

#pragma data_seg(".IdleTrac") // you must define as SHARED in .def
HHOOK mouseHook,keyboardHook;
HINSTANCE g_hinstance;
#pragma data_seg()
#pragma comment(linker, "/section:.IdleTrac,rws")

LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lparam){
switch(wParam){
case 27:
UnhookWindowsHookEx(mouseHook);
UnhookWindowsHookEx(keyboardHook);
errstream.close();
PostQuitMessage(0);
}
return 0;
}

LRESULT CALLBACK MouseProc(int nCode, WPARAM wParam, LPARAM lparam){

// MessageBox(hWnd,"in mouse proc ","",MB_OK);
MOUSEHOOKSTRUCT* mousehook=(MOUSEHOOKSTRUCT*)lparam;
POINT p=mousehook->pt;
switch(wParam){
case WM_LBUTTONDOWN:
MessageBox(hWnd,"leftt button down","",MB_OK);
// errstream<<"mouse position is "<
QuestionHow to build tool in MS Office? Pin
JATE21-Dec-02 18:37
JATE21-Dec-02 18:37 
AnswerRe: How to build tool in MS Office? Pin
Al_Pennyworth23-Dec-02 2:45
Al_Pennyworth23-Dec-02 2:45 
GeneralCComboBox derrived class messages Pin
Joel Holdsworth21-Dec-02 11:46
Joel Holdsworth21-Dec-02 11:46 
GeneralRe: CComboBox derrived class messages Pin
Michael Dunn21-Dec-02 13:46
sitebuilderMichael Dunn21-Dec-02 13:46 
GeneralDLL_PROCESS_ATTACH und geladene Module Pin
21-Dec-02 6:36
suss21-Dec-02 6:36 
GeneralRe: DLL_PROCESS_ATTACH und geladene Module Pin
Anonymous21-Dec-02 6:40
Anonymous21-Dec-02 6:40 
GeneralReg path from an HKEY Pin
Nish Nishant21-Dec-02 6:33
sitebuilderNish Nishant21-Dec-02 6:33 
GeneralRe: Reg path from an HKEY Pin
Jason Henderson21-Dec-02 8:33
Jason Henderson21-Dec-02 8:33 
GeneralRe: Reg path from an HKEY Pin
Nish Nishant21-Dec-02 10:35
sitebuilderNish Nishant21-Dec-02 10:35 
GeneralRe: Reg path from an HKEY Pin
Scott H. Settlemier23-Dec-02 12:47
Scott H. Settlemier23-Dec-02 12:47 
GeneralQuestion about MSDN example Pin
Mazdak21-Dec-02 5:11
Mazdak21-Dec-02 5:11 
GeneralRe: Question about MSDN example Pin
Michael Dunn21-Dec-02 5:20
sitebuilderMichael Dunn21-Dec-02 5:20 
GeneralRe: Question about MSDN example Pin
Mazdak21-Dec-02 6:51
Mazdak21-Dec-02 6:51 
GeneralRe: Question about MSDN example Pin
Michael Dunn21-Dec-02 7:05
sitebuilderMichael Dunn21-Dec-02 7:05 
GeneralRe: Question about MSDN example Pin
carrie21-Dec-02 5:19
carrie21-Dec-02 5:19 
GeneralRe: Question about MSDN example Pin
Christian Graus21-Dec-02 10:12
protectorChristian Graus21-Dec-02 10:12 
Questionhow is that possible ? no one can help me ? Pin
Ehsan Baghaki21-Dec-02 3:40
Ehsan Baghaki21-Dec-02 3:40 

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.