I am trying to set my window to a desktop child, and I am doing it like this:
HWND Progman = :: SearchWindowEx (:: FindWindowEx (:: FindWindow (L "Programmer", "Program Manager"), Faucet, L "SheldLL Defviewview", "L"), Tap, L "SysListView32", L "Folder View"); Set paper (M_hwd, progammahwand);
This works fine in windowsXP, my window is below all windows and when I press the "show desktop" option window and suppresses all other "normal" windows press gives.
But when I look at the code above in Win7, in Spy ++, I can see that my window is a child window of SysListView32, but it does not show (and its WM_VISIBLE style is)?
What am I missing? Or did Win7 change from winXP? How can I do this to work on Win7?
Update: There is something to do with aero theme, because if I change the desktop theme by default, the window is displayed, but if I switch back
I tried the code and it works fine with my trial MFC app except you SetParent First Double Colon is required. You said that where did you place the code? I have kept my OnCreate function without problems.
int CMainFrame :: OnCreate (LPCreatAstrak lpCreateStruct) {if (CFRDriteStruct == -1) Return -1; // Create a view to capture the client area of the frame if! (! M_wndView.Create (NULL, NULL, AFX_WS_DEFAULT_VIEW, CRect (0, 0, 0, 0), this, AFX_IDW_PANE_FIRST, NULL) {TRACE0 ("Create a View Window \ n"); Return -1; } HWND ProgmanHwnd = :: FindWindowEx (:: FindWindowEx (:: FindWindow (L "Programmer", "Program Manager"), NULL, L "SHELLDLL_DefView", "L"), NULL, L "SysListView32", L "FolderView "); :: setpants (m_hwund, progammahwand); Return 0; }
Comments
Post a Comment