Click here to Skip to main content
15,915,086 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Moak29-Mar-08 15:20
Moak29-Mar-08 15:20 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Mark Salsbery29-Mar-08 16:01
Mark Salsbery29-Mar-08 16:01 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Moak30-Mar-08 0:02
Moak30-Mar-08 0:02 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Moak29-Mar-08 15:47
Moak29-Mar-08 15:47 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Randor 29-Mar-08 19:21
professional Randor 29-Mar-08 19:21 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Moak30-Mar-08 0:07
Moak30-Mar-08 0:07 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Mark Salsbery30-Mar-08 6:51
Mark Salsbery30-Mar-08 6:51 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Randor 30-Mar-08 11:09
professional Randor 30-Mar-08 11:09 
Moak explained that he was creating a resource-only DLL[^] for his dialogs and other misc resources. How can you instantiate a dialog if you cannot locate the dialog resources. The WNDCLASS structure is populated with information from the resource section. Therefore his call to GetClassInfo() failed.

AfxGetInstanceHandle() will return the base address of MyApplication.EXE

AfxGetResourceHandle() will return the base address of MyModule.DLL

So when he used AfxGetInstanceHandle() the window creation failed because it was searching for the dialog resources in MyApplication.EXE when they were actually located in MyModule.DLL

Best Wishes,
-David Delaune
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Mark Salsbery30-Mar-08 11:23
Mark Salsbery30-Mar-08 11:23 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Randor 30-Mar-08 11:47
professional Randor 30-Mar-08 11:47 
GeneralRe: RegisterWindowClass and resources from a DLL Pin
Mark Salsbery30-Mar-08 11:56
Mark Salsbery30-Mar-08 11:56 
Questionprint .BMP file to printer ... how ? Pin
Member 435006729-Mar-08 11:38
Member 435006729-Mar-08 11:38 
AnswerRe: print .BMP file to printer ... how ? Pin
Member 435006729-Mar-08 14:02
Member 435006729-Mar-08 14:02 
GeneralRe: print .BMP file to printer ... how ? Pin
Mark Salsbery29-Mar-08 14:24
Mark Salsbery29-Mar-08 14:24 
AnswerRe: print .BMP file to printer ... how ? Pin
Hamid_RT7-Apr-08 2:29
Hamid_RT7-Apr-08 2:29 
QuestionUsing winsock, how can I tell if a system is listening for a connection on a port before I call connect? Pin
TragicComic29-Mar-08 10:39
TragicComic29-Mar-08 10:39 
AnswerRe: Using winsock, how can I tell if a system is listening for a connection on a port before I call connect? Pin
Moak29-Mar-08 13:29
Moak29-Mar-08 13:29 
GeneralReuse projects created in Visual Studio 6 in Visual C++ 2008 Express Edition issue Pin
gedinfo29-Mar-08 8:47
gedinfo29-Mar-08 8:47 
GeneralRe: Reuse projects created in Visual Studio 6 in Visual C++ 2008 Express Edition issue Pin
Randor 29-Mar-08 10:07
professional Randor 29-Mar-08 10:07 
Generalprecompiled header file Pin
George_George29-Mar-08 4:55
George_George29-Mar-08 4:55 
GeneralRe: precompiled header file Pin
Mark Salsbery29-Mar-08 7:24
Mark Salsbery29-Mar-08 7:24 
GeneralRe: precompiled header file Pin
George_George29-Mar-08 22:47
George_George29-Mar-08 22:47 
GeneralRe: precompiled header file Pin
rp_suman29-Mar-08 23:04
rp_suman29-Mar-08 23:04 
GeneralRe: precompiled header file Pin
George_George29-Mar-08 23:33
George_George29-Mar-08 23:33 
GeneralRe: precompiled header file Pin
rp_suman30-Mar-08 0:59
rp_suman30-Mar-08 0:59 

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.