Page 1 of 1

Trees from Resources

PostPosted: Thu Mar 29, 2007 2:55 pm
by Euclides
Hi, I am a long time reader, it is my first post.
I am testing the program TESTTREE.PRG (from tree_r5.zip) showing trees in MDI-CHILD, dialogs and from resources and it works OK.
When I transferred the tree-from-resources routine into an other program and the resources into an other DLL it stopped working.
If I put "set resources to ´testtree.dll´" before the routine, it works OK
Any hints ?
TIA, Euclides

FW2.0 + BRW

Re: Trees from Resources

PostPosted: Thu Mar 29, 2007 4:41 pm
by Enrico Maria Giordano
"set resources to ´testtree.dll´" is required.

EMG

PostPosted: Thu Mar 29, 2007 5:19 pm
by Euclides
Enrico, thanks for the answer.
I did "set resources to..." on the beginning of the main program.
I transferred the TESTTREE.DLL resources to the main program´s DLL via the option: Add to Project... on the BWS.
When running , the tree routine, opens the dialog, shows the bitmaps on the buttonbar, but does not show the tree.
So, to do a test, I inserted a new "set resources to testtree.dll" before the tree routine an a "set resources to main.dll" at the end of the tree routine and the tree routine worked well.
I think there is some difference between the two dlls, but cannot figure what.
Regards, Euclides

PostPosted: Thu Mar 29, 2007 5:46 pm
by Enrico Maria Giordano
It seems that BRW doesn't work correctly with DLLs.

EMG

PostPosted: Fri Mar 30, 2007 8:13 am
by Antonio Linares
Euclides,

Save the DLLs resources as RC files, join them in just one RC and build one single DLL from that RC file

PostPosted: Fri Mar 30, 2007 9:09 pm
by Euclides
Thanks Antonio!
Now is working fine.
Regards, Euclides