Working on the RESOURCE-section of a new sample,
I have a problem to create a xBrowse from resource and displaying the images from a DLL
From CODE there is no problem at all and I could finish this part.
My problem :
The image-array is loaded from the DLL but xbrowse cannot show the images.
I think something must be changed ( the logic ) ?
xBrowse will get only the image-names from the DLL but cannot display / load the resources.
for testing with a DLL You can download :
http://www.pflegeplus.com/DOWNLOADS/Testdll1.zip
The function from the RESOURCE-section
- Code: Select all Expand view
// hSave := GetResources() defined on start-function
// folderpage with xBrowse from RESOURCE
//------------------------------------------------
FUNCTION F_PAGE8( oFld2 )
LOCAL oBrw
LOCAL nI
LOCAL hBitMap1, hBitMap2, hBitMap3, hBitMap4
LOCAL aArray:={}
// From RC-file
REDEFINE XBROWSE oBrw ID 110 OF oFld2:aDialogs[3] columns {1,2,3};
Array aArray sizes {140, 220, 100} LINES CELL autocols fastedit
oBrw:nMarqueeStyle := 1
oBrw:nRowHeight := 85
oBrw:lFooter := .t.
oBrw:aCols[ 1 ]:nEditType := TYPE_IMAGE
oBrw:aCols[ 1 ]:lBmpStretch := .f.
oBrw:aCols[ 1 ]:lBmpTransparent := .t.
oBrw:aCols[ 1 ]:bStrImage := {|oCol, oBrw| oBrw:aRow[ 2 ] }
oBrw:aCols[ 1 ]:nDataBmpAlign := AL_CENTER
oBrw:aCols[ 1 ]:bPopUp := { | o | ColMenu( o ) }
//oBrw:aCols[ 1 ]:bAlphaLevel := { | o | o:oBrw:aRow[ 3 ] }
oBrw:aCols[ 2 ]:nEditType := EDIT_BUTTON
oBrw:aCols[ 2 ]:bEditBlock := {|nRow, nCol, oCol| oCol:Value := cGetFile( "*.*", "Select a file" ) }
oBrw:aCols[ 2 ]:AddBmpFile( "BOOKS" )
oBrw:aCols[ 2 ]:nHeadBmpNo := 1
oBrw:aCols[ 3 ]:nEditType := 1
oBrw:aCols[ 3 ]:bOnPostEdit := {|oCol, xVal, nKey| oCol:Value( xVal ) }
oBrw:aCols[ 3 ]:AddBmpFile( "BOOKS" )
oBrw:aCols[ 3 ]:nFootBmpNo := 1
// switch to DLL and load images
SET RESOURCES TO c_path + "SYSTEM.dll"
aadd( aArray, { "", "FISH1", 50 } )
aadd( aArray, { "", "FISH2", 100 } )
aadd( aArray, { "", "FISH3", 150 } )
aadd( aArray, { "", "FISH4", 200 } )
aadd( aArray, { "", "FISH5", 255 } )
oBrw:SetArray( aArray )
oBrw:Refresh()
SetResources( hSave ) // back to RC
RETURN NIL
regards
Uwe