마우스 커서 모양 LoadCursor
HCURSOR hWaitCursor = ::LoadCursor(NULL, IDC_ARROW);
HCURSOR hCursor = SetCursor( hWaitCursor );
The LoadCursor function loads the specified cursor resource from the executable (.EXE) file associated with an application instance.
Syntax
HCURSOR LoadCursor(
HINSTANCE hInstance, LPCTSTR lpCursorName );
Parameters
- hInstance
- [in] Handle to an instance of the module whose executable file contains the cursor to be loaded.
- lpCursorName
- [in] Pointer to a null-terminated string that contains the name of the cursor resource to be loaded. Alternatively, this parameter can consist of the resource identifier in the low-order word and zero in the high-order word. The MAKEINTRESOURCE macro can also be used to create this value. To use one of the predefined cursors, the application must set the hInstance parameter to NULL and the lpCursorName parameter to one the following values:
IDC_APPSTARTING
- Standard arrow and small hourglass
IDC_ARROW
- Standard arrow
IDC_CROSS
- Crosshair
IDC_HAND
- Windows 98/Me, Windows 2000/XP: Hand
IDC_HELP
- Arrow and question mark
IDC_IBEAM
- I-beam
IDC_ICON
- Obsolete for applications marked version 4.0 or later.
IDC_NO
- Slashed circle
IDC_SIZE
- Obsolete for applications marked version 4.0 or later. Use IDC_SIZEALL.
IDC_SIZEALL
- Four-pointed arrow pointing north, south, east, and west
IDC_SIZENESW
- Double-pointed arrow pointing northeast and southwest
IDC_SIZENS
- Double-pointed arrow pointing north and south
IDC_SIZENWSE
- Double-pointed arrow pointing northwest and southeast
IDC_SIZEWE
- Double-pointed arrow pointing west and east
IDC_UPARROW
- Vertical arrow
IDC_WAIT
- Hourglass
Return Value
If the function succeeds, the return value is the handle to the newly loaded cursor.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
The LoadCursor function loads the cursor resource only if it has not been loaded; otherwise, it retrieves the handle to the existing resource. This function returns a valid cursor handle only if the lpCursorName parameter is a pointer to a cursor resource. If lpCursorName is a pointer to any type of resource other than a cursor (such as an icon), the return value is not NULL, even though it is not a valid cursor handle.
The LoadCursor function searches the cursor resource most appropriate for the cursor for the current display device. The cursor resource can be a color or monochrome bitmap.
Windows 95/98/Me: LoadCursorW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Example
For an example, see Creating a Cursor.
Function Information
Minimum DLL Version user32.dll Header Declared in Winuser.h, include Windows.h Import library User32.lib Minimum operating systems Windows 95, Windows NT 3.1 Unicode Implemented as ANSI and Unicode versions.
See Also
'유용한 것들_func' 카테고리의 다른 글
이미지 정보 (dx) (0) | 2010.05.12 |
---|---|
폴더의 파일 목록얻기 (0) | 2010.01.15 |
MultiByteToWideChar (0) | 2009.11.12 |
CString <-> int , CString <-> double 변환 (0) | 2009.09.04 |
Cubemap D3DFMT_DXT1으로 저장하기. (0) | 2009.08.20 |