I have my Toolbar and TabControl both up and running properly, except that the Toolbar covers the Tabs of the TabControl. How do you fix this? I have searched high and low and can't find the answer
TIA
-Jef
I have my Toolbar and TabControl both up and running properly, except that the Toolbar covers the Tabs of the TabControl. How do you fix this? I have searched high and low and can't find the answer
TIA
-Jef
Move the tab control down below the toolbar on the parent's client area. You can either do this by specifying the dimensions when you create the tab control or at runtime with either MoveWindow or SetWindowPos.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.
Thanks Ken.Originally Posted by Ken Fitlike
BTW, I'm working with your examples to learn all this stuff. I guess my
main problem is getting the TabControl to resize automagically whenever I toggle the Toolbar on or off. You wouldn't happen to have a snippet of code to show how this is done would you? Sorry for not being more specific in the original post. Still trying to get my head wrapped around coding for Windows...
-Jef
Write a function to [edit]take[/edit] care of it; presumably you're toggling the toolbar visibility in response to specific user actions (menu,keyboard, etc.) - just call your diy 'resizing' function in response to that. Something like:Where toolbar_is_visible is some BOOLean value defined by yourself which reflects the visibility of the toolbar.Code:/*get wnd dimensions*/ RECT rc,rcToolbar; GetClientRect(hParent,&rc); GetClientRect(hToolbar,&rcToolbar); if (toolbar_is_visible==TRUE) { rc.bottom-=rcToolbar.bottom; } MoveWindow(hTabCntrl,0,0,rc.right,rc.bottom,1);
Last edited by Ken Fitlike; 08-07-2004 at 10:33 AM.
CProgramming FAQ
Caution: this person may be a carrier of the misinformation virus.