diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-27 19:06:48 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-27 19:12:27 +0200 |
commit | 18f3ea2529365de54838b7a1a877322b3f98552d (patch) | |
tree | 5175d9e974a6d68a558d373281de1b56b2e6b78e /c/resource.h | |
parent | f7534e2524d4b14a457540a987e168bc28f61e5d (diff) | |
download | EpisodeBrowser-18f3ea2529365de54838b7a1a877322b3f98552d.tar.gz |
Change WM_MENUSELECT handling.
This has two benefits:
1. The for loop is avoided.
2. It is shorter.
The drawback is that it is a bit opaque. The order of the array
elements still matter, but now it is coupled to what is declared in
resource.h, a completely separate file. This makes it harder to change
resource.h.
Diffstat (limited to 'c/resource.h')
-rw-r--r-- | c/resource.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/c/resource.h b/c/resource.h index fe0daa7..8cf2230 100644 --- a/c/resource.h +++ b/c/resource.h @@ -12,6 +12,9 @@ #define ID_SUBGROUP(i) ((i) & 0xf000) #define IDG_CTX_RATE 0x1000 +/* Index within resource group. */ +#define ID_INDEX(i) ((i) & 0x00ff) + /* Resources, timers, menus. */ #define IDR_STATUS 0x0100 #define IDR_TIMER 0x0101 |