News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

compare buffer content with text

Started by 5k3l3t0r, January 21, 2007, 05:46:08 PM

Previous topic - Next topic

5k3l3t0r

hi all again...
i'm new in asm code, and sometimes i stop in litle things (for me big things...lol)
i use SetDlgitemText to change the text in button every time i click (Alternate between 1 and 0)
and wath i need is wen i click, if text = 1 make one action and if = 0 other...

i think my prob is seting the buffer for the getdlgitemtext...

can someone give me an example or a link with specific tut...

tkx bye

5k3l3t0r


TNick

Simple solution
A var in .DATA section
SomeVar    DWORD    0

when a click arrives:
.IF  SomeVar==0
  mov  SomeVar, 1
;do wonderful things
.ELSE
  mov SomeVar, 0
; do some other wonderful things
.ENDIF

I would say that this is way faster than getting the text...

Regards,
Nick

5k3l3t0r

hi again TNick...

cose i'm too new in asm i make some confusion with Vars

can you give me a simple exemple?
the text in the buttons are:  show task and hide task, if you want i can send the source, this is a simple prog
just to training asm and have some fun...

bye

5k3l3t0r

Tedd

He did give you code..


.DATA
SomeVar    DWORD    0


.CODE
    .
    .
;when the button is pressed (BN_CLICKED)..

.IF  SomeVar==0
    mov  SomeVar, 1
    ;do wonderful things
.ELSE
    mov SomeVar, 0
    ;do some other wonderful things
.ENDIF
No snowflake in an avalanche feels responsible.