16,472
社区成员
发帖
与我相关
我的任务
分享
LRESULT XXXXXXXXXX::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_SYSCOMMAND:
{
//DefWindowProc(hWnd, message, wParam, lParam);
if(wParam == SC_RESTORE)
{
CWnd *pWnd;
pWnd = GetDlgItem(IDC_LIST1);
CRect crect;
pWnd->GetClientRect(&crect);
pWnd->SetWindowPos( NULL,0,0,1215,600,SWP_NOZORDER | SWP_NOMOVE ); //位置不变,高度和宽度拉伸
CRect rect;
GetClientRect(&rect);
RepositionBars(AFX_IDW_CONTROLBAR_FIRST,AFX_IDW_CONTROLBAR_LAST,0);显示状态栏
m_StatBar.MoveWindow(0,rect.bottom-20,rect.right,10);
}
break;
}
}
return CDialogEx::WindowProc(message, wParam, lParam);
case WM_SIZE:
g_cx=LOWORD(lParam);
g_cy=HIWORD(lParam);
// Resize the status bar to fit along the bottom of the client area.
MoveWindow (m_hwndStatus, 0, g_cy - 10, g_cx, g_cy, TRUE);
// Set the rectangles for the multiple parts of the status bar.
// Make each part 1/4 of the width of the client area.
m_aWidths [0] = g_cx / 4;
m_aWidths [1] = g_cx / 2;
m_aWidths [2] = g_cx - m_aWidths [0];
m_aWidths [3] = -1;
SendMessage (m_hwndStatus, SB_SETPARTS, 4, (LPARAM)m_aWidths);
break;
case WM_SIZE: