{"id":37013,"date":"2004-12-14T09:04:00","date_gmt":"2004-12-14T09:04:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2004\/12\/14\/why-do-dialog-editors-start-assigning-control-ids-with-100\/"},"modified":"2004-12-14T09:04:00","modified_gmt":"2004-12-14T09:04:00","slug":"why-do-dialog-editors-start-assigning-control-ids-with-100","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20041214-00\/?p=37013","title":{"rendered":"Why do dialog editors start assigning control IDs with 100?"},"content":{"rendered":"<p><P>\nWhen you use a dialog editor and insert new\ncontrols, they typically are assigned control IDs\nstarting at around 100.  Why?\n<\/P>\n<P>\nBecause the small numbers are already taken.\n<\/P>\n<PRE>\n\/*\n * Dialog Box Command IDs\n *\/\n#define IDOK                1\n#define IDCANCEL            2\n#define IDABORT             3\n#define IDRETRY             4\n#define IDIGNORE            5\n#define IDYES               6\n#define IDNO                7\n#define IDCLOSE             8\n#define IDHELP              9\n#define IDTRYAGAIN         10\n#define IDCONTINUE         11\n<\/PRE>\n<P>\nThe dialog manager knows about these special values\nand assumes that if your dialog box has a control whose\nID matches one of these special values, then it also\nbehaves in a certain way.\n<\/P>\n<P>\nThe dialog manager assumes that\na control whose ID is IDOK is an OK button.\nIf the user hits Enter, the default button will be pushed;\nif no default button can be found, then the OK button is pushed.\nSimilarly, a control whose ID is IDCANCEL is assumed to be\na Cancel button.\nIf the user hits ESC or clicks the X button in the corner,\nthen the Cancel button is pushed.\n<\/P>\n<P>\nIf your dialog box has OK and Cancel buttons, make sure to\ngive them the IDOK and IDCANCEL control IDs so that they\nact like proper OK and Cancel buttons.  Conversely, any\ncontrol with those IDs had better be proper OK and Cancel buttons.\n<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you use a dialog editor and insert new controls, they typically are assigned control IDs starting at around 100. Why? Because the small numbers are already taken. \/* * Dialog Box Command IDs *\/ #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 #define IDRETRY 4 #define IDIGNORE 5 #define IDYES 6 #define IDNO [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-37013","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>When you use a dialog editor and insert new controls, they typically are assigned control IDs starting at around 100. Why? Because the small numbers are already taken. \/* * Dialog Box Command IDs *\/ #define IDOK 1 #define IDCANCEL 2 #define IDABORT 3 #define IDRETRY 4 #define IDIGNORE 5 #define IDYES 6 #define IDNO [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/37013","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=37013"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/37013\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=37013"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=37013"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=37013"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}