Another snippet, wich could be usefull ;)
; insert this in your WM_INITDIALOG or WM_CREATE
; hWin == handle of window
; hMenu == handle for menu
invoke GetSystemMenu, hWin, 0
mov hMenu, eax
invoke GetMenuItemCount, eax
dec eax
push eax
invoke RemoveMenu, hMenu, eax, MF_REMOVE or MF_BYPOSITION
pop eax
dec eax
invoke RemoveMenu, hMenu, eax, MF_REMOVE or MF_BYPOSITION
invoke DrawMenuBar, hWin
Does not look like an algorithm to me, but any code is welcome. :)
comrade this is a definition of an algorithm:
A detailed sequence of actions to perform to accomplish some task
i think this post belongs here.
A detailed sequence of actions to perform to accomplish some task
i think this post belongs here.
Does not look like an algorithm to me, but any code is welcome. :)
Perhaps Hiro could rename this Forum from "Algorithms" to "Algorithms & Source Code" :grin:
Hey, is this a algorithm?
start:
call Pstring
db "This is a DOS Hello world demo.",0
mov eax,4c00h
int 21h
Pstring Proc Near
pop si ;Pop address of string.
lodsb ;Get one byte of string.
or al,al ;Are we done?
jz P_Exit ;Exit if so.
call Conout ;Display Char.
jmp Pstring ;Loop till done.
P_Exit:
push si ;Save return address.
ret
Pstring endp
Conout Proc Near
push ax
push bx
push dx
push cx
mov dl,al
mov ah,2
int 21h
Conout1:
pop cx
pop dx
pop bx
pop ax
ret
Conout endp
This is for DOS, but is it a true algorithm?
Zcoder....
start:
call Pstring
db "This is a DOS Hello world demo.",0
mov eax,4c00h
int 21h
Pstring Proc Near
pop si ;Pop address of string.
lodsb ;Get one byte of string.
or al,al ;Are we done?
jz P_Exit ;Exit if so.
call Conout ;Display Char.
jmp Pstring ;Loop till done.
P_Exit:
push si ;Save return address.
ret
Pstring endp
Conout Proc Near
push ax
push bx
push dx
push cx
mov dl,al
mov ah,2
int 21h
Conout1:
pop cx
pop dx
pop bx
pop ax
ret
Conout endp
This is for DOS, but is it a true algorithm?
Zcoder....