/// 이 소스와
BOOL CDLGMILDlg::OnInitDialog()
BOOL CDLGMILDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// 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
CRect rectWorkArea = CRect(0, 0, 0, 0);
CRect rectTaskBar = CRect(0, 0, 0, 0);
CWnd* lpWnd = CWnd::FindWindow("Shell_TrayWnd", "");
if( lpWnd )
{
SystemParametersInfo(SPI_GETWORKAREA, 0, (LPVOID)&rectWorkArea, 0);
lpWnd->GetWindowRect(rectTaskBar);
rectWorkArea.bottom += rectTaskBar.Height();
SystemParametersInfo(SPI_SETWORKAREA, 0, (LPVOID)&rectWorkArea, 0);
lpWnd->ShowWindow(SW_HIDE);
MoveWindow(0, 0, GetSystemMetrics(SM_CXFULLSCREEN), rectWorkArea.Height()); //GetSystemMetrics(SM_CYFULLSCREEN));
}
return TRUE; // return TRUE unless you set the focus to a control
}
// 이 소스를 추가해주자.
// 이 소스를 추가해주자.
void CDLGMILDlg::OnDestroy()
{
CDialog::OnDestroy();
// TODO: Add your message handler code here
CRect rectWorkArea = CRect(0, 0, 0, 0);
CRect rectTaskBar = CRect(0, 0, 0, 0);
CWnd* lpWnd = CWnd::FindWindow("Shell_TrayWnd", "");
if( lpWnd )
{
SystemParametersInfo(SPI_GETWORKAREA, 0, (LPVOID)&rectWorkArea, 0);
if( lpWnd )
{
lpWnd->GetWindowRect(rectTaskBar);
rectWorkArea.bottom -= rectTaskBar.Height();
SystemParametersInfo(SPI_SETWORKAREA, 0, (LPVOID)&rectWorkArea, 0);
lpWnd->ShowWindow(SW_SHOW);
}
}
}