Click here to Skip to main content
Click here to Skip to main content
Go to top

Win32 AppWizard (exe)

, 18 Aug 2001
Rate this:
Please Sign up or sign in to vote.
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

Share

About the Author

Young-Cheol Bok
Web Developer
Korea (Republic Of) Korea (Republic Of)
No Biography provided

Comments and Discussions

 
QuestionCan be a tutorial? PinmemberVolki12-Mar-02 13:51 
GeneralCode PinmemberAndreas20-Aug-01 4:06 
GeneralRe: Code PinmemberCrispy20-Aug-01 10:25 
This is a rough group. Wink | ;) There was once a day when you could contribute and not be ripped to shreds when it wasn't something that somebody wanted.
 
I'd say its pretty damn cool to have an example in source that creates a wizard at all.
 
Maybe you should write this wizard with message cracking instead of complaining that this one didn't.
GeneralRe: Code PinmemberAndreas20-Aug-01 21:59 
GeneralRe: Code PinmemberCrispy21-Aug-01 10:27 
GeneralRe: Code PinmemberShulik21-Aug-03 20:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 19 Aug 2001
Article Copyright 2001 by Young-Cheol Bok
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid