把窗体钉在桌面是如何实现的

如题所述

把你的窗口的父窗口句柄设置为名称为Progman的窗口 的句柄就可以了。
HWND hDesktop = ::FindWindow("Progman", NULL);
//hDesktop = ::GetWindow(hDesktop, GW_CHILD);
CWnd* pWndDesktop = CWnd::FromHandle(hDesktop);
this->SetParent(pWndDesktop);
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答