Slider question
Re: Slider question
Hi Jimmy,
I looked at your sample, and it looks and works very well. Your code is also very easy to read. It think it is rather easy to add it as an addition to Express++, so it uses the same syntax.
The original question from Jack was to have a control with TWO sliders. This way you can set a MIN and a MAX on one slider bar. I saw that you can set some 'scope' with min and max, but is it possible to adjust it by the user?
I looked at your sample, and it looks and works very well. Your code is also very easy to read. It think it is rather easy to add it as an addition to Express++, so it uses the same syntax.
The original question from Jack was to have a control with TWO sliders. This way you can set a MIN and a MAX on one slider bar. I saw that you can set some 'scope' with min and max, but is it possible to adjust it by the user?
Re: Slider question
this was my Question which Action to use ?skiman wrote:The original question from Jack was to have a control with TWO sliders. This way you can set a MIN and a MAX on one slider bar. I saw that you can set some 'scope' with min and max, but is it possible to adjust it by the user?
press a Key ( F_xx ) and open a Input Window ?
o:LbDown seems me wrong while used internal so i think better using o:RbDown ?
greetings by OHR
Jimmy
Jimmy
Re: Slipder question
how do you want to move Slider ... it need lbDownskiman wrote:From a user point, it should be lbDown.

yes ... it is possible but need more Code to find out what User mean.
so i have activate RbDown / RbUp to move Tick Marker "on-fly" Problem : i got Slider Position as Tick (o:Range). now need to calculate relative Position in Pixel.
i have test it with LANDSCAPE, PORTRAIT still under Construction.
i include Codeblock Slot "bPos2Pixel" and "Per2Pixel" so you can make your own Code for calculation.
---
i have try to activate Ownerdraw as known from Xbase++ but i did not find a API Constant for it
Code: Select all
#define LVS_OWNERDRAWFIXED 0x0400
#define SBT_OWNERDRAW 0x1000
#define TCS_OWNERDRAWFIXED 0x2000
#define HDF_OWNERDRAW 0x8000
#define LBS_OWNERDRAWFIXED 0x0010
#define LBS_OWNERDRAWVARIABLE 0x0020
#define CBS_OWNERDRAWFIXED 0x0010
#define CBS_OWNERDRAWVARIABLE 0x0020
#define MF_OWNERDRAW 0x00000100
#define MFT_OWNERDRAW MF_OWNERDRAW
#define BS_OWNERDRAW 0x0000000B
#define SS_OWNERDRAW 0x0000000D
here latest DLL / LIB and Demo Source, look at READ.ME
greetings by OHR
Jimmy
Jimmy
Re: Slipder question
Anything like this CAN be added to eXpress++ but I will not do this anymore. I made that mistake with MXPUSHBUTTONS and it was eventually not supported. I replaced that with a much better solution: DCPUSHBUTTONXP.It think it is rather easy to add it as an addition to Express++, so it uses the same syntax.
What I WILL DO is make it easier to add your own custom objects like this. I will write a sample program to show how to do this. This can be done now with @ .. DCCUSTOM, but it limits your syntax.
I was nearly done with a slider sample that is written in eXpress++, but now I think I will go in a different direction and make it easier to use Jimmy's solution because it is much more robust.
The eXpress train is coming - and it has more cars.
Re: Slipder question
hi,
this native Trackbar Control does not exist in Xbase++ so it is different to MXPUSHBUTTONS.
we also do not have Listview or Rebar. other like DatePick or MonthDay need activeX if not using native Control.
to avoid activeX i start those native Control and DXD Lib.
---
New v5
visual Style :
i have add visual Style for TBCD_CHANNEL when using Customdraw Color
now it is smaller and fit into visual Style Retangle i also add visual Style for TBCD_TICS ... nothing happend ... hm
i try to change "Hot" Color of TBCD_THUMB this Waybut Eclipse does not change COlor ...
same happend when using visual Style Parts ( now possible, see Picture )
i can display right Style Parts but it seem not to react on uItemState ... hm
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
so i still got no "Hot" State to react on it
Question : what about Icon or Bitmap for Slider Thumb ?
do we need it (now) or is native Trackbar Control good enough to release Source now ?
this native Trackbar Control does not exist in Xbase++ so it is different to MXPUSHBUTTONS.
we also do not have Listview or Rebar. other like DatePick or MonthDay need activeX if not using native Control.
to avoid activeX i start those native Control and DXD Lib.
---
New v5
visual Style :
i have add visual Style for TBCD_CHANNEL when using Customdraw Color
now it is smaller and fit into visual Style Retangle i also add visual Style for TBCD_TICS ... nothing happend ... hm
i try to change "Hot" Color of TBCD_THUMB this Way
Code: Select all
IF nState = CDIS_FOCUS .OR. nState = nOR(CDIS_FOCUS,CDIS_SELECTED)
@GDI32:SelectObject(hdc,::HiBackColor)
ELSE
@GDI32:SelectObject(hdc,::ClrTHUMB )
ENDIF
same happend when using visual Style Parts ( now possible, see Picture )
i can display right Style Parts but it seem not to react on uItemState ... hm
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
so i still got no "Hot" State to react on it

Question : what about Icon or Bitmap for Slider Thumb ?
do we need it (now) or is native Trackbar Control good enough to release Source now ?
- Attachments
-
- DXESLIDE5.ZIP
- DLL / LIB v1.9.355
need ot4xb - (50.38 KiB) Downloaded 755 times
greetings by OHR
Jimmy
Jimmy
Re: Slipder question
Control Style (-> iVar) must set before o:Create(), Methode work after o:Create()
iVar
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
METHOD
* -------- fixed Code -------- *
visual Stylenow will work when Select/Press Thumb 
* ------ known Problem ------- *
still got no "HOT" visual Style ... hm ...
iVar
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
Code: Select all
// set TBS_ Constante
//
VAR Autoticks -> TBS_AUTOTICKS Default .T. // default
VAR NoTicks -> TBS_NOTICKS Default .F. // no Ticks
VAR PosBoth -> TBS_BOTH Default .F. // Ticks on both Side
VAR PosTop -> TBS_TOP Default .F. // need TBS_HORZ (LANDSCAPE)
VAR PosBottom -> TBS_BOTTOM Default .T. // need TBS_HORZ (LANDSCAPE)
VAR PosLeft -> TBS_LEFT Default .F. // need TBS_VERT (PORTRAIT)
VAR PosRight -> TBS_RIGHT Default .T. // need TBS_VERT (PORTRAIT)
VAR SelRange -> TBS_ENABLESELRANGE Default .T. // need to SetScope()
VAR Fixedlength -> TBS_FIXEDLENGTH Default .F. // need to change Thumbs Size
VAR NoThumb -> TBS_NOTHUMB Default .F. // no Thumbs
VAR Tooltips -> TBS_TOOLTIPS Default .T. // show Tooltip (when press Thumb)
VAR Reversed -> TBS_REVERSED Default .F. // Flag only ?
VAR DownIsLeft -> TBS_DOWNISLEFT Default .T. // hm ... ?
VAR BeforeMove -> TBS_NOTIFYBEFOREMOVE Default .F. // since Vista, under Construction
VAR TransBkGnd -> TBS_TRANSPARENTBKGND Default .F. // since Vista, under Construction
// NEED Customdraw
//
VAR PaintStyle -> "ECIPILS" / "RETANGLE" / "VISUAL" -> Default
METHOD
Code: Select all
SetThumblength(nValue) -> set Size of TBCD_THUMB -> TBCD_CHANNEL wide
NEED : Fixedlength := .T. and Customdraw
SetPageSize(nValue) -> Sets the number of logical positions the trackbar's slider moves
in response to keyboard input, such as the or keys, or mouse input,
such as clicks in the trackbar's channel
SetLineSize(nValue) -> Sets the number of logical positions the trackbar's slider moves
in response to keyboard input from the arrow keys, such as the or keys.
visual Style
Code: Select all
IF lAnd( nState, nOR(CDIS_FOCUS,CDIS_SELECTED))
@GDI32:SelectObject(hdc,::HiBackColor)
ELSE
@GDI32:SelectObject(hdc,::ClrTHUMB )
ENDIF

* ------ known Problem ------- *
still got no "HOT" visual Style ... hm ...

greetings by OHR
Jimmy
Jimmy
Re: Slipder question
hi,
i think "green" Sample it now about what Jack want it useso no Thumb is used and Marker will display in Trackbar Channel.
as you can see Marker / Thumbs can now be a Image (ICO,BMP)
i include Gradient for Trackbar Channel ( when no Scope used )
also Control Background Color can be changed ( do not ask me for Gradient here ... )
have fun
i think "green" Sample it now about what Jack want it use
Code: Select all
::NoThumb := .T.
as you can see Marker / Thumbs can now be a Image (ICO,BMP)
i include Gradient for Trackbar Channel ( when no Scope used )
also Control Background Color can be changed ( do not ask me for Gradient here ... )
have fun
greetings by OHR
Jimmy
Jimmy
Re: Slipder question
Hi,
I got this error when running dxeslide.
I got this error when running dxeslide.
Code: Select all
oError:args :
-> VALTYPE: A VALUE: {"USER32", "InvalidateRect"}
-> VALTYPE: U VALUE: NIL
-> VALTYPE: N VALUE: 1
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : Internal data structures corrupted
oError:filename :
oError:genCode : 41
oError:operation : NFPCALL
oError:osCode : 0
oError:severity : 2
oError:subCode : 5
oError:subSystem : BASE
oError:thread : 1
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from DXE_SLIDER:_SETNEWHFONT(1891)
Called from DXE_SLIDER:_PRESPARA(1817)
Called from DXE_SLIDER:CREATE(2121)
Called from MAIN(78)
Re: Slipder question
hm ... please try without Font in Presentation Parameter for DXESLIDER() Control. i will check it.skiman wrote:I got this error when running dxeslide.Code: Select all
-> VALTYPE: A VALUE: {"USER32", "InvalidateRect"} Called from DXE_SLIDER:_SETNEWHFONT(1891) Called from DXE_SLIDER:_PRESPARA(1817) Called from DXE_SLIDER:CREATE(2121) Called from MAIN(78)
greetings by OHR
Jimmy
Jimmy