Use of resources
1 Resource Files
Icon cursor String menu Accelerator Key dialog Resource bitmap and so on
Resource script file-the extension RC file defines information such as resources and related files
Resource Compiler-RC.exe
2 Icons Resource icon
2.1 Typical sizes: 16x16, 32x32, 48x48
2.2 Use
hicon LoadIcon ( hinstance hinstance//Handle to application instance LPCTSTR lpiconname //name string or resource identifier);
2.3 System-Provided icons
HInstance is empty, wife Iconname for the defined system icon
2.4 Draw your own icon
HINSTANCE the application instance handle where the icon is located
2.5 An icon file can contain a variety of different size and color icons, when the system uses icons, by size to match
3 Cursor Resources
3.1 Cursor Resources
Hotspot hotspot-16x16 can produce the position of mouse click
3.2 Use
Hcursor LoadCursor (
HINSTANCE HInstance,
LPCTSTR lpcursorname)
3.3 System cursor
HINSTANCE is a null lpcursorname specified as the system cursor ID
3.4 Self-drawn cursors
HINSTANCE is not empty
3.5 wm_setcursor
When the mouse is inside the window, it will create a style that can modify the mouse during program execution.
WParam-Window Handle
Identification of the location of the LoWord (LParam)
HiWord (LParam) the message ID of the mouse