How to get the correct handle to the desktop?

This is a discussion on How to get the correct handle to the desktop? within the Windows Programming forums, part of the Platform Specific Boards category; I have a c++ program where it became necessary to attach an icon to the taskbar and I use GetDesktopWindow() ...

  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, 09:43 AM
  2. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 05:23 AM
  3. Desktop handle
    By Snip in forum Windows Programming
    Replies: 7
    Last Post: 03-08-2006, 10:08 AM
  4. Passing a handle between processes
    By axr0284 in forum C++ Programming
    Replies: 1
    Last Post: 12-16-2005, 03:10 PM
  5. Inject Dll, handle WM_PAINT...
    By asy777 in forum Windows Programming
    Replies: 10
    Last Post: 11-04-2005, 01:38 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21