I encountered a problem with the TREBAR class on Windows XP with the latest version of Fivewin.
I know that Windows XP is an outdated operating system but unfortunately I still have clients who use it.
To check the problem, simply compile rebars.prg file in the samples folder.
- Code: Select all Expand view RUN
- #include "FiveWin.ch"
function Main()
local oWnd, oReBar, oToolBar, oPanel, oBtn1, oFolder, oToolBar2
local oImageList, oHand
DEFINE WINDOW oWnd TITLE "Testing rebars and toolbars" ;
MENU BuildMenu()
DEFINE CURSOR oHand RESOURCE "hand"
oReBar = TReBar():New( oWnd )
oPanel := TPanel():New( 0, 0, 75, 300, oReBar )
oImageList = TImageList():New()
oImageList:AddMasked( TBitmap():Define( , "..\bitmaps\16x16\new2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( , "..\bitmaps\16x16\open2.bmp", oWnd ),;
nRGB( 255, 0, 255 ) )
oImageList:Add( TBitmap():Define( , "..\bitmaps\16x16\icon.bmp", oWnd ),;
TBitmap():Define( , "..\bitmaps\16x16\icoMask.bmp", oWnd ) )
oToolBar = TToolBar():New( oPanel, 33, 33, oImageList )
oToolBar:nLeft = 5
oToolBar:AddButton( { || MsgInfo( "New" ) }, "New" ) // , "new file" )
oToolBar:AddButton( { || MsgInfo( "Open" ) }, "Open" )
oToolBar:AddButton( { || MsgInfo( "three" ) }, "three" )
oToolBar:AddSeparator()
oToolBar:AddButton( { || MsgInfo( "four" ) }, "four" )
oToolBar:oCursor = oHand
oReBar:InsertBand( oPanel )
@ 10, 2 FOLDER oFolder PROMPTS "One", "Two", "Three" SIZE 400, 62
oToolBar2 = TToolBar():New( oFolder:aDialogs[ 1 ],,, oImageList )
oToolBar2:AddButton( { || MsgInfo( "pointer" ) }, "pointer" )
oToolBar2:AddSeparator()
oToolBar2:AddButton( ,"label" )
oToolBar2:AddButton( ,"button" )
oReBar:InsertBand( oFolder )
DEFINE STATUSBAR OF oWnd PROMPT "Rebars and Toolbars test"
ACTIVATE WINDOW oWnd MAXIMIZED
oImageList:End()
return nil
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "&File"
MENU
MENUITEM "&New..." ACTION MsgInfo( "Hello" )
ENDMENU
ENDMENU
RETURN oMenu
- Code: Select all Expand view RUN
- // Add this to your resources RC file
#ifndef __64__
1 24 ".\WinXP\WindowsXP.Manifest"
#endif
#ifdef __64__
1 24 "WinXP/WindowsXP.Manifest64"
#endif
Hand CURSOR .\..\cursors\Hand.cur
Tools used:
Fivewin 19.09
Borland 5.82
Can someone help me ?
Thanks
Massimo