-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RegisterClass*(): Fix a crash if lpszMenuName is an integer resource ID.
R~ight, MAKEINTRESOURCE(). In a higher-level language, these resource IDs (which can either be string pointers or 16-bit integers) would have gotten a completely different type, and here, they don't even get their own Hungarian notation prefix. Creating a new union type to have perfect type safety would have been very nice, but that's not really practical either. Therefore, a typedef, some generic macros, and more thorough testing is really the only thing we can do to keep this sort of thing from happening again.
- Loading branch information
Showing
3 changed files
with
72 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters