Click here to Skip to main content
15,898,792 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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
GeneralRe: Tabs, toolbars, views, and MFC... Pin
dontknowitall30-Oct-06 16:33
dontknowitall30-Oct-06 16:33 
Questioninputing string & int from file to array. Pin
Ramper30-Oct-06 9:43
Ramper30-Oct-06 9:43 
QuestionRe: inputing string & int from file to array. Pin
David Crow30-Oct-06 9:47
David Crow30-Oct-06 9:47 
AnswerRe: inputing string & int from file to array. Pin
Ramper30-Oct-06 9:52
Ramper30-Oct-06 9:52 
GeneralRe: inputing string & int from file to array. Pin
Zac Howland30-Oct-06 10:45
Zac Howland30-Oct-06 10:45 
QuestionRe: inputing string & int from file to array. Pin
David Crow30-May-07 9:24
David Crow30-May-07 9:24 
AnswerRe: inputing string & int from file to array. Pin
Zac Howland31-May-07 5:43
Zac Howland31-May-07 5:43 
GeneralRe: inputing string & int from file to array. Pin
David Crow31-May-07 6:00
David Crow31-May-07 6:00 
GeneralRe: inputing string & int from file to array. Pin
Zac Howland31-May-07 7:44
Zac Howland31-May-07 7:44 
QuestionRe: inputing string & int from file to array. Pin
David Crow31-May-07 8:42
David Crow31-May-07 8:42 
AnswerRe: inputing string & int from file to array. Pin
Zac Howland31-May-07 9:07
Zac Howland31-May-07 9:07 
GeneralRe: inputing string & int from file to array. Pin
David Crow1-Jun-07 4:13
David Crow1-Jun-07 4:13 
QuestionCPrintDialog issue Pin
Andy H30-Oct-06 8:59
Andy H30-Oct-06 8:59 
QuestionVS 2003 .NET System Path Pin
BlitzPackage30-Oct-06 8:20
BlitzPackage30-Oct-06 8:20 
AnswerRe: VS 2003 .NET System Path Pin
Mark Salsbery30-Oct-06 9:01
Mark Salsbery30-Oct-06 9:01 
GeneralRe: VS 2003 .NET System Path Pin
BlitzPackage30-Oct-06 9:11
BlitzPackage30-Oct-06 9:11 
GeneralRe: VS 2003 .NET System Path Pin
Mark Salsbery30-Oct-06 9:37
Mark Salsbery30-Oct-06 9:37 

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.