The code I have now functions fine, it's just that when the window resizes the scroll bar flickers horribly. The image is fine, it's just the scroll bar. Shaft and all. These black rectangles flicker over the bar and arrows as I resize it.
This is what happens when the parent window is resized. Theres a WM_SIZE sent to the status bar before this.
Code:
void SizeWindowStatus(void)
{
RECT rctp;
RECT rctc;
RECT rcts;
int yNewHeight;
GetClientRect(g_hWndP, &rctp);
GetClientRect(g_hWndC, &rctc);
GetClientRect(g_hStatus, &rcts);
yNewHeight = rctp.bottom - rcts.bottom;
MoveWindow(g_hWndC, 0, 0, rctp.right, yNewHeight, TRUE);
UpdateWindow(g_hWndC);
return;
}
P is the parent, C is the child and S is the status. This bit sizes the child window as the parent window sizes so it fits against the status bar and new parent width, which it does fine. The scrollbar flicker is unbearable though and I don't have a clue what's causing it.