It is currently Thu Dec 14, 2017 10:17 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: MDI Client + WM_SIZE
PostPosted: Tue Oct 30, 2007 7:17 am 
Offline

Joined: Thu Sep 15, 2005 9:23 am
Posts: 1194
Location: Behind you with a knife!
I have created an MDI Client and I have a toolbar and a statusbar too. I am having difficulty with the window message WM_SIZE. I know that if you have a MDI client that you must be careful when resizing that you don't ruin the toolbar and the statusbar like I am doing. You can see them both, it's just that they are not updated and MDI Windows draw over them.

Code:
case WM_SIZE:
   SendMessage(hToolbar, TB_AUTOSIZE, 0, 0);
   SendMessage(hStatusBar, WM_SIZE, 0, 0);

   GetClientRect(hWnd, &rectClient);
   GetWindowRect(hStatusBar, &rectStatus);
   GetWindowRect(hToolbar, &rectTool);

   uToolHeight = rectTool.bottom - rectTool.top;
   uStatusHeight = rectStatus.bottom - rectStatus.top;
   uClientAlreaHeight = rectClient.bottom;

   MoveWindow(hMDIWnd, 0, uToolHeight, rectClient.right,    uClientAlreaHeight - uStatusHeight - uToolHeight, TRUE);
   break;
}

   return DefFrameProc(hWnd, hMDIWnd, message, wParam, lParam);


Can anyone tell me what I'm doing wrong?

_________________
http://www.jamesturner.de/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group