CreateDialogParam in a static linked library fails returning error no 1406

Posted on 2005-05-11
Last Modified: 2011-09-20
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 ?

Question by:kallakuri
    LVL 23

    Accepted Solution

    My guess is that the call to CreateWindowEx() from within CreateDialogParam() is failing because of a duplicate ClassName.

    Author Comment

    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?


    Author Comment

    While debugging I noticed that the macro MAKEINTRESOURCE is returning a bad pointer

    Author Comment

    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 gives the  error. Please read;en-us;815773#toc for more info

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
    This is about my first experience with programming Arduino.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now