PDA

View Full Version : Toolbar capabilty in dialog window?


sweetjones
Mar17-08, 10:52 AM
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.

mgb_phys
Mar17-08, 11:28 AM
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

sweetjones
Mar17-08, 12:20 PM
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 gonna 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!!!

mgb_phys
Mar17-08, 01:00 PM
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 - theres no need for it to be a toolbar.

sweetjones
Mar17-08, 01:49 PM
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 - theres no need for it to be a toolbar.

Great point! Thankx for the help and reference once again.

chroot
Mar17-08, 03:13 PM
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