#include <commctrl.h>
LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam)
{
int SBPart[4], i;
static HWND hState;
switch (iMessage) {
case WM_CREATE:
InitCommonControls();
hState = CreateStatusWindow(WS_CHILD|WS_VISIBLE, "", hWnd, 0);
return 0;
case WM_DESTROY:
PostQuitMessage(0);
return 0;
case WM_SIZE:
SendMessage(hState, WM_SIZE, wParam, lParam);
for (i=0; i<4; i++) {
SBPart[i] = LOWORD(lParam) / 4 * (i + 1);
}
SendMessage(hState, SB_SETPARTS, 4, (LPARAM)SBPart);
SendMessage(hState, SB_SETTEXT, 0, (LPARAM)"...");
return 0;
}
return(DefWindowProc(hWnd,iMessage,wParam,lParam));
}