InitCommonControlsEx not working in dev-c++

This is a discussion on InitCommonControlsEx not working in dev-c++ within the Windows Programming forums, part of the Platform Specific Boards category; I was trying to create a windows program which uses tabs. In microsoft msdn it was given that InitCommonControls function ...

  1. #1
    Registered User jayapalchandran's Avatar
    Join Date
    Aug 2006
    Location
    Chennai, Tamil Nadu, India
    Posts
    2

    InitCommonControlsEx not working in dev-c++

    I was trying to create a windows program which uses tabs.

    In microsoft msdn it was given that InitCommonControls function is obsolete and i tried InitCommonControlsEx. this too is not working. getting an undefined reference error by the linker.

    is there any way to get a new version of the libraries or what could be the alternate? can any one help me out of this...

    is there any other complier which includes the latest fo all...

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You need to #define _WIN32_IE with a suitable value (check commctrl.h header to see why). The lowest common denominator value is 0x0400. For code that's portable between compilers:
    Code:
    #if defined __MINGW_H
    #define _WIN32_IE 0x0400
    #endif
    #include <commctrl.h>
    or, better, define it within the project options, parameters tab, in the 'c++ compiler' field (you might need to use the -D switch ie -D_WIN32_IE=0x0400).

    In addition you must link with the common controls library: project options, parameters tab, add -lcomctl32 to the 'linker' field.

    A board search would have helped you here and should provide you with more information regarding this problem.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 05-07-2009, 12:31 PM
  2. Dev C++ |Random Coding| Not Working!
    By oobootsy1 in forum C++ Programming
    Replies: 6
    Last Post: 03-05-2004, 10:13 PM
  3. OPENGL Dev C++; Fualty LIBS
    By Blizzarddog in forum C++ Programming
    Replies: 5
    Last Post: 01-02-2004, 09:40 AM
  4. Dev C++ help please!!!
    By caroundw5h in forum C Programming
    Replies: 7
    Last Post: 11-27-2003, 09:48 AM
  5. Tutorial about Bloodshed Dev!
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 11-13-2001, 07:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21