Toolbar capabilty in dialog window?

  • Thread starter Thread starter sweetjones
  • Start date Start date
  • Tags Tags
    Window
AI Thread Summary
Implementing printing capabilities in an MFC dialog window can be challenging, particularly when trying to incorporate toolbars. While creating a Single Document Interface (SDI) with the CFormView class lacks printing support, a dialog-based application allows for the addition of a print menu item through the system menu. However, adding a toolbar directly in a dialog is not straightforward, as MFC does not support it natively. Users are encouraged to consider alternatives, such as adding a print button directly to the dialog instead of a toolbar, which aligns better with user interface guidelines. Resources like CodeProject provide useful insights and workarounds for enhancing MFC applications.
sweetjones
Messages
44
Reaction score
0
I've searched this sight but to no avail. I am wondering how can i implement printing capabilty in my MFC dialog window. I've tried creating a SDI with the CFormView Class, but there is no printing support that way. If I try to make a Dialog-Based Application the "Standard Toolbar" option cannot be selected. However, through a Dialog-Based App I can create a System Menu and insert a "Print" menu item. But how can you implement a toolbar in a Dialog window? I'm using VC++ 2005.
 
Technology news on Phys.org
mgb_phys said:
Do you mean toolbar or menus?
It's not directly supported in MFC so you have to draw it yourself - here is a good place to start http://www.codeproject.com/KB/dialog/cdialogex.aspx

I meant toolbars. I am going to have to print something from an edit control so I'm going to need a print function. I want a system menu option, which I can figure out how to insert, and I want a toolbar, which I cannot figure out how to insert. I'll take a look at the link you provided. Thanx for your help!
 
codeproject is a good source for working around all the features of MFC.
You can of course always just add a print button to the dialog - there's no need for it to be a toolbar.
 
mgb_phys said:
codeproject is a good source for working around all the features of MFC.
You can of course always just add a print button to the dialog - there's no need for it to be a toolbar.

Great point! Thankx for the help and reference once again.
 
Honestly, you don't want to put a toolbar in a modal dialog anyway. It breaks all sorts of long-standing guidelines in effective human-computer interaction.

- Warren
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top