Publish the wtl Application Wizard appwizard0.2

Source: Internet
Author: User
The wtl Application Wizard Appwizard is a standalone application, and the template resources directly use the wtl80 Application Wizard appwiz, which is compatible with it and supports more functions. Generate the. DSP file of vs60, which can be read by vs60, vs2002, vs2003, vs2005, and vs2008.
In appwizard0.2, the frame dialog wizard is added to generate a dialog box application that supports menu, rebar, cmdbar, toolbar, and statusbar. This is implemented through the wtl extension library of VFC.

1. Download and install:
: Http://sf.net/projects/visualfc
Decompress the downloaded appwizard.zip file and you will be able to use it normally.
To use the frame dialog wizard, copy the./include/vfcframe. h and vfcfonts. H files to the include directory of wtl80.
Ii. Appwizard usage:
Run Appwizard. This wizard is exactly the same as the wtl80 wizard. I will not elaborate on it here, but I will focus on frame dialog.
On the Application Type Wizard Page, select dialog based and select the frame dialog mode. The check button "Check it add VFC files to project... "if selected, the vfcframe will be automatically generated when the project is generated. copy the H file to the project and use include "vfcframe. H "contains, otherwise use # include <vfcframe. h> search in the default include of VC (default ). After frame dialog is selected, you can select and control rebar, cmdbar, toolbar, and statusbar on the next page.

Code Generation: Class cmaindlg: Public cdialogimpl <cmaindlg>, public cupdateui <cmaindlg>,
Public cmessagefilter, public cidlehandler,
Public cframedialog <cmaindlg>, public cdialogresize <cmaindlg>

Implement // CREATE command bar window in oninitdialog
Hwnd hwndcmdbar = m_cmdbar.create (m_hwnd, rcdefault, null, atl_simple_cmdbar_pane_style );
// Attach menu
M_cmdbar.attachmenu (getmenu ());
// Load command bar Images
M_cmdbar.loadimages (idr_mainframe );
// Remove old menu
Setmenu (null );

Hwnd hwndtoolbar = createsimpletoolbarctrl (m_hwnd, idr_mainframe, false, atl_simple_toolbar_pane_style );

Createsimplerebar (atl_simple_rebar_noborder_style );
Addsimplerebarband (hwndcmdbar );
Addsimplerebarband (hwndtoolbar, null, true );

Createsimplestatusbar ();

// Frame dialog reposition Dialog
Repositiondialog ();

// Register object for message filtering and idle updates
Cmessageloop * ploop = _ module. getmessageloop ();
Atlassert (ploop! = NULL );
Ploop-> addmessagefilter (this );
Ploop-> addidlehandler (this );

Uiaddchildwindowcontainer (m_hwnd );

Uiaddtoolbar (hwndtoolbar );
Uisetcheck (id_view_toolbar, 1 );
Uisetcheck (id_view_status_bar, 1 );

Dlgresize_init ();

Iii. Code Control
The generated code is similar to cframeworkwimpl of SDI. The only note is that a repositiondialog function is added to re-adjust the dialog box layout, and then the interface is adjusted through cdialogresize, for further control, you can use the wtl Wizard of visualfc to automatically generate and control code.

4. About visualfc and Appwizard
Visualfc provides Class Wizard support for wtl and winxgui. It can automatically generate code such as message ing, layout management, DDX, and update, and use wtl and wxWidgets.
Appwizard provides Application Wizard support for wtl and winxgui to identify the wizard template file of vs2005. This project is also compiled by wtl and completed quickly using visualfc.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.