To Top Page | Previous Page | Next Page
The main control IDs defined in <dlgs.h> are as follows. In addition to the predefined command IDs such as IDOK and IDCANCEL, it is recommended to use the following IDs for the controls included in the dialog resource. If you include <windows.h>, then <dlgs.h> will be automatically included.
ID | Integer value | Description |
---|---|---|
psh1...psh16 | 0x0400...0x040f | Push-button. |
chx1...chx16 | 0x0410...0x041f | Check-button. |
rad1...rad16 | 0x0420...0x042f | Radio-button. |
grp1...grp4 | 0x0430...0x0433 | Group box. |
frm1...frm4 | 0x0434...0x0437 | Form. |
rct1...rct4 | 0x0438...0x043b | Rectangle. |
ico1...ico4 | 0x043c...0x043f | Icon control. |
stc1...stc32 | 0x0440...0x045f | Static control. |
lst1...lst16 | 0x0460...0x046f | List box or list view. |
cmb1...cmb16 | 0x0470...0x047f | Combo box or extended combo box. |
edt1...edt16 | 0x0480...0x048f | Edit control. |
scr1...scr1 | 0x0490...0x0497 | Scroll bar. |
pshHelp | 0x040e(psh15と同じ) | Help button |
ctl1 | 0x04A0 | Other control. |
The control ID defined in <dlgs.h> is greater than or equal to ctlFirst and less than or equal to ctlLast defined by the following code:
#define ctlFirst 0x0400 #define ctlLast 0x04ff
It is also recommended to use -1 or IDC_STATIC for unreferenced control IDs.
The predefined command IDs are as follows.
ID | Integer value | Description |
---|---|---|
IDOK | 1 | "OK" button. |
IDCANCEL | 2 | "Cancel" button. |
IDABORT | 3 | "Abort" button. |
IDRETRY | 4 | "Retry" button. |
IDIGNORE | 5 | "Ignore" button. |
IDYES | 6 | "Yes" button. |
IDNO | 7 | "No" button. |
IDCLOSE | 8 | "Close" button. |
IDHELP | 9 | "Help" button. |
IDTRYAGAIN | 10 | "Try again" button. |
IDCONTINUE | 11 | "Continue" button. |
It is a waste of time to define a unique control ID for each dialog. let's stop.