News:

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

set caption in al label box

Started by drjr, July 10, 2007, 04:13:34 PM

Previous topic - Next topic

drjr

The title say all. I do not know how to set a caption (string) to a label box and/or :red a text box in masm32. l(Label boxes and text boxes are used in almost al windows forms).

Realy I want to set the property caption to a static label that I have in a form.

Tedd

Use SetWindowText or WM_SETTEXT ..?


What do you mean by 'label box' ??
No snowflake in an avalanche feels responsible.

ragdog

hi

mean you static- or edit box\field???

setdlgitemtext or sendmessages


greets

ragdog

hutch--

drjr,

There are multiple methods as both members have explained to you. You need to get a valid window handle to the static control and then either send a message to it or use the API SetWindowText().


    invcoke SendMessage,hWin,WM_SETTEXT,0,ADDR YourText

      or

    invoke SetWindowText,hWin,ADDR YourText


As ragdog suggested you can also use SendDlgItemMessage() where you use the dialog ID instead of the handle.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php