flat assembler
Message board for the users of flat assembler.
Index
> Windows > LoadCursor Function in FASM? |
Author |
|
Dracula 06 Dec 2010, 16:40
Hello people!
Why FASM display Errors? Error: undefined symbol 'IDC_SIZEALL' Error: undefined symbol 'OCR_NORMAL' FASM code: Code: invoke LoadCursor,0,IDC_SIZEALL invoke SetSystemCursor,EAX,OCR_NORMAL MSDN LoadCursor Function http://msdn.microsoft.com/en-us/library/ms648391(VS.85).aspx MSDN SetSystemCursor Function http://msdn.microsoft.com/en-us/library/ms648395(VS.85).aspx ------------------------- Example code: Code: include 'win32ax.inc' .data CURSOR_RECT RECT <0> CURSOR_POINT POINT <0> String_String db "API-Cursor ",0 X_Y_SHABLON db "X = %d ; Y = %d",0 String_CONTENER db 256 dup (0) .code start: invoke GetCursorPos,CURSOR_POINT ;- invoke wsprintf,String_CONTENER,X_Y_SHABLON,CURSOR_POINT.x,CURSOR_POINT.y ;- invoke MessageBox,0,String_CONTENER,String_String,0 ;--------------- invoke SetCursorPos,500,300 ;--------------- mov [CURSOR_RECT.left],450 mov [CURSOR_RECT.top],250 mov [CURSOR_RECT.right],550 mov [CURSOR_RECT.bottom],350 invoke ClipCursor,CURSOR_RECT ;--------------- invoke LoadCursor,0,IDC_SIZEALL invoke SetSystemCursor,EAX,OCR_NORMAL ;&&& invoke ShowCursor,0 invoke ShowCursor,1 ;--------------- exit: invoke ExitProcess,0 .end start |
|||
06 Dec 2010, 16:40 |
|
Dracula 06 Dec 2010, 19:13
asmhack wrote:
Thank you very much, asmhack !!! |
|||
06 Dec 2010, 19:13 |
|
JohnFound 06 Dec 2010, 20:04
Code: IDC_SIZEALL = 32646 OCR_NORMAL = 32512 Don't use "equ" for numerical constants. |
|||
06 Dec 2010, 20:04 |
|
baldr 09 Dec 2010, 21:04
JohnFound,
For singleton value equ is OK (I mean single fasm token). It may be OK for other cases too, if one's careful: Code: page equ 4096 pages equ *page invoke VirtualAlloc, 0, 10 pages, MEM_RESERVE, PAGE_READWRITE |
|||
09 Dec 2010, 21:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.