• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

WinLIFT

Started by Patrice Terrier, August 22, 2009, 10:32:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#46
The first post of this thread has been updated with version 4.72, and it is provided with a new project named "Buttons.exe".

The new demo shows you how to use the WinLIFT built-in button(s) API, altogether with the WinLIFT anchor mode.

WinLIFT's button(s) must be used AFTER the skin has been selected like this:

FUNCTION PBMAIN () AS LONG
 LOCAL hDlg AS DWORD, hCtrl AS LONG, sResource AS STRING

 DIALOG NEW PIXELS, 0, "Buttons",,, 480, 360, %WS_OVERLAPPEDWINDOW, 0 TO hDlg

 IF skInitEngine("Sony.sks", "") THEN
    CALL skSkinWindow(hDlg, "Dock|Undock|Minimize|Maximize|Restore|Close")

    sResource = EXE.Path$ + "Resource\"

    hCtrl = skButtonImage(hDlg, sResource + "BTN_Left.png", 216-57, 300+12, %IDC_BTN_LEFT, 5)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)

    hCtrl = skButtonImage(hDlg, sResource + "BTN_Play.png", 216, 300, %IDC_BTN_PLAY, 5)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)

    hCtrl = skButtonImage(hDlg, sResource + "BTN_Right.png", 216+49, 300+12, %IDC_BTN_RIGHT, 5)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)


    hCtrl = skPushButtonImage(hDlg, sResource + "Check_32.png", "%BS_LEFT", 20, 20, 140, 50, %IDC_BTN_CHECK, %BS_LEFT)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)

    hCtrl = skPushButtonImage(hDlg, sResource + "Delete_32.png", "%BS_CENTER", 20 + 140 + 8, 20, 140, 50, %IDC_BTN_CHECK, %BS_CENTER)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)

    hCtrl = skPushButtonImage(hDlg, sResource + "Recycle_32.png", "%BS_RIGHT", 20 + (140 + 8) * 2, 20, 140, 50, %IDC_BTN_CHECK, %BS_RIGHT)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)


    hCtrl = skPushButtonImage(hDlg, sResource + "Print_32.png", "%BS_TOP", 20, 20 + 70, 140, 50, %IDC_BTN_PRINT, %BS_TOP)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

    hCtrl = skPushButtonImage(hDlg, "", "WITHOUT IMAGE", 20 + 140 + 8, 20 + 70, 140, 50, %IDC_BTN_TEXT, %BS_CENTER)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

    hCtrl = skPushButtonImage(hDlg, sResource + "Save_32.png", "%BS_BOTTOM", 20 + (140 + 8) * 2, 20 + 70, 140, 50, %IDC_BTN_SAVE, %BS_BOTTOM)  
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

    hCtrl = skButtonImage(hDlg, sResource + "32bit_80.png", 20, 264, %IDC_BTN_32BIT, 5)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_BOTTOM)

    hCtrl = skButtonImage(hDlg, sResource + "64bit_80.png", 380, 264, %IDC_BTN_64BIT, 5)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_BOTTOM_RIGHT)

 END IF

 DIALOG SHOW MODAL hDlg CALL DlgProc

END FUNCTION


...



Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

The first post of this thread has been updated with version 4.73

The "Buttons.exe" project has been  reworked to include more buttons, and the new Clock Widget.

Here is how to use the new features:

FUNCTION PBMAIN () AS LONG
  LOCAL hDlg AS DWORD, hCtrl AS LONG, sResource AS STRING

  DIALOG NEW PIXELS, 0, "Buttons",,, 480, 360, %WS_OVERLAPPEDWINDOW, 0 TO hDlg

  IF skInitEngine("Sony.sks", "") THEN
     CALL skSkinWindow(hDlg, "Dock|Undock|Minimize|Maximize|Restore|Close")

     sResource = EXE.Path$ + "Resource\"

     hCtrl = skButtonImage(hDlg, sResource + "BTN_Left.png", 216-57, 300+12, %IDC_BTN_LEFT, 5)
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)

     hCtrl = skButtonImage(hDlg, sResource + "BTN_Play.png", 216, 300, %IDC_BTN_PLAY, 5)
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)

     hCtrl = skButtonImage(hDlg, sResource + "BTN_Right.png", 216+49, 300+12, %IDC_BTN_RIGHT, 5)
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ_BOTTOM)


     hCtrl = skPushButtonImage(hDlg, sResource + "Check_32.png", "%BS_LEFT", 20, 20, 140, 50, %IDC_BTN_CHECK, %BS_LEFT) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)

     hCtrl = skPushButtonImage(hDlg, sResource + "Delete_32.png", "%BS_CENTER", 20 + 140 + 8, 20, 140, 50, %IDC_BTN_CHECK, %BS_CENTER) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)

     hCtrl = skPushButtonImage(hDlg, sResource + "Recycle_32.png", "%BS_RIGHT", 20 + (140 + 8) * 2, 20, 140, 50, %IDC_BTN_CHECK, %BS_RIGHT) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER_HORZ)


     hCtrl = skPushButtonImage(hDlg, sResource + "Print_32.png", "%BS_TOP", 20, 20 + 70, 140, 50, %IDC_BTN_PRINT, %BS_TOP) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

     hCtrl = skPushButtonImage(hDlg, "", "WITHOUT IMAGE", 20 + 140 + 8, 20 + 70, 140, 50, %IDC_BTN_TEXT, %BS_CENTER) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

     hCtrl = skPushButtonImage(hDlg, sResource + "Save_32.png", "%BS_BOTTOM", 20 + (140 + 8) * 2, 20 + 70, 140, 50, %IDC_BTN_SAVE, %BS_BOTTOM) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)

     hCtrl = skPushButtonImage(hDlg, sResource + "00_32.png", "", 40 + (40 * 0), 20 + 140, 38, 38, %IDC_BTN_00, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "01_32.png", "", 40 + (40 * 1), 20 + 140, 38, 38, %IDC_BTN_01, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "02_32.png", "", 40 + (40 * 2), 20 + 140, 38, 38, %IDC_BTN_02, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "03_32.png", "", 40 + (40 * 3), 20 + 140, 38, 38, %IDC_BTN_03, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "04_32.png", "", 40 + (40 * 4), 20 + 140, 38, 38, %IDC_BTN_04, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "05_32.png", "", 40 + (40 * 5), 20 + 140, 38, 38, %IDC_BTN_05, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "06_32.png", "", 40 + (40 * 6), 20 + 140, 38, 38, %IDC_BTN_06, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "07_32.png", "", 40 + (40 * 7), 20 + 140, 38, 38, %IDC_BTN_07, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "08_32.png", "", 40 + (40 * 8), 20 + 140, 38, 38, %IDC_BTN_08, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)
     hCtrl = skPushButtonImage(hDlg, sResource + "09_32.png", "", 40 + (40 * 9), 20 + 140, 38, 38, %IDC_BTN_09, 0) 
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_CENTER)


'    // 4.73 WinLIFT clock
'    hCtrl = skClockCtrl(hDlg, sResource + "Clock_06_92.png", 14, 258, 0, 0, %IDC_CLOCK, &HFFCBCBCB, &H7F9F9F9F, 0)
'    hCtrl = skClockCtrl(hDlg, sResource + "Clock_02_92.png", 14, 258, 0, 0, %IDC_CLOCK, &H7FCB0000, &H7F8F8F8F, 0)
'    hCtrl = skClockCtrl(hDlg, sResource + "Clock_03_92.png", 14, 258, 0, 0, %IDC_CLOCK, &H7FCB0000, &H7F8F8F8F, 0)
     hCtrl = skClockCtrl(hDlg, sResource + "Clock_01_92.png", 14, 258, 0, 0, %IDC_CLOCK, &H7FCB0000, &H7F8F8F8F, 0)
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_BOTTOM)

'    hCtrl = skButtonImage(hDlg, sResource + "32bit_80.png", 20, 264, %IDC_BTN_32BIT, 5)
'    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_BOTTOM)

     hCtrl = skButtonImage(hDlg, sResource + "64bit_80.png", 380, 264, %IDC_BTN_64BIT, 5)
     CALL skSetAnchorCtrl(hCtrl, %ANCHOR_BOTTOM_RIGHT)

  END IF

  DIALOG SHOW MODAL hDlg CALL DlgProc

END FUNCTION



And the result is



Note: You can edit the source code to try different Clock Widget background.

...



Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Attached are two extra clock widget backgrounds (very nice).

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Attached to this post you will find the Zooming project + WinLIFT version 4.74.

There are two images, using variable opacity, in the "Resource" subfolder to play with.

Better to play the demo hover a dark background, to see the halo and all the transparency effects.

This demo embeds a GDImage zoom graphic control, to use the exclusive composited Crystal mode, rather than AERO blur. But you can still change the background.

This project was done to see how far i could go with WinLIFT and the DWM technology.



...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#50
QuoteHi Patrice,
that I have thought of that, all creating, not show it. And then the View tab if it is needed. But would it for love Dynamic. Need it that is for my CD database. For example, if a cover for a CD in the database because it is intended to show a tab with an image control. But I can wait there is no hurry for me. 'm Sure you make it!
Regards Peter  

Peter,

WinLIFT version 4.78 is attached to this post.

I have reworked the new API skSkinWindowUpdate below, to let it work with the example your posted in the "tabcontrolmore.bas" project.

'// 4.77 Use this when new controls are added AFTER the initial skinning of the main window.
 DECLARE SUB skSkinWindowUpdate LIB "WinLIFT.dll" ALIAS "skSkinWindowUpdate" ( _
 BYVAL hWnd AS LONG, _              ' The main window handle.
 BYVAL RedrawFlag AS LONG _         ' Redraw boolean flag.
 )


Note: hWnd must be the handle of the main window.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#51
The first post of this thread has been updated to version 4.79.

New: The gauge.bas demo has been added to the ZIP file.
Fix: Using %WM_SETTEXT on a hidden control, doesn't show it anymore.

...  
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#52
I have been asked if WinLIFT could be used to skin a Windows common dialog.

I did try with the common OpenFile dialog, and here is the result:



It is not 100% perfect, because i can't take control over the scrollbars, and the Folder ListView is not skinned because its is an encapsulation of the SHELLDLL_DefView.

To do this, you need to hook the common dialog, using the lpfnHook member of the OPENFILENAME structure.

Then you must handle %CDN_INITDONE in the %WM_NOTIFY callback to retrieve the handle of the common dialog and skin it on the fly. If everything went fine, you should got the same result than in the above screen shot.

If interrested i could post a new version of the Gauge project, showing the skinning of the GDImage custom OpenFile, the one that has been captured to create the screen shot.

...


Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#53
The first post of this thread has been updated with WinLIFT version 4.82

Many changes (mostly not visible) have been made to this version, especialy to make WinLIFT and GDImage full compatible.

The Gauge project has been reworked to use a fixed watermark logo overlay in the GDImage control.
And the GDImage OpenFileDialog is now skinned on the fly, to show you that it is possible to apply the WinLIFT theme to a common dialog.

You are encouraged to update to this version, and play again with the Gauge project.



Here is the generic code to skin a common OpenFileDialog:

' Dialog hook procedure, for centering the dialog and apply skin on the fly.
FUNCTION zDlgHookProc(BYVAL hWnd AS LONG, BYVAL Msg AS LONG, BYVAL wParam AS LONG, BYVAL lParam AS LONG) AS LONG

   LOCAL rw AS RECT, rc AS RECT, ofnPtr AS OFNOTIFY PTR, zTxt AS ASCIIZ * %MAX_PATH
   LOCAL lp AS POINTAPI
   LOCAL hDLL, hPROC, nCenterDlg, hFound, hParent, hSysListView AS DWORD

   STATIC hWndPreview, SquareSize AS LONG

   SELECT CASE LONG Msg

   CASE %WM_NOTIFY

        ofnPtr = lParam
        SELECT CASE LONG @ofnPtr.hdr.Code

        CASE %CDN_INITDONE

             hParent = GetParent(hWnd)

             CALL ShowWindow(hParent, %SW_HIDE)

             hSysListView = GetDlgItem(hParent, %lst1)

             CALL GetWindowRect(hSysListView, rw)
             lp.X = rw.nLeft: lp.Y = rw.nTop: CALL ScreenToClient(hParent, lp) ' 11-03-2003
             yPos& = lp.Y
             SquareSize = rw.nBottom - rw.nTop
             IF GetSystemMetrics(%SM_CXSCREEN) < 801 THEN
                SquareSize = MIN&(150, SquareSize)
             END IF

             CALL GetClientRect(hParent, rc)       ' Get dialog pos. and size
             xPos& = rc.nRight                      ' New width

             Style& = %WS_CHILD OR %WS_VISIBLE ' OR %WS_BORDER
             StyleEx& = %WS_EX_STATICEDGE
             hWndPreview = CreateWindowEx(StyleEx&, $GDImageClassName, _
                                "", _               ' Optional full path name to picture
                                Style&, _
                                xPos&, yPos&, SquareSize, SquareSize, _
                                hParent, _
                                %NULL, _
                                zInstance,_
                                BYVAL 0)                 ' creation parameters
             CALL ZI_SetProperty(hWndPreview, %ZI_GradientTop, GetSysColor(%COLOR_BTNSHADOW))
             CALL ZI_SetProperty(hWndPreview, %ZI_GradientBottom, GetSysColor(%COLOR_BTNSHADOW))
             CALL ZI_SetProperty(hWndPreview, %ZI_FitToWindow, %ZI_QualityDefault)

           ' Set new size and center dialog in program window
             CALL GetWindowRect(GetParent(hParent), rc)     ' Get program pos. and size
             W& = rc.nRight  - rc.nLeft
             H& = rc.nBottom - rc.nTop
             x& = rc.nLeft + (W& \ 2)                        ' Relative Center x&
             y& = rc.nTop  + (H& \ 2)                        ' Relative Center y&


             CALL GetWindowRect(hParent, rc)                ' Get dialog pos. and size
             W& = rc.nRight  - rc.nLeft + SquareSize + 7    ' New width
             H& = rc.nBottom - rc.nTop                       ' Same height
             x& = x& - (W& \ 2)                              ' Centered in program
             y& = y& - (H& \ 2)

             CALL SetWindowPos(hParent, hParent, x&, y&, W&, H&, %SWP_NOZORDER) ' Resize and center

'             // Skin the dialog on the fly.
             CALL skSkinWindow(hParent, "Dock|Undock|Minimize|Maximize|Restore|Close")
             CALL ShowWindow(hParent, %SW_SHOW)

             FUNCTION = 1: EXIT FUNCTION

        CASE %CDN_SELCHANGE ' Triggered when the selection changes in the file listbox
             picFileName$ = SPACE$(%MAX_PATH)
             df& = Sendmessage(@ofnPtr.hdr.hwndFrom, %CDM_GETFILEPATH, LEN(picFileName$), STRPTR(picFileName$))
             IF df& > 0 THEN
                picFileName$ = LEFT$(picFileName$, df& - 1)
                So& = INSTR(-1, picFileName$, $Dot)
                IF So& THEN
                   ImgType$ = UCASE$(MID$(picFileName$, So&)) + $Dot
                   ImageType& = INSTR($GDIPLUSEXT, ImgType$)
                   IF ImageType& THEN

                      NewImage& = zLoadImageFromFile((picFileName$), bmW&, bmH&, 0)
                      IF zSetGdipImageHandle(hWndPreview, NewImage&) THEN CALL ZI_UpdateWindow(hWndPreview, %TRUE)

                   END IF
                END IF
'
             END IF
             picFileName$ = ""

        CASE %CDN_TYPECHANGE
           ' Standard Save dialog blindly adds new extension, this changes it properly instead
             IF @ofnPtr.@lpOFN.nFilterIndex < 5 THEN             ' ignore last one, *.*
                hftCombo& = GetDlgItem(GetParent(hWnd), %cmb1)  ' handle, File type combo
                IF zOsVersion < 500 THEN ID& = %edt1 ELSE ID& = %cmb13
                hftEdit&  = GetDlgItem(GetParent(hWnd), ID&)    ' handle, File name text field
                CALL GetWindowText(hftEdit&, zTxt, SIZEOF(zTxt)) ' get name in text field
                IF LEN(zTxt) THEN                                ' if we have something
                   lRes& = INSTR(-1, zTxt, $Dot)                 ' look for prefix (file type part)
                   IF lRes& THEN zTxt = LEFT$(zTxt, lRes& - 1)   ' if success, remove prefix
                   SELECT CASE LONG @ofnPtr.@lpOFN.nFilterIndex  ' compare selection against combo list
                   CASE 1: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 1)) ' ".png"                  ' and add matching prefix
                   CASE 2: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 2)) ' ".jpg"
                   CASE 3: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 3)) ' ".bmp"
                   CASE 4: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 4)) ' ".tif"
                   CASE 5: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 5)) ' ".gif"
                   CASE 6: zTxt = zTxt + $Dot + LCASE$(PARSE$(cfgStr$(40), 6)) ' ".zmi"
                   END SELECT
                   CALL SetWindowText(hftEdit&, zTxt)            ' set corrected name to text field
               END IF
            END IF
        END SELECT

   CASE %WM_DESTROY ' Destroy what we have created to avoid nasty memory leaks

   END SELECT

END FUNCTION

FUNCTION zOpenFileDialog (BYVAL hWnd AS DWORD, _           ' parent window
                         BYVAL sCaption AS STRING, _      ' caption
                         BYREF sFilespec AS STRING, _     ' filename
                         BYVAL sInitialDir AS STRING, _   ' start directory
                         BYVAL sFilter AS STRING, _       ' filename filter
                         BYVAL sDefExtension AS STRING, _ ' default extension
                         BYREF dFlags AS DWORD ) AS LONG   ' flags

   LOCAL ix AS LONG, Ofn AS OPENFILENAME
   LOCAL zFileTitle  AS ASCIIZ * %MAX_PATH

   REPLACE $zLim WITH $NUL IN sFilter

   IF LEN(sInitialDir) = 0 THEN sInitialDir = CURDIR$

   ix = INSTR(sFileSpec, $NUL)
   IF ix THEN
       sFileSpec = LEFT$(sFileSpec, ix) + SPACE$(8192 - ix)
   ELSE
       sFileSpec = sFileSpec + $NUL + SPACE$(8192 - (LEN(sFileSpec) + 1))
   END IF

   ofn.lStructSize       = SIZEOF(ofn)
   ofn.hWndOwner         = hWnd
   ofn.lpstrFilter       = STRPTR(sFilter)
   ofn.lpstrFile         = STRPTR(sFilespec)
   ofn.nMaxFile          = LEN(sFilespec)
   ofn.lpstrFileTitle    = VARPTR(zFileTitle)
   ofn.nMaxFileTitle     = SIZEOF(zFileTitle)
   ofn.lpstrInitialDir   = STRPTR(sInitialDir)
   IF LEN(sCaption) THEN
      ofn.lpstrTitle     = STRPTR(sCaption)
   END IF
   ofn.Flags             = dFlags
   ofn.lpfnHook          = CODEPTR(zDlgHookProc)
   ofn.lpstrDefExt       = STRPTR(sDefExtension)

   'Note: following Select Case table must be adjusted to match used Filter string
   '      (also remember to do the same in zDlgHookProc procedure..)
   UperExt$ = UCASE$(sDefExtension)
   IF UperExt$     = PARSE$(cfgStr$(40), 1) THEN
                     ofn.nFilterIndex = 1 ' PNG nFilterIndex decides Filytype combo's listitem
   ELSEIF UperExt$ = PARSE$(cfgStr$(40), 2) THEN
                     ofn.nFilterIndex = 2 ' JPG
   ELSEIF UperExt$ = PARSE$(cfgStr$(40), 3) THEN
                     ofn.nFilterIndex = 3 ' BMP
   ELSEIF UperExt$ = PARSE$(cfgStr$(40), 4) THEN
                     ofn.nFilterIndex = 4 ' TIF
   ELSE
                     ofn.nFilterIndex = 8 ' *.*
   END IF

   FUNCTION = GetOpenFilename(ofn)

   dFlags   = ofn.Flags

END FUNCTION




...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

I have posted a new "Panorama 360" project on the FireFly forum.

See attached screen shot.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

#55
The first post of this thread has been updated to WinLIFT version 4.85

New API:

 DECLARE FUNCTION skStaticImage LIB "WinLIFT.dll" ALIAS "skStaticImage" ( _
 BYVAL hOwner AS LONG, _            ' Handle of the window parent owner.
 zFullpathImageName AS ASCIIZ, _    ' Full path name to the static image.
 BYVAL x AS LONG, _                 ' X location of the static image control.
 BYVAL y AS LONG, _                 ' Y location of the static image control.
 BYVAL W AS LONG, _                 ' Width of the static image control.
 BYVAL H AS LONG, _                 ' Height of the static image control.
 BYVAL nID AS LONG _                ' Unique ID of the static image control.
 ) AS LONG

 DECLARE SUB skSetZorder LIB "WinLIFT.dll" ALIAS "skSetZorder" ( _
 BYVAL hCtrl AS LONG, _             ' Handle of the child control.
 BYVAL UseOrder AS LONG _           ' %HWND_ constant or another child control handle.
 )




The "Buttons.bas" project has been updated, to show you how to use them, see below:

'    // Version 4.85
    hCtrl = skStaticImage(hDlg, sResource + "Aero.png", 10, 10, 460, 208, %IDC_FRAME)
    CALL skSetZorder(hCtrl, %HWND_BOTTOM)
    CALL skSetAnchorCtrl(hCtrl, %ANCHOR_HEIGHT_WIDTH)
'    // Version 4.85
    hCtrl = skStaticImage(hDlg, sResource + "makeuplips.png", -20, -70, 200, 134, %IDC_LIPS)
    CALL skSetZorder(hCtrl, %HWND_TOP)


...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

The new WinLIFT CHM help zip file has been attached to the first post of this thread



...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Peter Weis

Hi Patrice,
Thanks for the help file! Good idea! ;D
Regards Peter

Patrice Terrier

Peter,

I was rather lazy on this, i should have written it for long.  ;)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Peter Weis

Hi Patrice,
I am currently a bit lazy! object on my pbfreedb I have not worked for almost a whole year. The console tools I have at the moment even a hangover. I sometimes do not know whether it makes sense to carry on! Sometimes I think to myself whether it even makes sense to program. There are already almost everything. Then I think to myself who actually programmed the still. We are all so old PowerBASIC programmers around 50 years. I think sometimes we are among a dying species. And are made a protected species!

Regards Peter ;D