kallakuri
asked on
CreateDialogParam in a static linked library fails returning error no 1406
Hi ,
I have a static linked library (pure win32 API calls used) in which I load a
dialog from a template using CreateDialogParam. If the test application &
the library are within the same solution , the dialog is shown. But , when I
try to load it in a different application( I've included the .lib name in
the project settings & the .h file of the interface) , on click of a button
in the application, it is failing. I tried debugging & it is failing in the
CreateDialogParam, where it is returning NULL & GetLastError returned error
no 1406 "Cannot create a top-level child window".
Can anyone help ?
Thanks,
Aparna
I have a static linked library (pure win32 API calls used) in which I load a
dialog from a template using CreateDialogParam. If the test application &
the library are within the same solution , the dialog is shown. But , when I
try to load it in a different application( I've included the .lib name in
the project settings & the .h file of the interface) , on click of a button
in the application, it is failing. I tried debugging & it is failing in the
CreateDialogParam, where it is returning NULL & GetLastError returned error
no 1406 "Cannot create a top-level child window".
Can anyone help ?
Thanks,
Aparna
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
While debugging I noticed that the macro MAKEINTRESOURCE is returning a bad pointer
ASKER
I found a link within this site that gave me a link to MSDN answering the linking error.
Since the .lib file is a static linked....it gives the error. Please read http://support.microsoft.com/default.aspx?scid=kb;en-us;815773#toc for more info
Since the .lib file is a static linked....it gives the error. Please read http://support.microsoft.com/default.aspx?scid=kb;en-us;815773#toc for more info
ASKER
Thanks,
Aparna