Author |
Topic: Fixing the position of a progress bar (Read 717 times) |
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: Fixing the position of a progress bar
« Reply #1 on: Aug 29th, 2014, 08:57am » |
|
Hi Ian,
Please can you clarify a little? Does your app put the controls on the main window (e.g. using Winlib5), or are you using a dialogue box (eg. using Winlib2)?
If you are using Winlib5, it looks like control sizes are specified in pixels anyway, as are progress bars in Winlib3.
If you are using Winlib2, have you seen the section in the manual on making a progress bar using
PROC_dlgctrl(dlg%,"",id%,x%,y%, cx%, cy%, &50000000, "msctls_progress32")
That seems to generate a progress bar in dialogue box units, which scales with other controls as you change font size or screen resolution, at least on my machine and a quick test.
If it's a dialogue box and you aren't using Winlib2, would the MapDialogRect function do what you need?
http://msdn.microsoft.com/en-gb/library/windows/desktop/ms645502%28v=vs.85%29.aspx
If you search for "rect" in the help, there's an example (under displaying enhanced metafiles) of how to make and use a rect structure in BB4W to send/receive data from a SYS call, which I guess, but have not tried, should work similarly with this call.
Hope that's helpful,
David
|
|
Logged
|
|
|
|
g3nrw
Junior Member
member is offline


Posts: 74
|
 |
Re: Fixing the position of a progress bar
« Reply #2 on: Aug 30th, 2014, 08:35am » |
|
Hi David
on Aug 29th, 2014, 08:57am, DDRM wrote:| Please can you clarify a little? |
|
Yes, I realize I didn't give much information!
Quote: If you are using Winlib2, have you seen the section in the manual on making a progress bar using
PROC_dlgctrl(dlg%,"",id%,x%,y%, cx%, cy%, &50000000, "msctls_progress32") |
|
Yes, that is what I should have used. I used instead: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pb% = FN_createprogressbar(@hwnd%, 550, 145, 150, 20, 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Problem solved.
Thanks David
-- Ian
|
|
Logged
|
|
|
|
|