FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to use dialog in resources and bitmaps in dll?
Posts: 92
Joined: Thu Feb 15, 2007 11:37 AM
How to use dialog in resources and bitmaps in dll?
Posted: Tue Feb 26, 2008 06:35 PM

The distribution of the system is easier, because the dll will only be a send an only time.
I need to know how to load the dll without losing the included resource in the program!

FiveWin 9.03 + xHarbour !!
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to use dialog in resources and bitmaps in dll?
Posted: Wed Feb 27, 2008 02:51 AM
Dear Anderson,

Try this, it works for me.

Function main()
Public hResc
.....
hResc := GetResources()  // Main .RC file
SET RESOURCES TO ("EZ4SCR.DLL")
SET RESOURCES TO ("BWCC.DLL")
SetResource( hResc )
.....
return

Function Sub
   SET RESOURCES TO "EZ4SCR.DLL"
   DEFINE DIALOG oDlg
       .....
       oDlg:bStart := {|| SetResources( MEMVAR->hResc ) } 
   ACTIVATE DIALOG oDlg

return
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 92
Joined: Thu Feb 15, 2007 11:37 AM
How to use dialog in resources and bitmaps in dll?
Posted: Wed Feb 27, 2008 12:34 PM
Hello, thank you for helping, but it was not 100%!

My code is this:

  
   hRes := GetResources()  
   SetResources( hRes )  
   ...  
   SetResources('Bitmaps.dll')  
   @ 10,10 Image oImage resource cWallPaper Of oWnd Pixel //-- In bitmaps.dll  
   ...  
   SetResources( hRes )     
   DEFINE DIALOG oDlg Resource "DLGSELEMPRESA" of ownd //-- In Main.rc  
   SetResources('Bitmaps.dll')
   REDEFINE ButtonBmp oBtnExit ID 203 of oDlg Bitmap "Exit24" //-- In bitmaps.dll  
   oDlg:bStart := {|| SetResources('Bitmaps.dll') }  
   ACTIVATE DIALOG oDlg CENTERED


The object oImage show the resource, but the object ButtonBmp not!
What is wrong?
FiveWin 9.03 + xHarbour !!
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
How to use dialog in resources and bitmaps in dll?
Posted: Wed Feb 27, 2008 01:09 PM

Anderson,

There is no "automatic RESIZE" on buttonbmp, if the area reserved for displaying the button in your resource is not big enough, the buttonbmp will not show. Try to increase it.

HTH

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 92
Joined: Thu Feb 15, 2007 11:37 AM
How to use dialog in resources and bitmaps in dll?
Posted: Wed Feb 27, 2008 04:46 PM
Richard Chidiak wrote:Anderson,

There is no "automatic RESIZE" on buttonbmp, if the area reserved for displaying the button in your resource is not big enough, the buttonbmp will not show. Try to increase it.

HTH

Richard


This is not the problem.
The problem is that I am moving the bitmaps from resource to dll.
FiveWin 9.03 + xHarbour !!

Continue the discussion