flat assembler
Message board for the users of flat assembler.

Index > Windows > Edit windows

Author
Thread Post new topic Reply to topic
Jmac



Joined: 23 Nov 2009
Posts: 54
Jmac 17 May 2010, 00:30
HI all....

If I want to show text or numbers in a child edit window....what functions should I be looking at to do this.....the data will be changing from within the program.

John

EDIT by DOS386 : moved from Main to Windows
Post 17 May 2010, 00:30
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 17 May 2010, 03:19
invoke SendDlgItemMessage,[hwnd],ID_CONTROL,WM_SETTEXT,0,'this is a text'
Post 17 May 2010, 03:19
View user's profile Send private message Reply with quote
Jmac



Joined: 23 Nov 2009
Posts: 54
Jmac 17 May 2010, 03:30
HI..

Thanks for that.......so I can used that function with changing text or numbers...from within the program...
Post 17 May 2010, 03:30
View user's profile Send private message Reply with quote
edemko



Joined: 18 Jul 2009
Posts: 549
edemko 17 May 2010, 03:41
There is a way to allow numbers in an edit control only:
Code:
;;
hlt                                             ; use it to run a debugger
invoke  GetWindowLong,[idc_txty],GWL_STYLE      ; get window style
or      eax,ES_NUMBER                           ; prove bit magic you need
invoke  SetWindowLong,[idc_txty],GWL_STYLE,eax  ; set window style
;;
    


edit #2
download api help file
http://cracklab.ru/download.php?action=get&n=NjA1

edit #3
create win-concerned posts at this section
http://board.flatassembler.net/forum.php?f=3
Post 17 May 2010, 03:41
View user's profile Send private message Reply with quote
Jmac



Joined: 23 Nov 2009
Posts: 54
Jmac 17 May 2010, 13:42
hi

Thanks for the info edemko..

I wonder are there any examples or tut's explaining what I need......

ie the result of a calculation being displayed in a edit style window on a main window.

I have yet to find an example of such...
Post 17 May 2010, 13:42
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 17 May 2010, 13:58
you can set ES_NUMBER style for edit window while its creation, if it is dialog control - directly in rc editor or in resources where this control declared. use SetDlgItemInt api function then.
Post 17 May 2010, 13:58
View user's profile Send private message Visit poster's website Reply with quote
Jmac



Joined: 23 Nov 2009
Posts: 54
Jmac 20 May 2010, 03:42
HI....

thanks for the replies...

now placing a number in the window....is there a function I should look at for positioning the digits as they go into the window....ie Right to left
x-y positioning or similar I guess..

John
Post 20 May 2010, 03:42
View user's profile Send private message Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 20 May 2010, 17:11
Create a control inside the window (you can position the control when creating it), then set your text in that control instead of the the window itself.
Post 20 May 2010, 17:11
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 21 May 2010, 05:05
Jmac
read msdn or win32.hlp about edit controls - a lot of things will become more clear to you. there are styles which let you align text right (ES_RIGHT) and other. it is better to set styles when control is created, changing some styles after edit control is already created may take no effect.
Post 21 May 2010, 05:05
View user's profile Send private message Visit poster's website 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.