Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

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
0
kallakuri
Asked:
kallakuri
  • 3
1 Solution
 
cookreCommented:
My guess is that the call to CreateWindowEx() from within CreateDialogParam() is failing because of a duplicate ClassName.
0
 
kallakuriAuthor Commented:
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
0
 
kallakuriAuthor Commented:
While debugging I noticed that the macro MAKEINTRESOURCE is returning a bad pointer
0
 
kallakuriAuthor Commented:
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
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now