I am writing a Fortran Console application that uses a single dialog box. The box contains a variable number of checkbox controls; i.e. the program must add and remove checkboxes. Not having much experience with this--and not even sure it is possible--I am contemplating a brute force approach where my program directly edits the resource.rc file. An excerpt from this file (an example dialog that contains two checkbox controls) is
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 362, 230
STYLE DS_MODALFRAME ! WS_POPUP ! WS_CAPTION ! WS_SYSMENU
CAPTION "Keyword list"
FONT 8, "Ms Sans Serif"
BEGIN
CONTROL "Check1",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,15,30,68,13
CONTROL "Check2",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,15,42,64,12
END
So, it appears that all my program has to do is manipulate the text in this Begin-End block, adding and removing lines. Right?
What worries me is that there is also an associated Resource.fd include file, and a Resource.h header file, which also contain similar information. Does my program also need to modify these? This would become much more burdensome. And, there is a statement in the "Digital Visual Fortran Programmer's Guide" (the only reference I have with info on this topic) warning that this may not work.
Or maybe there is a better way?