Link to home
Start Free TrialLog in
Avatar of kallakuri
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
ASKER CERTIFIED SOLUTION
Avatar of cookre
cookre
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kallakuri
kallakuri

ASKER

I cannot change to use anything instead of CreateDialogParam. Can you pls suggest any alternative. The dialog sent to the CreateDialogParam is the dialog template from the resource.rc file. Will changing the properties of the dialog help?

Thanks,
Aparna
While debugging I noticed that the macro MAKEINTRESOURCE is returning a bad pointer
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