Click here to Skip to main content
15,881,424 members
Articles / Desktop Programming / MFC
Article

Win32 AppWizard (exe)

Rate me:
Please Sign up or sign in to vote.
3.43/5 (5 votes)
18 Aug 2001 73.6K   1.5K   17   6
A simple AppWizard for writing Win32 Applications

Sample Image

Introduction

This article will help you develop a Win32 API Application easily. This wizard creates the basic code for you.

Single Document Base Code, View Mode Code, Edit Mode Code, RichEdit Mode Code.
Multi Document Base Code, View Mode Code, Edit Mode Code, RichEdit Mode Code.
Dialog Based

This version does not support message cracking code.

Installing the AppWizard

Open the source code and compile. The 'Executable For Debug Session' dialog will appear - press cancel. Select File Menu > New... and select Projects > 'Win32 AppWizard (exe)' and make your project.

or

Extract the demo file into your Devstudio folder 

eg. C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Template

Select File Menu > New... Projects >  'Win32 AppWizard (exe)' and make your project.

Source Code

BOOL CCustom1Dlg::OnDismiss()
{
	if (!UpdateData(TRUE))
		return FALSE;

	// TODO: Set template variables based on the dialog's data.
	Win32aw.SetAppType(m_app);
	RemoveData();
	switch(Win32aw.GetAppType()) {
		case 0:
			Win32aw.m_Dictionary["SDI_BASED"]="Yes";
			break;
		case 1:
			Win32aw.m_Dictionary["MDI_BASED"]="Yes";
			break;
		case 2:
			Win32aw.m_Dictionary["DIALOG_BASED"]="Yes";
			break;
	}
	return TRUE;	// return FALSE if the dialog shouldn't be dismissed
}
BOOL CCustom2Dlg::OnDismiss()
{
	if (!UpdateData(TRUE))
		return FALSE;

	// TODO: Set template variables based on the dialog's data.
	RemoveData();
	if(Win32aw.GetAppType()==0) {
		Win32aw.SetAppType(4);
	}
	if(Win32aw.GetAppType()==1) {
		Win32aw.SetAppType(5);
	}
	if(Win32aw.GetAppType()==4) {
		m_pbmpBase=&m_bmpSingle;
		c_menu.EnableWindow(TRUE);
		c_tool.EnableWindow(TRUE);
		c_status.EnableWindow(TRUE);
		Win32aw.m_Dictionary["SDI_VIEW"]="Yes";
	}
	if(Win32aw.GetAppType()==5) {
		m_pbmpBase=&m_bmpMulti;
		c_menu.EnableWindow(FALSE);
		c_tool.EnableWindow(FALSE);
		c_status.EnableWindow(FALSE);
		Win32aw.m_Dictionary["MDI_VIEW"]="Yes";
	}
	if(Win32aw.GetCodeType()==0) {
		m_pbmpCode=&m_bmpCase;
		Win32aw.m_Dictionary["SWITCH"]="Yes";
	}
	else {
		m_pbmpCode=&m_bmpCrack;
		Win32aw.m_Dictionary["CRACKER"]="Yes";
	}
	if(m_menu==TRUE) {
		Win32aw.m_Dictionary["MENU"]="Yes";
	}
	if(m_tool==TRUE) {
		Win32aw.m_Dictionary["TOOL"]="Yes";
	}
	if(m_status==TRUE) {
		Win32aw.m_Dictionary["STATUS"]="Yes";
	}
	Win32aw.m_Dictionary["VIEW"]="Yes";
	m_bFirst=FALSE;
	return TRUE;	// return FALSE if the dialog shouldn't be dismissed
}
BOOL CCustom3Dlg::OnDismiss()
{
	if (!UpdateData(TRUE))
		return FALSE;

	// TODO: Set template variables based on the dialog's data.
	Win32aw.m_Dictionary.RemoveKey("SDI_VIEW");
	Win32aw.m_Dictionary.RemoveKey("MDI_VIEW");
	if(Win32aw.GetAppType()==4) {
		switch(Win32aw.GetViewType()) {
			case 0:
				Win32aw.m_Dictionary["SDI_VIEW"]="Yes";
				break;
			case 1:
				Win32aw.m_Dictionary["SDI_EDIT"]="Yes";
				break;
			case 2:
				Win32aw.m_Dictionary["SDI_RICHEDIT"]="Yes";
				break;
		}
	}
	else {
		switch(Win32aw.GetViewType()) {
			case 0:
				Win32aw.m_Dictionary["MDI_VIEW"]="Yes";
				break;
			case 1:
				Win32aw.m_Dictionary["MDI_EDIT"]="Yes";
				break;
			case 2:
				Win32aw.m_Dictionary["MDI_RICHEDIT"]="Yes";
				break;
		}
	}
	return TRUE;	// return FALSE if the dialog shouldn't be dismissed
}

Using AppWizard

Can you use the 'MFC AppWizard (exe)'? Then you can use the 'Win32 AppWizard (exe)' too!

Step 1
Step 2
 

Step 3

 

Finish Dialog

>

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Korea (Republic of) Korea (Republic of)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionCan be a tutorial? Pin
Volki12-Mar-02 13:51
Volki12-Mar-02 13:51 
GeneralCode Pin
Andreas20-Aug-01 4:06
Andreas20-Aug-01 4:06 
GeneralRe: Code Pin
20-Aug-01 10:25
suss20-Aug-01 10:25 
GeneralRe: Code Pin
Andreas20-Aug-01 21:59
Andreas20-Aug-01 21:59 
GeneralRe: Code Pin
21-Aug-01 10:27
suss21-Aug-01 10:27 
GeneralRe: Code Pin
Shulik21-Aug-03 20:33
Shulik21-Aug-03 20:33 

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.