rdonnay wrote:I wrote DC_XbpProgressBar() long before Alaska gave us XbpProgressBar().
XbpProgressBar() was build by Alaska after include visual Style ... which was introduced with Windows XP Years before ...
rdonnay wrote:I chose not to replace it in eXpress++ because, back then, eXpress++ was still supporting users of 1.82 and 1.9 (331) and it would not have worked with those releases.
as i know ot4xb works since Xbase++ v1.3x
Standard Windows Control "msctls_progress32" work on every Windows OS() since Win95 ( Marquee >= Vista )
rdonnay wrote:Since then, I found no good reason to change it because many eXpress++ users have added progress bars to their applications.
i special talk about "green" Progressbar and Marquee Effect, both are visual Style which modern OS() use.
rdonnay wrote:It appears that you are motivated to want to use a lot of your own and other classes with eXpress++. I might be able to make it a little bit easier for you to do this but you will still need to create your own command .CH file for your own classes. I don't know what I can do, but I'll give it a look.
YES ... special what Xbase++ does not have like Listview !
but that Control is much more complex ... i have to learn first
as Newbie i begin with "small" Sample ... XbpProgressbar() was 1st "native" Control i saw.
DC_XbpProgressBar() only have 2 Method : INIT() and Create()
it use Function DC_GetProgress() to "calc" and paint with GRA.
from DC_GetProgress() i only need last Line (new Position)
Code: Select all
oProgress:currCount := nCurrCount
i have add to DXE LIB these iVar / Method
Code: Select all
ASSIGN METHOD DC_SetData() VAR currCount
ACCESS METHOD DC_GetData() VAR currCount
ACCESS METHOD DC_GetMaximum() VAR maxCount
ASSIGN METHOD DC_SetMaximum() VAR maxCount
so it will react on "old" iVar from DC_XbpProgressBar()
i have extract Class DC_XbpProgressBar and make it "dual"
Code: Select all
#IFDEF DXE
CLASS DC_XbpProgressBar FROM DXE_ProgressBar, DC_XbaseParts
#ELSE
CLASS DC_XbpProgressBar FROM DC_XbpProgressBarSuper, DC_XbaseParts
#ENDIF
so compile with /DDXE to use DXE Class.
Difference : DXE_Progressbar have "Percent" build-in just need
------------
Code: Select all
::percent := ::optionArray[2] // .T.
but i does calculate different in DC_GetProgress()
Code: Select all
cPercent := Str(100*nPercent,3,0)+"%"
my DXE_Progressbar calculate on 100% and o:Increment (every) is Max/100 so i need a "Scale" ( see Demo )
Code: Select all
nEvery := (iMax/100)
oProgress:nScaleMax := iMax*nEvery
how does it work :
------------------
while Parent of my native Control are FROM XbpStatic all iVAR does exist !
you know from XbpBrowse and o:Colorblock ... visual Style will "cover" it.
so your own Color are not shown ... same now with "green" Progressbar
if you want your own Color you have to disable visual Style when using DXE_Progressbar().
all is still alive but this Way is not tested yet with Express++. ( need Sample ! )
all Code in DC_GetProgress() are execute "as it is" so i hope i break no existing Code.
1.Step :
--------
as Demo i use CONTACT.PRG ( Outlook activeX ... slow )
DCPROGES.PRG contain "dual" CLASS DC_XbpProgressBar using #IFDEF DXE
for 1st (simple) Demo i have work only on 5 iVAR.
Code: Select all
EXPORTED:
#IFDEF DXE
//
// redirect to use same iVar from DXE_ProgressBar
//
#ELSE
VAR percent // -> DXE
VAR maxCount // -> DXE
VAR currCount // -> DXE
VAR every // -> DXE
VAR vertical // -> DXE
#ENDIF
for more i need (simple) Express++ Sample to work on.
! Note : "green" Progressbar need Manifest for visual Style.