Results 1 to 15 of 15

Thread: getting a handle and using it

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    getting a handle and using it

    Okay, how do I find the handle of a program? by its title? Once I get that I want to make it invisible....how would I do that? Thanks all

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    I don't quite understand you. What do you mean you want to make it invisible? Do you want to make the window invisible or...
    Please clarify.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I want it to be there but you can't see it, or off the screen, any way so that it is not in view.

  4. #4
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    If i understood you well:
    PHP Code:
    #include <windows.h>
    ...
    HWND h FindWindow(NULL,"caption");
    ShowWindow(h,0);  /*or use SW_HIDE, try both*/ 
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I didn't know it was so easy! Thanks Vlatko!

  6. #6
    Hyperactive Member Amon Ra's Avatar
    Join Date
    Feb 2001
    Location
    In some cave on Uranus...
    Posts
    500

    Thumbs up Wow!

    That's pretty cool I tried sendin a message to that wnd handle, and it worked. So i guess you could do cool things with that
    Amon Ra
    The Power of Learning.

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I made a program with it....when you get it you can hide or show it. And using the SetWindowText api you can change window titles. It's somewhere on planetsourcecode.

  8. #8
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Can you hide the desktop? =)
    Harry.

    "From one thing, know ten thousand things."

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I don't know, I get the handle by typing whatever is in the titlebar....but feel free to try:

    http://www.planetsourcecode.com/vb/s...txtCodeId=1944


  10. #10
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I'm pretty sure the desktop's window handle is NULL, but I don't have a compiler on this computer and I'd be too lazy to check it anyway
    Harry.

    "From one thing, know ten thousand things."

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It's not usually NULL, since that doesn't really act as a handle Try GetDesktopWindow() anyway, if you need it. You can mess around with the desktop listview by getting a child window of ProgMan
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    128 if i remember correct, it usually was for me, but i haven't checked it out for a while. i remember when i accidentaly dragdropped my desktop into my appbar prog, and it crashed soon but before it did, i could drag down my appbar and the desktop went with it
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  13. #13

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    an exe is included in the zip harry

    what would happen if I hid the desktop?

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Not much, since it's hidden anyway. All the desktop window is, is a parent window. You can't see it - it just acts as a top level.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  15. #15
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Not really true, i had put my desktop in another window, i saw it before it crashed 5 seconds later. The area that was below looked like the desktop but without icons, the screen DC was still updating that area for some really odd reason.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width