win+d

来源:互联网 发布:网络流行词的由来 编辑:程序博客网 时间:2024/06/10 11:43

    dlg = new CMyDlg;
    dlg->Create(IDD_DIALOG1);
    HWND hDesktop = ::FindWindow("Progman", NULL);
    if(hDesktop == NULL)
    {
        return TRUE;
    }
    HWND hDesktop1 = ::GetWindow(hDesktop, GW_CHILD);
    if(hDesktop1 == NULL)
    {
        return TRUE;
    }
    CWnd* pWndDesktop = CWnd::FromHandle(hDesktop1);
    dlg->SetParent(pWndDesktop);
    dlg->ShowWindow(SW_SHOW);