Skip navigation

The HWND of the desktop “window” is actually 0.

You can get the DC of the desktop window using:


HDC desktopDC = GetDC( HWND_DESKTOP ) ;

// or
HDC desktopDC2 = GetDC( NULL ) ;

// or
HDC desktopDC3 = GetDC( 0 ) ;

// same diff 

// don't forget to
ReleaseDC( HWND_DESKTOP, desktopDC ) ;
// when you're done!
Advertisements

2 Comments

    • PJ
    • Posted March 7, 2009 at 10:16 am
    • Permalink

    You can always use ‘GetDesktopWindow()’ function to get the handle of desktop window.

  1. Reblogged this on OmerTaban's Blog.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: