那就改成这样 CClientDC dc(this); CRect rc; GetClientRect(&rc); int x = GetSystemMetrics(SM_CXFULLSCREEN); int y = GetSystemMetrics(SM_CYFULLSCREEN); SetWindowPos(NULL, x, y, 0, 0 ,SWP_NOSIZE);
刚才写错了,应该这样 CClientDC dc(this); CRect rc; GetClientRect(&rc); int x = GetSystemMetrics(SM_CXFULLSCREEN) -rc.Width(); int y = GetSystemMetrics(SM_CYFULLSCREEN)-rc.Height(); SetWindowPos(NULL, x, y, 0, 0 ,SWP_NOSIZE);
CClientDC dc(this);
CRect rc;
GetClientRect(&rc);
int x = dc.GetDeviceCaps (HORZRES) -rc.Width();
int y = dc.GetDeviceCaps (VERTRES) -rc.Height();
SetWindowPos(NULL, x, y, 0, 0 ,SWP_NOSIZE);2.
long lExStyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);
lExStyle &= ~WS_EX_APPWINDOW;
lExStyle |= WS_EX_TOOLWINDOW;
::SetWindowLong(m_hWnd, GWL_EXSTYLE, lExStyle);
这里有关于托盘的文章,还带例子程序,你看看
http://www.vckbase.com/document/viewdoc.asp?id=492
http://www.codeproject.com/internet/MailMonitor.asp
CClientDC dc(this);
CRect rc;
GetClientRect(&rc);
int x = GetSystemMetrics(SM_CXFULLSCREEN);
int y = GetSystemMetrics(SM_CYFULLSCREEN);
SetWindowPos(NULL, x, y, 0, 0 ,SWP_NOSIZE);
CClientDC dc(this);
CRect rc;
GetClientRect(&rc);
int x = GetSystemMetrics(SM_CXFULLSCREEN) -rc.Width();
int y = GetSystemMetrics(SM_CYFULLSCREEN)-rc.Height();
SetWindowPos(NULL, x, y, 0, 0 ,SWP_NOSIZE);
太感谢这位兄弟了