include files (.INC), it is also possible to break up a project in
a bunch of .BAS files.
I usually do this for sub-dialogs, so main code file can look like:
Code:
#COMPILE EXE #RESOURCE "MYEDIT.PBR" #INCLUDE "EDM32.INC" #INCLUDE "FINDDLG.BAS" #INCLUDE "ABOUT.BAS"
doing them as "templates" - stand-alone .EXE's - each one placed in a
sub-folder in main project's folder. This makes it much faster/easier to
design the actual dialog - instead of having to compile entire project,
I get away with the dialog only, so re-arranging controls, etc. goes
much faster.
Usally no working code in these "templates", just the dialog and a callback
procedure. This way, I slowly build up a library of designed dialogs, so for
next project, I can often save a lot of time by re-using old ones.
When it's time to use any of these stand-alone dialogs, it's just a matter of
copying the .BAS file from the sub-folder to where-ever I need it, remove the
#COMPILE EXE statement, change WinMain/PBMAIN to something like "ShowFindDlg"
and change parent handle to become main dialog's..

------------------
Leave a comment: