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
Posted on 2001-07-16 09:08:01 by bazik
Does not look like an algorithm to me, but any code is welcome. :)
Posted on 2001-07-18 14:59:06 by comrade
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.
Posted on 2001-07-18 15:23:09 by smurf

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:
Posted on 2001-07-18 15:45:30 by bazik
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....
Posted on 2001-07-18 19:02:04 by Zcoder