#include <windows.h>

#define MODAL_DLG_ID			1
#define MODELESS_DLG_ID 		2

#define EDIT_ID				100

#define ID_ICO_APPLICATION		1

#define ON_BMP_ID			1
#define OFF_BMP_ID			2

#define ID_MAIN_MENU			1

#define CMD_MODAL_DLG			101
#define CMD_MODELESS_DLG		102
#define CMD_POPUP_WINDOW_WITH_PARENT	103
#define CMD_POPUP_WINDOW_WITHOUT_PARENT 104

#define CMD_EXIT			1000

ID_ICO_APPLICATION ICON "windows_demo.ico"

ON_BMP_ID BITMAP "on.bmp"
OFF_BMP_ID BITMAP "off.bmp"

ID_MAIN_MENU MENU
{
	POPUP "&Windows"
	{
		MENUITEM "Modal dialog box", CMD_MODAL_DLG
		MENUITEM "Modeless dialog box", CMD_MODELESS_DLG
		MENUITEM SEPARATOR
		MENUITEM "Popup window with parent", CMD_POPUP_WINDOW_WITH_PARENT
		MENUITEM "Popup window without parent", CMD_POPUP_WINDOW_WITHOUT_PARENT
		MENUITEM SEPARATOR
		MENUITEM "E&xit", CMD_EXIT
	}
}

MODELESS_DLG_ID DIALOG 57, 46, 140, 83
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Modeless Dialog"
FONT 8, "MS Sans Serif"
BEGIN
	CONTROL "This a modeless dialog box that allows the user to switch between the dialog and the application.", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 9, 5, 122, 34
	EDITTEXT EDIT_ID, 21, 38, 98, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP
	CONTROL "OK", IDOK, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 30, 62, 35, 14
	CONTROL "Cancel", IDCANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 74, 62, 35, 14
END

MODAL_DLG_ID DIALOG 57, 46, 140, 83
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Modal Dialog"
FONT 8, "MS Sans Serif"
BEGIN
	CONTROL "This a modal dialog box that does *not* allow the user to switch between the dialog and the application.", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE, 7, 5, 126, 34
	EDITTEXT EDIT_ID, 21, 39, 98, 12, ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP | WS_TABSTOP
	CONTROL "OK", IDOK, "BUTTON", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 30, 62, 35, 14
	CONTROL "Cancel", IDCANCEL, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 74, 62, 35, 14
END
