Jump to content

How 2 hide a window by using C++??

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
Hassan Syed

Hassan Syed

    Newbie

  • Members
  • Pip
  • 3 posts
I am using a scripting language named as "Autoit" in that language I can easily hide any window simply by following commands. For example I want to hide "Untitle- Notepad" windo in XP then I'll just write following commands & it will do the work for me


Opt("WinTitleMatchMode", 2)


If winExsist("Untitled - Notepad")Then

    WinSetState("Untitled - Notepad", "", @SW_HIDE)

EndIf

How can I do the same thing in C++ also remember if any thing of the above mention windows appera eithe "Untitled" or "Notepade" it match the words & then hide that windows


#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
You will have to learn the Windows API or one of the (many) GUI libraries. The details of you want to do will depend entirely on which you choose to use. C++, the core language, does not have the concept of a "window".
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
Feral

Feral

    Programmer

  • Members
  • PipPipPipPip
  • 162 posts
you first need to get a handle to the window you want to hide, then use ShowWindow (need to include windows.h) pass the handle to the window as the first param and the SW_HIDE/SW_SHOW command as the second param.

there really isn't any more to it then that if you are talking about the windows platform.