Well after a bit of research and some work...I'm now subclassing the window and am using (sorry in advance for the bad formatting...):
Code:
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
HDC hDC;
RECT rc1,rc2;
int x,y;
switch(uMsg){
case WM_NCACTIVATE:
if ((BOOL)wParam == FALSE)
{
DefWindowProc( hwnd, uMsg, wParam, lParam );
// Add code here to draw caption when window is inactive.
return TRUE;
}
// Fall through if wParam == TRUE, i.e., window is active.
case WM_NCPAINT:
// Let Windows do what it usually does. Let the window caption
// be empty to avoid any Windows-initiated caption bar drawing
DefWindowProc( hwnd, uMsg, wParam, lParam );
hDC = GetWindowDC( hwnd );
GetWindowRect( hwnd, (LPRECT)&rc2 );
// Compute the caption bar's origin. This window has a system box
// a minimize box, a maximize box, and has a resizeable frame
x = GetSystemMetrics( SM_CXSIZE ) +
GetSystemMetrics( SM_CXBORDER ) +
GetSystemMetrics( SM_CXFRAME );
y = GetSystemMetrics( SM_CYFRAME );
rc1.left = x;
rc1.top = y;
// 2*x gives twice the bitmap+border+frame size. Since there are
// only two bitmaps, two borders, and one frame at the end of the
// caption bar, subtract a frame to account for this.
rc1.right = rc2.right - rc2.left - 2*x -
GetSystemMetrics( SM_CXFRAME );
rc1.bottom = GetSystemMetrics( SM_CYSIZE );
// Render the caption. Use the active caption color as the text
// background.
SetBkColor( hDC, GetSysColor(COLOR_ACTIVECAPTION) );
DrawText( hDC, (LPSTR)"Left Justified Caption", -1,
(LPRECT)&rc1, DT_LEFT );
ReleaseDC( hwnd, hDC );
break;
}
}
which is pulled straight from the MSDN site, but the thing is painting the text but it is not painting the rest of the
window, which really messes up the program...any ideas?
Thanks!