Powerbasic include files

Started by Marc van Cauwenberghe, April 10, 2011, 12:32:31 PM

Previous topic - Next topic

Marc van Cauwenberghe

Hello,
starting to convert a few programs this weekend.
Am I correct in thinking that azt this moment powerbasic includes do not work and that you should use Jose's includes?

Marc

Paul Squires

If you are converting programs then maybe you should start using Jose's includes. I fully intend to *only* support Jose's includes in FF4.

Paul Squires
PlanetSquires Software

José Roca

Thanks to dead code removal, now I can develop helper classes that I had in mind. Today I have written a class for image lists that makes it very easy to create them, e.g.

' ========================================================================================
' Create the toolbar control image list
' ========================================================================================
FUNCTION CreateToolbarImageList () AS IAfxImageList

   ' // Create the image list
   LOCAL pAfxImageList AS IAfxImageList
   pAfxImageList  = NewAfxImageList(16, 16, %ILC_COLOR32 OR %ILC_MASK, 14)
   IF ISNOTHING(pAfxImageList) THEN EXIT FUNCTION

   ' // Give a name to the image list
   pAfxImageList.Name = "Toolbar image list"

   ' // Add the icons from the resource file
   pAfxImageList.LoadResIcon(%IDI_BACK)
   pAfxImageList.LoadResIcon(%IDI_FORWARD)
   pAfxImageList.LoadResIcon(%IDI_NEW)
   pAfxImageList.LoadResIcon(%IDI_FIND)
   pAfxImageList.LoadResIcon(%IDI_PRINTPREV)
   pAfxImageList.LoadResIcon(%IDI_PAGESETUP)
   pAfxImageList.LoadResIcon(%IDI_PRINT)
   pAfxImageList.LoadResIcon(%IDI_PROPERTIES)
   pAfxImageList.LoadResIcon(%IDI_SAVE)
   pAfxImageList.LoadResIcon(%IDI_REFRESH)
   pAfxImageList.LoadResIcon(%IDI_STOP)
   pAfxImageList.LoadResIcon(%IDI_ZOOMIN)
   pAfxImageList.LoadResIcon(%IDI_ZOOMOUT)
   pAfxImageList.LoadResIcon(%IDI_EXIT)

   FUNCTION = pAfxImageList

END FUNCTION
' ========================================================================================


I have in mind to avoid to have to use globals to keep the object references alive storing them into a collection in the CWindow class, but I will have to delay it because I have found an "issue" in the compiler.

I will start to work in a Toolbar class. Toolbars are a pain to create manually.

Marc van Cauwenberghe

Ok,

From now on only Jose's includes. Most project were those in fact.

Thanks,
Marc