Re: Non-modal dialog in CSplitterWindow???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I want a dialog that does not float, but sits on the left side of the
frame window. One should be able to make it thinner (resize it
horizontally), so a splitter bar would be perfect. The dialog should be
able to scroll vertically, though.

Here is my (ugly) workaround: I use a CScrollView instead of the dialog.
This view has empty OnUpdate-handlers, so it won't mess with the tool
bar. Any OnCommands from the tool bar are routed by hand to the view.

I believe that this is quite unsophisticated. There should be a better
way to do this in MFC. I will have a look at the CDialogBar class. Is it
possible to create a dialog bar with any dialog template? Even
containing edits and such? Can I make a CDialogBar scrollable?

Wanting the dialog resizable and scrollable are two strong reasons to prefer CFormView in a splitter pane. (Note that CFormView inherits from CScrollView: The scrolling will be automatic.)

For the toolbar OnUpdate issue you have your choice between the recommended ugly workaround and your own ugly workaround :(

The toolbar is a child of the mainframe and is created/resized by it, so I don't think that solution is ugly at all. :)

--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • Re: Scroll Event
    ... If you want to be able to run a command regardless of where you are on ... why not run the command from the menu bar? ... Chip Pearson wrote: ... how to do this with scroll bar. ...
    (microsoft.public.excel.programming)
  • Re: Firefox development (Was: Wanted: talented programmers)
    ... At 2 min the icon appeared on the icon bar. ... At 2 min 30 sec a blank screen appeared with just the title bar. ... The top of the page stayed put and odd bits of the bottom ... I tried the little arrow at the top of the scroll bar and just ...
    (comp.sys.acorn.apps)
  • Re: Non-modal dialog in CSplitterWindow???
    ... You might want to put your toolbar code into the mainframe class or use ... so a splitter bar would be perfect. ... able to scroll vertically, though. ... controls on it, edit, labels etc. ...
    (microsoft.public.vc.mfc)
  • Re: Freeze Column
    ... To the very right of the scroll bar is a small "button" looking thing. ... Click and drag it to the left until a vertical bar appears from top to bottom on your worksheet. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Changing case and formatting of document
    ... I've come to rely on a) stretching the window & b) using the ... I slide the scroll bar OK ... moving the mouse over the help window and rolling the scroll wheel (which ...
    (microsoft.public.mac.office.word)