Click here to Skip to main content
15,911,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Tony_P wrote:
Am I doing something wrong here?


Yes. Think of it this way... your DLL is being mapped into multiple applications each of which is executing inside its own Virtual Address Space[^]. This essentially means that each copy of the DLL has a different value for your global variable named hWindow.

You need to implement a shared data section:

How To Share Data Between Different Mappings of a DLL[^]

This will allow all applications to read from the shared data section.

Best Wishes,
-David Delaune
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 
GeneralRe: You're welcome Pin
NewVC++7-Dec-08 21:01
NewVC++7-Dec-08 21:01 
GeneralRe: You're welcome Pin
Hamid_RT7-Dec-08 21:28
Hamid_RT7-Dec-08 21:28 

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.