forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Resize STATUS

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sat Feb 13, 2010 4:46 pm    Post subject: Resize STATUS Reply with quote

Hi guys

Is there any way to resize panels of a STATUS element at runtime? Question

I use VDS6.

Thank in advance

____________

uVeDeSe
____________
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Feb 14, 2010 2:29 am    Post subject: Reply with quote

Use the SB_SETPARTS API call to the Status Element


Code:

TITLE STATUS RESIZE EXAMPLE

DIALOG CREATE,STATUS RESIZE EXAMPLE,-1,0,640,200,RESIZABLE
DIALOG ADD,STATUS,STATUS1,Panel 1[L]|Panel 2[L]|Panel 3[L]
DIALOG SHOW

:RESIZE
  %W = @dlgpos(,W)
  # Let's divide the Staus bar into 3 equal parts
  %%pN = 3
  %%pW = @format(@div(%W,%%pN),5.0)
  # %%SB_SETPARTS = @SUM($400,4) 0r 1028
  %%SB_SETPARTS = 1028
  # Build an array where each part is defined by its DWORD value of its ending position
  # The ending position of the last part is the width of the dialog
  %%parts = @binary(DWORD,%%pW)@binary(DWORD,@prod(%%pW,2))@binary(DWORD,%W)
  %z = @sendmsg(@winexists(~Status1),%%SB_SETPARTS,%%pN,%%parts)
 
:evloop
 wait event
 goto @event()
 
:CLOSE
 exit


"http://msdn.microsoft.com/en-us/library/bb760757(VS.85).aspx"
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Feb 14, 2010 9:48 am    Post subject: Reply with quote

Hi Aslan:

Wow, thank you very much. Thumbs Up

However, viewing the Microsoft documentation, where can I find the message ID corresponding to each functions?

In this case:

Code:
  %%SB_SETPARTS Message = 1028


Thanks again

___________

uVeDeSe
___________
Back to top
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Sun Feb 14, 2010 3:06 pm    Post subject: Reply with quote

1028 is the decimal value of @SUM($400,4)

You can use CodeScripts VDS API Constants:
http://www.vdsworld.com/download.php?id=332&sid=675a3cbfc43f17138734bd5d7ccee4b3

or read the header files from Microsoft SDKs.
Back to top
View user's profile Send private message Send e-mail
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Feb 14, 2010 3:22 pm    Post subject: Reply with quote

I see, Aslan. Very well.

Some time ago I saw this CodeScripts program, but not sure what it referred. Rolling Eyes

Thanks, once again.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group