Click here to Skip to main content
15,911,315 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Fastest way to render JPEG Pin
Hamid_RT30-Oct-06 18:20
Hamid_RT30-Oct-06 18:20 
Questionweb server info Pin
apoorva_raje30-Oct-06 17:02
apoorva_raje30-Oct-06 17:02 
Questionhow to let a gui program run in background? Pin
ikohl30-Oct-06 16:21
ikohl30-Oct-06 16:21 
AnswerRe: how to let a gui program run in background? Pin
bankai12330-Oct-06 16:23
bankai12330-Oct-06 16:23 
Generalthanks, but seems this one belongs to other vb.net, or C# Pin
ikohl30-Oct-06 17:28
ikohl30-Oct-06 17:28 
AnswerRe: how to let a gui program run in background? Pin
Mark Salsbery30-Oct-06 17:45
Mark Salsbery30-Oct-06 17:45 
AnswerRe: how to let a gui program run in background? Pin
David Crow31-Oct-06 3:24
David Crow31-Oct-06 3:24 
Questionreg 16bit dll Pin
mahae30-Oct-06 16:04
mahae30-Oct-06 16:04 
AnswerRe: reg 16bit dll Pin
Michael Dunn30-Oct-06 17:14
sitebuilderMichael Dunn30-Oct-06 17:14 
QuestionFor .SVG file to meta file convert Pin
venkat kumar30-Oct-06 15:38
venkat kumar30-Oct-06 15:38 
AnswerRe: For .SVG file to meta file convert Pin
Christian Graus30-Oct-06 16:29
protectorChristian Graus30-Oct-06 16:29 
QuestionPrint of Directory Tree Pin
chrisKone30-Oct-06 15:37
chrisKone30-Oct-06 15:37 
AnswerRe: Print of Directory Tree Pin
chrisKone30-Oct-06 18:19
chrisKone30-Oct-06 18:19 
AnswerRe: Print of Directory Tree Pin
Hamid_RT30-Oct-06 18:38
Hamid_RT30-Oct-06 18:38 
GeneralRe: Print of Directory Tree Pin
chrisKone30-Oct-06 21:19
chrisKone30-Oct-06 21:19 
GeneralRe: Print of Directory Tree Pin
Hamid_RT31-Oct-06 8:01
Hamid_RT31-Oct-06 8:01 
GeneralRe: Print of Directory Tree Pin
David Crow31-Oct-06 3:25
David Crow31-Oct-06 3:25 
QuestionCan't find msvcr80.dll in debug version Pin
FengShang30-Oct-06 15:26
FengShang30-Oct-06 15:26 
Questionerror with inserting the record in database Pin
With_problem30-Oct-06 14:30
With_problem30-Oct-06 14:30 
AnswerRe: error with inserting the record in database Pin
FengShang30-Oct-06 14:50
FengShang30-Oct-06 14:50 
GeneralRe: error with inserting the record in database Pin
With_problem30-Oct-06 14:59
With_problem30-Oct-06 14:59 
GeneralRe: error with inserting the record in database Pin
FengShang30-Oct-06 15:04
FengShang30-Oct-06 15:04 
AnswerRe: error with inserting the record in database Pin
Hamid_RT30-Oct-06 18:27
Hamid_RT30-Oct-06 18:27 
QuestionTabs, toolbars, views, and MFC... Pin
dontknowitall30-Oct-06 11:13
dontknowitall30-Oct-06 11:13 
AnswerRe: Tabs, toolbars, views, and MFC... Pin
Mark Salsbery30-Oct-06 12:08
Mark Salsbery30-Oct-06 12:08 
dontknowitall wrote:
...none of these solutions includes a toolbar...


The trick to making it easy with MFC is to use a frame window as a "view" and use the actual
CView-derived window as a client window of that frame. Toolbars work nicely with frame windows
(CFrameWnd-derived windows).

So, for your situation, the windows you'll need (from bottom upward in z-order) are
(1) A CFrameWnd-derived window containing a toolbar
(2) A CTabCtrl-derived window used as the "view" (client window) of the frame window (1)
(3) CView-derived window(s) for each tab created as children of the frame window (1) but
always resized in response to WM_SIZE to fit the "client area" of the tab control
(CTabCtrl::AdjustRect() gives you the tab control's "client" rect).

Used this way, there's no need to worry about the toolbar. It stays anchored to the frame (unless
you make it dockable) and the client window (tab control) is automagically kept sized within the
remaining client area of the frame window. You just need to keep track of each tab's window, as
is necessary with tab controls anyway.

dontknowitall wrote:
The tab control should switch between 2 to 4 views and should not have any funky borders


Not sure what you mean by "switch between 2 to 4 views " but you can control borders using the
style flags used when creating the different windows.

Hope this helps a bit,
Mark

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.