DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Using ComCtl32 controls

  1. #1
    Adam Dawes Guest

    Using ComCtl32 controls

    I have a simple application, written in VC++ but not using MFC, which
    displays a dialog using the DialogBox function (macro). This works fine
    until I add any of the Common Controls to my dialog. When I do this, the
    DialogBox call returns immediately (without showing the dialog) with a value
    of -1 (indicating an error).

    If I call GetLastError straight after this, it returns zero, which I believe
    means that no error occurred.

    Is there something I need to do in order to use the Common Controls within
    my dialog?

    My thanks in advance,
    --

    Adam.





  2. #2
    Alberto Curro Guest

    Re: Using ComCtl32 controls


    "Adam Dawes" <adam.dawes@editrack.nospam.com> wrote:
    >I have a simple application, written in VC++ but not using MFC, which
    >displays a dialog using the DialogBox function (macro). This works fine
    >until I add any of the Common Controls to my dialog. When I do this, the
    >DialogBox call returns immediately (without showing the dialog) with a value
    >of -1 (indicating an error).
    >
    >If I call GetLastError straight after this, it returns zero, which I believe
    >means that no error occurred.
    >
    >Is there something I need to do in order to use the Common Controls within
    >my dialog?
    >
    >My thanks in advance,
    >--
    >


    I think you are suffering a minor problem. You only have to call to InitCommonControls()
    in the InitInstance, WinMain() or whatever other else function in your application
    to initialize the common controls's DLLs and COM instances.

    I guess it should serve as help

    Best regards




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center