flat assembler
Message board for the users of flat assembler.

Index > Windows > Changing DialogBox Caption on the fly

Author
Thread Post new topic Reply to topic
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
Hello! I'm seeking for a method to change the caption of a dialog box. I have looked a bit into other programs doing this, but wasn't able to gather the infos needed. I believe these programs' captions point to a string, and if the string changes, the caption changes too on redraw.

Is there a way i can do this with fasm using the resource-section to create the dialog which uses a pointer to a string as caption?

Thank you!
Post 15 May 2006, 13:11
View user's profile Send private message Reply with quote
Ivan2k2



Joined: 08 Sep 2004
Posts: 80
Location: Russia, Angarsk
Ivan2k2
maybe this...
Code:
invoke SendMessage,[hHandleOfYourDlg],WM_SETTEXT,0,szPointerToYourString
    
Post 15 May 2006, 14:04
View user's profile Send private message ICQ Number Reply with quote
moriman



Joined: 01 Apr 2006
Posts: 55
Location: Northern Ireland
moriman
or, if you intend to have multiple different captions, simply store the address of the relevant string in a pointer...

Code:
invoke SendMessage,[hHandleOfYourDlg],WM_SETTEXT,0,[newCaption]
    
Post 15 May 2006, 14:29
View user's profile Send private message Reply with quote
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
Works like a dream! Thank you a lot!
Post 15 May 2006, 15:22
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.