13.07.2015 Views

Dialog Boxes - tmarris.com

Dialog Boxes - tmarris.com

Dialog Boxes - tmarris.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15The title, Mr, Ms, Dr, Prof, ... is selected from the drop down list. The user enters text for aname, and for an age in years. The Close button closes the dialog box. The Cancel buttonclears the entries made by the user. Clicking on the OK button results in the entries beingechoed in a message box.We define some constants to be used in both the resource file and in the C source code./* dataentry.h */#define IDB_OK 101#define IDB_CANCEL 102#define IDB_CLOSE 103#define IDC_TITLE 201#define IDE_FIRSTNAME 202#define IDE_LASTNAME 203#define IDE_AGE 204IDB_ identifies a button. IDC_ identifies a <strong>com</strong>bo box. IDE_ identifies an editable input field.Now we <strong>com</strong>e to the resource file.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!