Click here to Skip to main content
15,887,214 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: DVD burning problem using windows XP Service pack2 Pin
Michel Godfroid20-Apr-10 1:02
Michel Godfroid20-Apr-10 1:02 
AnswerRe: DVD burning problem using windows XP Service pack2 Pin
Moak20-Apr-10 0:53
Moak20-Apr-10 0:53 
QuestionListview header mouse click Pin
arun_pk19-Apr-10 20:08
arun_pk19-Apr-10 20:08 
AnswerRe: Listview header mouse click Pin
Stephen Hewitt19-Apr-10 20:58
Stephen Hewitt19-Apr-10 20:58 
AnswerRe: Listview header mouse click Pin
KarstenK19-Apr-10 21:00
mveKarstenK19-Apr-10 21:00 
QuestionMonitoring received packets on app which uses IOCP(hooking) Pin
l0odi19-Apr-10 18:51
l0odi19-Apr-10 18:51 
AnswerRe: Monitoring received packets on app which uses IOCP(hooking) Pin
l0odi21-Apr-10 6:10
l0odi21-Apr-10 6:10 
Questionhow to embed the window of my program in the desktop?(The window is showed under the desktop icons.) Pin
letianzhu19-Apr-10 17:50
letianzhu19-Apr-10 17:50 
I try to embed the window of my program in the desktop.<big>The window is under the desktop icons without covering them!</big>
I have tried the following method.
As far as I know,the desktop consists of four sub-layers.Using spy++,I find the first three layers--1.SysListView32 2.SHELLDLL_DefView 3.Program Manager.
I tried to put my window on top of the second layer.

<pre>BOOL CTestDialogDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX &amp;amp; 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX &amp;lt; 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu-&amp;gt;AppendMenu(MF_SEPARATOR);
pSysMenu-&amp;gt;AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here

HWND tmpHandle = ::FindWindow("Progman",NULL); //the hwnd of the third layer
tmpHandle = ::GetWindow(tmpHandle,GW_CHILD); //the hwnd of the second layer
CWnd* pWndDesktop = CWnd::FromHandle(tmpHandle); //get the window of the second layer
this->SetParent(pWndDesktop); //set the second layer window as the parent of my window
tmpHandle = ::GetWindow(tmpHandle,GW_CHILD); //the hwnd of the first layer
::SetWindowPos(tmpHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_SHOWWINDOW|SWP_NOSIZE); //bing the first layer to the top

return TRUE; // return TRUE unless you set the focus to a control
}</pre>
However,this method dosen't work.Does anybody have some guidance on how to do this?
AnswerRe: how to embed the window of my program in the desktop?(The window is showed under the desktop icons.) Pin
Code-o-mat19-Apr-10 21:42
Code-o-mat19-Apr-10 21:42 
GeneralRe: how to embed the window of my program in the desktop?(The window is showed under the desktop icons.) Pin
Stephen Hewitt19-Apr-10 21:57
Stephen Hewitt19-Apr-10 21:57 
AnswerRe: how to embed the window of my program in the desktop?(The window is showed under the desktop icons.) Pin
Michel Godfroid20-Apr-10 3:20
Michel Godfroid20-Apr-10 3:20 
GeneralRe: how to embed the window of my program in the desktop?(The window is showed under the desktop icons.) Pin
letianzhu20-Apr-10 4:55
letianzhu20-Apr-10 4:55 
QuestionWinSock 2 + UNICODE / Win32 Pin
Fareed Rizkalla19-Apr-10 11:22
Fareed Rizkalla19-Apr-10 11:22 
AnswerRe: WinSock 2 + UNICODE / Win32 Pin
Richard MacCutchan19-Apr-10 11:46
mveRichard MacCutchan19-Apr-10 11:46 
GeneralRe: WinSock 2 + UNICODE / Win32 Pin
Stephen Hewitt19-Apr-10 14:41
Stephen Hewitt19-Apr-10 14:41 
GeneralRe: WinSock 2 + UNICODE / Win32 Pin
Fareed Rizkalla19-Apr-10 15:45
Fareed Rizkalla19-Apr-10 15:45 
Question[SOLVED]Problem using dmColor member of DEVMODE struct [modified] Pin
hhh19-Apr-10 7:14
hhh19-Apr-10 7:14 
QuestionUnhandled exception Pin
PankajB19-Apr-10 5:59
PankajB19-Apr-10 5:59 
AnswerRe: Unhandled exception Pin
Richard MacCutchan19-Apr-10 6:14
mveRichard MacCutchan19-Apr-10 6:14 
GeneralRe: Unhandled exception Pin
PankajB19-Apr-10 6:50
PankajB19-Apr-10 6:50 
GeneralRe: Unhandled exception Pin
Richard MacCutchan19-Apr-10 6:57
mveRichard MacCutchan19-Apr-10 6:57 
AnswerRe: Unhandled exception Pin
Stephen Hewitt19-Apr-10 14:09
Stephen Hewitt19-Apr-10 14:09 
GeneralRe: Unhandled exception Pin
ramana.g19-Apr-10 19:30
ramana.g19-Apr-10 19:30 
GeneralRe: Unhandled exception Pin
Stephen Hewitt19-Apr-10 21:48
Stephen Hewitt19-Apr-10 21:48 
GeneralRe: Unhandled exception Pin
Saurabh.Garg19-Apr-10 19:51
Saurabh.Garg19-Apr-10 19:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.