How to use dialog in resources and bitmaps in dll?

How to use dialog in resources and bitmaps in dll?

Postby Anderson.OL » Tue Feb 26, 2008 6: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 !!
User avatar
Anderson.OL
 
Posts: 92
Joined: Thu Feb 15, 2007 11:37 am
Location: Itaocara - RJ - Brasil

Postby dutch » Wed Feb 27, 2008 2:51 am

Dear Anderson,

Try this, it works for me.

Code: Select all  Expand view
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
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Postby Anderson.OL » Wed Feb 27, 2008 12:34 pm

Hello, thank you for helping, but it was not 100%!

My code is this:

Code: Select all  Expand view
 
   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 !!
User avatar
Anderson.OL
 
Posts: 92
Joined: Thu Feb 15, 2007 11:37 am
Location: Itaocara - RJ - Brasil

Postby Richard Chidiak » Wed Feb 27, 2008 1: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby Anderson.OL » Wed Feb 27, 2008 4: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 !!
User avatar
Anderson.OL
 
Posts: 92
Joined: Thu Feb 15, 2007 11:37 am
Location: Itaocara - RJ - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests