Menu

InitCommonControlsEx

2004-03-22
2012-09-26
  • Nobody/Anonymous

    I'm trying to add a Progress Bar and Tabs, so I looked up some examples (e.g., http://www.foosyerdoos.fsnet.co.uk/\)
    but they won't compile, giving me "InitCommonControlsEx undeclared..."
    I've tried this with Dev-Cpp 4.9.7.0 & 4.9.8.7.
    I linked to ibcomctl32.a
    I even tried replacing the Dev-Cpp provided commctrl.h with a newer one from http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/mingw/w32api/include/commctrl.h
    Any ideas?

     
    • Edmund Tudor

      Edmund Tudor - 2004-03-22

      first, you should have something like this at the start of your code:

      #define _WIN32_IE 0x0600
      #include <windows.h>
      #include <commctrl.h>

      if you don't have the #define line some of the newer things in the included files won't be available.

      then take a look at this message I posted a while back:

      http://sourceforge.net/forum/message.php?msg_id=2441493

      it has a template for using InitCommonControlsEx, just comment out the class types you don't need and uncomment the ones you do.

      I've used it with both 4.9.7.0 and 4.9.8.0 with no problems, so you didn't need to replace commctrl,h.

       
    • Nobody/Anonymous

      The key was the #define _WIN32_IE 0x0600 line.
      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.