Click here to Skip to main content
16,011,988 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: creating dialogs in a loop Pin
Iain Clarke, Warrior Programmer8-Dec-08 0:42
Iain Clarke, Warrior Programmer8-Dec-08 0:42 
GeneralRe: creating dialogs in a loop Pin
K. Sushilkumar8-Dec-08 1:46
K. Sushilkumar8-Dec-08 1:46 
GeneralRe: creating dialogs in a loop Pin
Iain Clarke, Warrior Programmer8-Dec-08 2:11
Iain Clarke, Warrior Programmer8-Dec-08 2:11 
AnswerRe: creating dialogs in a loop Pin
David Crow8-Dec-08 3:51
David Crow8-Dec-08 3:51 
QuestionHook on a HWND Pin
Tony Pottier7-Dec-08 19:22
Tony Pottier7-Dec-08 19:22 
AnswerRe: Hook on a HWND Pin
Malli_S7-Dec-08 19:40
Malli_S7-Dec-08 19:40 
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:15
Tony Pottier7-Dec-08 20:15 
GeneralRe: Hook on a HWND Pin
Randor 7-Dec-08 20:34
professional Randor 7-Dec-08 20:34 
Tony_P wrote:
wouldn't the function "HookHwnd" I created set every hWindow to the same value


You could actually make it work this way. You use the RegisterWindowMessage Function[^] to create a unique window message and broadcast it using HWND_BROADCAST[^]. Just make sure that your window message is unique and its not in the WM_USER range so it will not conflict with custom window messages used internally in other applications. RegisterWindowMessage will return something in the range of MAXINTATOM-MAXWORD so you should be safe.

In your DLL you could handle this custom message and set the local variable to a target window handle. And since you have both WPARAM and LPARAM this means you could target both PID and window handle. Essentially instructing the DLL "Process with PID x please monitor window n".

This is a sort of hackish way of doing it in my opinion, the shared-data segment in my earlier post would probably be a better choice. You could instruct each DLL there also using a similar technique. The great thing about engineering software is there is always many paths to reach the goal.

Best Wishes,
-David Delaune
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:45
Tony Pottier7-Dec-08 20:45 
AnswerRe: Hook on a HWND Pin
Randor 7-Dec-08 19:49
professional Randor 7-Dec-08 19:49 
GeneralRe: Hook on a HWND Pin
Tony Pottier7-Dec-08 20:16
Tony Pottier7-Dec-08 20:16 
QuestionAccess system Folder Pin
john56327-Dec-08 18:59
john56327-Dec-08 18:59 
AnswerRe: Access system Folder Pin
enhzflep7-Dec-08 19:20
enhzflep7-Dec-08 19:20 
GeneralRe: Access system Folder Pin
john56328-Dec-08 0:09
john56328-Dec-08 0:09 
QuestionKeyboard Handlers Pin
prithaa7-Dec-08 18:19
prithaa7-Dec-08 18:19 
GeneralRe: Keyboard Handlers Pin
Malli_S7-Dec-08 20:02
Malli_S7-Dec-08 20:02 
QuestionStatic font Pin
NewVC++7-Dec-08 18:08
NewVC++7-Dec-08 18:08 
AnswerRe: Static font Pin
Hamid_RT7-Dec-08 18:21
Hamid_RT7-Dec-08 18:21 
GeneralRe: Static font Pin
NewVC++7-Dec-08 18:23
NewVC++7-Dec-08 18:23 
GeneralRe: Static font Pin
Hamid_RT7-Dec-08 18:30
Hamid_RT7-Dec-08 18:30 
GeneralRe: Static font Pin
NewVC++7-Dec-08 18:40
NewVC++7-Dec-08 18:40 
GeneralYou're welcome Pin
Hamid_RT7-Dec-08 18:52
Hamid_RT7-Dec-08 18:52 
GeneralRe: You're welcome Pin
NewVC++7-Dec-08 18:59
NewVC++7-Dec-08 18:59 
GeneralRe: You're welcome Pin
Randor 7-Dec-08 19:35
professional Randor 7-Dec-08 19:35 
GeneralRe: You're welcome Pin
Hamid_RT7-Dec-08 20:54
Hamid_RT7-Dec-08 20:54 

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.