Menu

SwitchToThisWindow?

Osito
2007-08-24
2012-09-26
  • Osito

    Osito - 2007-08-24

    Has anyone used the SwitchToThisWindow() function with Dev-C++? MSDN says it's Win2k and greater, but I don't see it in the include files that come with Dev-C++ 4.9.9.2.

     
    • Anonymous

      Anonymous - 2007-08-26

      >> I ended up downloading the MinGW installer from SourceForge,...

      Luckily you got it working... all I intended was that you download the Win32API package which is just a bunch of headers and export libraries and required no special installation - you just copy them to the appropriate folders (\include and \lib respectively). May be you should have waited for a response before you went ahead!?

      >> I used "#define _WIN32_WINNT 0x0500" instead of the compiler option suggested by Clifford.
      >> It seemed better because a text search of the project would show it (whereas the compiler
      >> option would be hidden from Find In Files)
      It would not be hidden if your text search included .dev files or makefile.win. Also the option is displayed in the compile log so advertises itself clearly. If you use #define it is only active in those sources in which you remembered to include it (either directly or through a header), whereas as a compiler option, if is consistently applied to all modules.

      Clifford

       
      • Osito

        Osito - 2007-08-26

        I was feeling bold. :)

         
        • Anonymous

          Anonymous - 2007-08-26

          Good, fearlessness - I like that!

           
    • Anonymous

      Anonymous - 2007-08-26
       
    • Anonymous

      Anonymous - 2007-08-25

      It is in winuser.h on my installation. Have you got the latest Win32 API files? (www.mingw.org).

      You will have to set the _WIN32_WINNT macro to >= 0x0500 to allow access to the API (add -D_WIN32_WINNT=0x0500 to the project compiler options) to define that your app requires at least Windows 2000.

      Clifford

       
      • Osito

        Osito - 2007-08-25

        I only have what came with 4.9.9.2. Last time I tried to upgrade anything, I ended up destroying my Dev-C++ installation and having to reinstall from scratch. Is there a set of instructions on how to do it properly? Before you answer that, let me check the READ BEFORE YOU POST thread so I don't get flamed. ;)

        What is your opinion of the devpaks.org offering (Tools-Check for Updates)? There's a big warning about how dangerous they are, but if it's MinGW and it's been there for months with no complaints, it seems safe...

         
        • Wayne Keen

          Wayne Keen - 2007-08-25

          I have used them without problems...

          Wayne

           
          • Osito

            Osito - 2007-08-25

            I ended up downloading the MinGW installer from SourceForge, installing it all in a separate directory, and pointing Dev-C++ to that. On my third attempt, I finally got it right. :)

            Also, I used "#define _WIN32_WINNT 0x0500" instead of the compiler option suggested by Clifford. It seemed better because a text search of the project would show it (whereas the compiler option would be hidden from Find In Files) and it is probably more portable.

            Is it worth posting the steps I followed to get MinGW working with Dev-C++, or is that covered somewhere else (or just so obvious to everyone but me that it's not necessary to post it)?

             
            • Wayne Keen

              Wayne Keen - 2007-08-26

              Did you go with the baseline GCC, or the newest avialable there, the gcc-4.2?

              I suggest you also get MSYS - it gives you a nice command line interface through rxvt
              to the MinGW functionality.

              Wayne

               
              • Wayne Keen

                Wayne Keen - 2007-08-26

                Yoou might also want to look into this version of MinGW:

                http://nuwen.net/mingw.html

                It has a number of useful tools packaged with it, and it has moved to gcc-4.2
                very recently. Note that its version of 4.2 does not have the gomp library
                in it yet, which may not matter for you.

                The nice thing about setting things up the way you have is that you can
                keep several versions of MinGW around - and just swith out which one you
                have in the c:\mingw location. I have a nuwen MinGW, and official MinGW,
                and one that uses yet another version of GCC...

                Wayne

                 
                • Osito

                  Osito - 2007-08-26

                  I used their installer, MinGW-5.1.3.exe, which installed gcc-3.4.2. I'm not sure why it wasn't 3.4.5, which claims to be the current stable release. All I was really trying to do was get that one Windows function to work, so once it did I stopped messing with it. :)

                   
                  • Wayne Keen

                    Wayne Keen - 2007-08-26

                    A good resource to keep up with the MinGW world is their mailing list:

                    http://news.gmane.org/gmane.comp.gnu.mingw.user

                    Wayne

                     
                    • Wayne Keen

                      Wayne Keen - 2007-08-26

                      The version 4.2 "Technology Preview" binaries can be found here:

                      http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304

                      If you want to use them, installation is pretty easy, just copy the files into your
                      c:\mingw directory, unzip them, untar them, and you will be running GCC 4.2.

                      As I mumbled earlier, you can do this safely by creating a copy of your current
                      working mingw directory, call it something like c:\mingwbak, and play with your
                      existing version. If you don't like things, simply copy your backup back to
                      c:\mingw.

                      And if you don't care about what I am babbling about, that is cool.

                      :)

                      Wayne

                       

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.