Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. HWND of app

HWND of app

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutorial
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Daniel1324
    wrote on last edited by
    #1

    Is there a way to get a windows HWND by way of the windows title, *if* you only know part of the title? Example... How can I get the HWND of internet explorer? I know the window title (normally) contains "Microsoft Internet Explorer". Look up at your title bar now, you'll see the web page title then "- Microsoft Internet Explorer". So, can I get the HWND with just "Internet Explorer"? ::FindWindow(NULL, "Internet Explorer"); <--- Don't work. Hope I explained my problem well enough! Thanks! Daniel

    P 1 Reply Last reply
    0
    • D Daniel1324

      Is there a way to get a windows HWND by way of the windows title, *if* you only know part of the title? Example... How can I get the HWND of internet explorer? I know the window title (normally) contains "Microsoft Internet Explorer". Look up at your title bar now, you'll see the web page title then "- Microsoft Internet Explorer". So, can I get the HWND with just "Internet Explorer"? ::FindWindow(NULL, "Internet Explorer"); <--- Don't work. Hope I explained my problem well enough! Thanks! Daniel

      P Offline
      P Offline
      peterchen
      wrote on last edited by
      #2

      a) FindWindow is evil on so many levels. Forget it b) try to find well-defined application-specific ways to find windows first. The Shell interfaces might contain something for explorer. c) Use EnumWindows to enumerate all windows. Ask their properties using SendMessageTimeout d) Never link your expectations about a window to the title. You think a Chinese Explorer has "Windows Explorer" there?


      Flirt harder, I'm a Coder
      mlog || Agile Programming | doxygen

      P 1 Reply Last reply
      0
      • P peterchen

        a) FindWindow is evil on so many levels. Forget it b) try to find well-defined application-specific ways to find windows first. The Shell interfaces might contain something for explorer. c) Use EnumWindows to enumerate all windows. Ask their properties using SendMessageTimeout d) Never link your expectations about a window to the title. You think a Chinese Explorer has "Windows Explorer" there?


        Flirt harder, I'm a Coder
        mlog || Agile Programming | doxygen

        P Offline
        P Offline
        Prakash Nadar
        wrote on last edited by
        #3

        peterchen wrote: You think a Chinese Explorer has "Windows Explorer" there? I got see what it is ? ;P


        God is Real, unless declared Integer.

        M 1 Reply Last reply
        0
        • P Prakash Nadar

          peterchen wrote: You think a Chinese Explorer has "Windows Explorer" there? I got see what it is ? ;P


          God is Real, unless declared Integer.

          M Offline
          M Offline
          Maxwell Chen
          wrote on last edited by
          #4

          Mr.Prakash wrote: peterchen wrote: You think a Chinese Explorer has "Windows Explorer" there? Chinese version Windows Explorer.[^] Maxwell Chen

          P 1 Reply Last reply
          0
          • M Maxwell Chen

            Mr.Prakash wrote: peterchen wrote: You think a Chinese Explorer has "Windows Explorer" there? Chinese version Windows Explorer.[^] Maxwell Chen

            P Offline
            P Offline
            Prakash Nadar
            wrote on last edited by
            #5

            What is that written in red ? "Folder"???


            God is Real, unless declared Integer.

            M 1 Reply Last reply
            0
            • P Prakash Nadar

              What is that written in red ? "Folder"???


              God is Real, unless declared Integer.

              M Offline
              M Offline
              Maxwell Chen
              wrote on last edited by
              #6

              The red words should read as "To open that folder (swf)". The image was found with Google, it is one of illustrations for some operation manual. That is Windows Explorer of Windows 98, on the title bar there is "Windows Explorer" in Chinese. I've had a look with my Windows Explorer of WinXP just now. It doesn't show something like "Windows Explorer - Temp" in the current version. Only "Temp" is shown while current folder opened is C:\Temp for example. Maxwell Chen

              P 1 Reply Last reply
              0
              • M Maxwell Chen

                The red words should read as "To open that folder (swf)". The image was found with Google, it is one of illustrations for some operation manual. That is Windows Explorer of Windows 98, on the title bar there is "Windows Explorer" in Chinese. I've had a look with my Windows Explorer of WinXP just now. It doesn't show something like "Windows Explorer - Temp" in the current version. Only "Temp" is shown while current folder opened is C:\Temp for example. Maxwell Chen

                P Offline
                P Offline
                Prakash Nadar
                wrote on last edited by
                #7

                I have developed namespace extension for my company, all these little difference in feature between winxp and win98 caused lot of design problems. :(


                God is Real, unless declared Integer.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups