Slider question

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slider question

#31 Post by rdonnay »

DCSLIDE.PRG(25:0): warning XBT0102: Ambiguous variable reference aGETLIST_VARS
You have an older version of eXpress++ (DCDIALOG.CH).

Also, I am sending you build 263 by email.

For now, just remove the following from DCSLIDE.CH:

Code: Select all

       ;DC_GetListSet(DCGUI_GETLIST,aGETLIST_VARS,                          ;
                     {'DCSLIDE',<(ooo)>,<(oParent)>,nil,                    ;
                       #<nRow>,#<nCol>,#<nWidth>,#<nHeight>} )
This is there only for the designer system of build 263 or later. It's not needed.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slider question

#32 Post by Auge_Ohr »

rdonnay wrote:
DCSLIDE.PRG(25:0): warning XBT0102: Ambiguous variable reference aGETLIST_VARS
You have an older version of eXpress++ (DCDIALOG.CH).
Ok with lates Express++ Version all work fine :)

Question : if i add more Method how to add it into DCSLIDE.CH ?

Code: Select all

oVert1:SetiThumb(1,"ICO")                       -> Load Thumb Icon from Resource Type "ICO"
oVert3:SetiMarker(3,"ICO")                      -> Load Marker Icon from Resource Type "ICO"
oVert3:SetiBackground("WHITE_CYAN.BMP" ,"BMP")  -> Load Background Image from HDD/SDD Type "BMP"
Syntax : SetiXXX(<Resource ID>|<cFilename>, <"ICO">|<"BMP">)
Return : Number in Imagelist ( zero-based )
while Resource can be in DLL i have a iVar cDllName

Code: Select all

   ::cDllName := AppName(.t.)
so default is EXE.

Question : how to call it in Express++ ?

i saw in DCSLIDE.CH

Code: Select all

   [RESTYPE <cResType>]   ;
   [RESFILE <cResFile>]   ;
is this to point to Resource File ?
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slider question

#33 Post by rdonnay »

Question : if i add more Method how to add it into DCSLIDE.CH ?
DCSLIDE.CH is used to parse command line parameters into the GetList array.

This is a multi-dimensional array that has 70 elements per GUI item.

DCSLIDE is not using the xGETLIST_OPTIONS3 thru xGETLIST_OPTIONS9 elements.
I see that I didn't finish the job.

I recommend adding the following after line 97:

Code: Select all

    [;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS3,{<cResType>,<cResFile>})] ;
Then you would add some code to DCSLIDE.PRG:

In the function DC_DxeSlide():

Code: Select all

aOptions3 := aGetListItem[xGETLIST_OPTIONS3]

IF Valtype(aOptions3) == 'A'
  SetOption( @oSlide:resfile, aOptions3[2] )
  SetOption( @oSlide:resType, aOptions3[1] )
ENDIF
You would need to modify it to your exact needs but that is the basic idea.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slider question

#34 Post by Auge_Ohr »

i have to learn a lot of Express++, Thx

ok i will try to include change into next Release.
DXEslider12.jpg
DXEslider12.jpg (58.94 KiB) Viewed 11416 times
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slider question

#35 Post by Auge_Ohr »

hi,

1.) add in DCSLIDE.CH

Code: Select all

   [ICOTHUMB  <iThumb>]                                        ;
   [ICOMARKER <iMarker>]                                       ;
   [ICOIMAGE  <iImage>]                                        ;
2.) add <iThumb>,<iMarker>,<iImage> as 11,12,13

Code: Select all

    ;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS,                       ;
      {<orient>,<r1>,<r2>,<freq>,<buds>,<budl>,<budr>,<thumb>,<style>,   ;
       <.tb.>,<iThumb>,<iMarker>,<iImage> } )                            ;
3.) add after line 97

Code: Select all

   [;DC_GetListSet(DCGUI_GETLIST,xGETLIST_OPTIONS3,{<cResType>,<cResFile>})] ; // NEW by Jimmy
4.) in DCSLIDE.PRG

Code: Select all

   PAINTSTYLE "VISUAL" ;                        // ADD by Jimmy
   RESFILE "DCSLIDE.DLL" ;                      // NEW by Jimmy
   RESTYPE "ICO" ;                              // NEW by Jimmy
   ICOTHUMB 1    ;                              // NEW by Jimmy
   ICOMARKER 3   ;                              // NEW by Jimmy
   ICOIMAGE 100  ;                              // NEW by Jimmy
5.) in DC_DxeSlide()

Code: Select all

LOCAL aOptions3 := aGetListItem[xGETLIST_OPTIONS3]   // NEW by Jimmy
...
   IF Valtype(aOptions3) == "A"                    // NEW by Jimmy
      SetOption( @oSlide:cDllName, aOptions3[2] )  // NEW by Jimmy
      // need more than 1 Image Type 
      SetOption( @oSlide:cImgType, aOptions3[1] )  // NEW by Jimmy
   ENDIF
   IF Valtype(aOptions[11]) $ 'CN'                  // iThumb
      oSlide:SetiThumb(aOptions[11],aOptions3[1])
   ENDIF
   IF Valtype(aOptions[12]) $ 'CN'                  // iMarker
      oSlide:SetiMarker(aOptions[12],aOptions3[1])
   ENDIF
   IF Valtype(aOptions[13]) $ 'CN'                 // iBackground
      // need more than 1 Image Type 
      oSlide:SetiBackground(aOptions[13],"BMP")
   ENDIF
now i got all ICO / BMP and work fine :dance:
DC_Slider.jpg
DC_Slider.jpg (45.81 KiB) Viewed 11412 times
Question :

as i can use ICO and BMP (JPG/PNG etc) in Imagelist which are in same DLL how to fix this in Express++ (RESTYPE) ?

when using Resource from DLL it must be "load" before. DCRES.PRG have only

Code: Select all

   FUNCTION DUMMY
   RETURN NIL
but i have link RES File to it

Code: Select all

[DCSLIDE.DLL]
    COMPILE_FLAGS = /dll /n /q /w
// $START-AUTODEPEND
    DCSLIDE.RES
    DCRES.OBJ
    DCSLIDE.DEF
// $STOP-AUTODEPEND
    DCSLIDE.ARC
    DCRES.PRG
now in MAIN i have to call DUMMY() in 1st Line ... how do it better with Express++ ?
Attachments
DXESLIDE12.ZIP
need ot4xb
Express++ Sample include
(100.76 KiB) Downloaded 682 times
greetings by OHR
Jimmy

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slider question

#36 Post by Auge_Ohr »

hi,

can someone please show a Express++ Newbie how to RESIZE ( maximize ) work with DcSlider.PRG

Question : how to resize the Static which show the Color ?

Code: Select all

@ 100,0 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT OBJECT oStatic ;
      SIZE 500,100 ;
      OPTIONS XBPSTATIC_TEXT_VCENTER+XBPSTATIC_TEXT_CENTER ;   // add by Jimmy
      RESIZE DCGUI_RESIZE_RESIZEONLY_X                         // add by Jimmy
but even this does nothing when maximize Window ... :(

p.s. in UseSlider.PRG resize work well.
Attachments
DXESLIDE13.ZIP
v0.13 need ot4xb
DLL / LIB v1.9.366
(102.11 KiB) Downloaded 670 times
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slider question

#37 Post by rdonnay »

The eXpress++ resizing system requires that each GUI class inherits from DC_XbaseParts.

I will have to look at your class again and see if I can create a a new sub-class from Dxe_Slider() and DC_XbaseParts().

I have been busy trying to get out a new eXpress++ build 264 this weekend but I will break from my work and see what I can do.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slider question

#38 Post by Auge_Ohr »

rdonnay wrote:The eXpress++ resizing system requires that each GUI class inherits from DC_XbaseParts.
ok ... found

Code: Select all

CLASS DC_XbaseParts FROM DC_NoIvarContainer
rdonnay wrote:I will have to look at your class again and see if I can create a a new sub-class from Dxe_Slider() and DC_XbaseParts().
if i have a Sample i can try to integrate it into other DXE Sample.

Question : how do it know if Express++ "IsAvaiableExpress" at Runtime ?
rdonnay wrote:I have been busy trying to get out a new eXpress++ build 264 this weekend but I will break from my work and see what I can do.
so don´t hurry ... that we can do later.
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slider question

#39 Post by rdonnay »

Here are the changes I promised.

The resizing works perfectly.

BTW - You don't need the dummy call. This works just fine.

DllLoad('DCSLIDE.DLL')

This change requires that I needed to make a small change to my DCLIPX.DLL.

Copy _DCGETBX.PRG to your .\source\dclipx folder.
Run BUILD19_SL1.BAT or BUILD20.BAT to rebuild DCLIPX.DLL.
Attachments
dcslide.zip
(88.76 KiB) Downloaded 700 times
The eXpress train is coming - and it has more cars.

User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: Slider question

#40 Post by hz_scotty »

lGETOPT_NO_UNDO undefined !
in _dxgetbx.prg line 615
Attachments
error.jpg
error.jpg (48.06 KiB) Viewed 11399 times
best regards
Hans

Post Reply