Click here to Skip to main content
15,921,716 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Clicking a windowless button programatically Pin
Member 321910418-Apr-10 6:40
Member 321910418-Apr-10 6:40 
AnswerRe: Clicking a windowless button programatically Pin
«_Superman_»18-Apr-10 7:52
professional«_Superman_»18-Apr-10 7:52 
GeneralRe: Clicking a windowless button programatically Pin
Green Fuze18-Apr-10 9:55
Green Fuze18-Apr-10 9:55 
GeneralRe: Clicking a windowless button programatically Pin
«_Superman_»18-Apr-10 10:01
professional«_Superman_»18-Apr-10 10:01 
GeneralRe: Clicking a windowless button programatically Pin
Green Fuze18-Apr-10 19:29
Green Fuze18-Apr-10 19:29 
GeneralRe: Clicking a windowless button programatically Pin
Keith Worden19-Apr-10 3:27
Keith Worden19-Apr-10 3:27 
GeneralRe: Clicking a windowless button programatically Pin
Green Fuze19-Apr-10 3:56
Green Fuze19-Apr-10 3:56 
Questionhow to embed the window of my program in the desktop?(The window is showed under the desktop icons.) [modified] Pin
letianzhu17-Apr-10 20:30
letianzhu17-Apr-10 20:30 
I try to embed the window of my program in the desktop.The window is under the desktop icons without covering them!
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.

BOOL CTestDialogDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	// Add "About..." menu item to system menu.
	
	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);
	
	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->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
}

However,this method dosen't work.Does anybody have some guidance on how to do this?
Questionset print area Pin
Amin.Abdi17-Apr-10 8:34
Amin.Abdi17-Apr-10 8:34 
QuestionSerialize in vc++ 2008 Pin
Wasabi_17-Apr-10 3:04
Wasabi_17-Apr-10 3:04 
AnswerRe: Serialize in vc++ 2008 Pin
CPallini17-Apr-10 3:26
mveCPallini17-Apr-10 3:26 
GeneralRe: Serialize in vc++ 2008 Pin
Wasabi_17-Apr-10 3:30
Wasabi_17-Apr-10 3:30 
QuestionCalling Fns in formview Pin
hellogany16-Apr-10 23:58
hellogany16-Apr-10 23:58 
AnswerRe: Calling Fns in formview Pin
hellogany17-Apr-10 0:47
hellogany17-Apr-10 0:47 
QuestionCan you help me ? I need source code of a program like Total commander. Pin
thanhkhanhcntt16-Apr-10 15:18
thanhkhanhcntt16-Apr-10 15:18 
AnswerRe: Can you help me ? I need source code of a program like Total commander. Pin
Tim Craig16-Apr-10 17:50
Tim Craig16-Apr-10 17:50 
GeneralRe: Can you help me ? I need source code of a program like Total commander. Pin
thanhkhanhcntt16-Apr-10 20:15
thanhkhanhcntt16-Apr-10 20:15 
AnswerRe: Can you help me ? I need source code of a program like Total commander. Pin
Wes Aday16-Apr-10 18:04
professionalWes Aday16-Apr-10 18:04 
AnswerRe: Can you help me ? I need source code of a program like Total commander. Pin
jeron117-Apr-10 2:02
jeron117-Apr-10 2:02 
QuestionMessage Removed Pin
16-Apr-10 7:42
aruneshjoshi16-Apr-10 7:42 
QuestionRe: very urgent help needed in openmp Pin
Maximilien16-Apr-10 7:45
Maximilien16-Apr-10 7:45 
AnswerRe: very urgent help needed in openmp Pin
aruneshjoshi16-Apr-10 7:53
aruneshjoshi16-Apr-10 7:53 
AnswerRe: very urgent help needed in openmp Pin
loyal ginger16-Apr-10 7:54
loyal ginger16-Apr-10 7:54 
GeneralRe: very urgent help needed in openmp Pin
aruneshjoshi16-Apr-10 8:06
aruneshjoshi16-Apr-10 8:06 
QuestionRe: very urgent help needed in openmp Pin
David Crow16-Apr-10 8:29
David Crow16-Apr-10 8:29 

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.