在对话框类的成员函数里用 HWND hwnd = GetSafeHwnd(); 得到的hwnd就是句柄了 [解决办法] LZ指这个? GetCurrentProcess The GetCurrentProcess function returns a pseudohandle for the current process.
HANDLE GetCurrentProcess(VOID)
Parameters This function has no parameters.
Return Values The return value is a pseudohandle to the current process.
Remarks A pseudohandle is a special constant that is interpreted as the current process handle. The calling process can use this handle to specify its own process whenever a process handle is required. Pseudohandles are not inherited by child processes.