Page 153 - DCAP408_WEB_PROGRAMMING
P. 153
Unit 9: Child and Pop Up Windows
This is an example of creating and attaching a child window, like a toolbox, to the main frame of Notes
an application.
Resource Header
#define IDD_TOOLBOX_DLG 101
#define IDR_MAIN_MENU 102
#define IDM_FILE_EXIT 40001
#define IDM_VIEW_TOOLBOX 40002
Resource Script
#include “resource.h”
/////////////////////////////////////////////////////////////////////////
////
//
// Dialog
//
IDD_TOOLBOX_DLG DIALOG DISCARDABLE 0, 0, 86, 249
STYLE DS_MODALFRAME | WS_CHILD
FONT 8, “MS Sans Serif”
BEGIN
END
/////////////////////////////////////////////////////////////////////////
////
//
// Menu
//
IDR_MAIN_MENU MENU DISCARDABLE
BEGIN
POPUP “&File”
BEGIN
MENUITEM “E&xit”, IDM_FILE_EXIT
END
POPUP “&View”
BEGIN
MENUITEM “&Toolbox”, IDM_VIEW_TOOLBOX, CHECKED
END
LOVELY PROFESSIONAL UNIVERSITY 147