内存DC能不能获取到窗口句柄?解决办法

内存DC能不能获取到窗口句柄?
CreateCompatibleDC创建了一个内存dc,之后在这上画位图,现在需要一个HWND进行别的操作.
使用WindowFromDC取不到,还有什么方法能取到HWND么?
------解决思路----------------------
WindowFromDC的dc是哪个参数?传CreateCompatibleDC的第一个参数试下。
------解决思路----------------------
WindowFromDC
Return value
The return value is a handle to the window associated with the specified DC. If no window is associated with the specified DC, the return value is NULL.
------解决思路----------------------
内存DC本来就没有Window
应该不影响你进行位图等DC操作,其兼容你的系统显示设备
------解决思路----------------------
要从设备DC获取,内存DC获取不到
------解决思路----------------------
你目的DC的HWND应该很容易得到吧~
------解决思路----------------------
GetDC
The GetDC function retrieves a handle to a display device context (DC) for the client area of a specified window or for the entire screen. You can use the returned handle in subsequent GDI functions to draw in the DC. 

The GetDCEx function is an extension to GetDC, which gives an application more control over how and whether clipping occurs in the client area. 

HDC GetDC(
  HWND hWnd   // handle to window
);
Parameters
hWnd 
[in] Handle to the window whose DC is to be retrieved. If this value is NULL, GetDC retrieves the DC for the entire screen
Windows 98/Me, Windows 2000/XP: To get the DC for a specific display monitor, use the EnumDisplayMonitors and CreateDC functions.