Thread: How to get the correct handle to the desktop?

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    7

    How to get the correct handle to the desktop?

    I have a c++ program where it became necessary to attach an icon to the taskbar and I use GetDesktopWindow() to get the CWnd. However, when the program is launched from within a service during the terminal service session. Instead of the remote session's taskbar, the icon get attached to the local machine's taskbar. Does anyone know how to solve this?

  2. #2
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339
    Hi,

    GetDesktopWindow().

    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Finding correct window handle
    By chris1985 in forum C Programming
    Replies: 1
    Last Post: 02-10-2008, 10:43 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  3. Desktop handle
    By Snip in forum Windows Programming
    Replies: 7
    Last Post: 03-08-2006, 11:08 AM
  4. Passing a handle between processes
    By axr0284 in forum C++ Programming
    Replies: 1
    Last Post: 12-16-2005, 04:10 PM
  5. Inject Dll, handle WM_PAINT...
    By asy777 in forum Windows Programming
    Replies: 10
    Last Post: 11-04-2005, 02:38 PM