flat assembler
Message board for the users of flat assembler.
Index
> Windows > For Newbies:Keyboard.asm Iczelion's example FASMW version |
Author |
|
boysoledad 17 Sep 2003, 02:51
start:
invoke GetModuleHandle,0 mov [hinstance],eax invoke LoadIcon,0,IDI_APPLICATION mov [wc.hIcon],eax invoke LoadCursor,0,IDC_ARROW mov [wc.hCursor],eax mov [wc.style],0 mov [wc.lpfnWndProc],WindowProc mov [wc.cbClsExtra],0 mov [wc.cbWndExtra],0 mov eax,[hinstance] mov [wc.hInstance],eax mov [wc.hbrBackground],COLOR_WINDOW+1 mov [wc.lpszMenuName],0 mov [wc.lpszClassName],_class invoke RegisterClass,wc invoke CreateWindowEx, 0, _class, _title, WS_OVERLAPPEDWINDOW,\ CW_USEDEFAULT, CW_USEDEFAULT , CW_USEDEFAULT, CW_USEDEFAULT,\ NULL, NULL, [hinstance], NULL mov [mainhwnd],eax invoke ShowWindow, [mainhwnd], SW_SHOWNORMAL invoke UpdateWindow, [mainhwnd] msg_loop: invoke GetMessage,msg,NULL,0,0 or eax,eax jz end_loop invoke TranslateMessage,msg invoke DispatchMessage,msg jmp msg_loop end_loop: invoke ExitProcess,[msg.wParam] Hi Code follow is WinMain yes? i want to add ico to file asm, how to i do? |
|||
17 Sep 2003, 02:51 |
|
roticv 17 Sep 2003, 03:48
Yes.
Throw the icon definition into the .rsrc section Change invoke LoadIcon,0,IDI_APPLICATION to invoke LoadIcon,[hinstance],IDI_YOURICON You want you can replace hinstance with 400000h. |
|||
17 Sep 2003, 03:48 |
|
imagineer 17 Sep 2003, 06:14
To learn how to define the icon in the rsrc section, you can find a good example minipad.asm in the examples directory.
Cheers, The I -- P.S. Is there a tutorial on how to define the rsrc section for all the resources. The resources macro is, IMHO, too complicated for beginners. |
|||
17 Sep 2003, 06:14 |
|
Kain 28 Oct 2003, 16:37
thanks for these translations of icezelion's tutes. they have been valuable in helping me learn the fasmw interface. now that i am used to interface, it should be smooth sailing.
i had problem trying to figure out how to import the functions from the proper dll (never had to worry about that in java). |
|||
28 Oct 2003, 16:37 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.