Hello all!
In my main source code, which eventually gets compiled into an EXE, I create a dialog using DIALOG NEW.
This source code then calls a SUB (passing it the handle of the dialog BYREF).
The SUB adds a few controls to the dialog and returns.
The SUB gets compiled into a DLL because these are standard controls I use for many dialogs in many applications.
When the DLL is compiled using PBEdit.EXE Ver 7.04, the controls created by the SUB show up fine when my program runs.
When the DLL is compiled using PBEdit.EXE Ver 8.04, the controls created by the SUB do not show up when the program runs.
When I move the SUB from the DLL source code directly into my main source code and compile using PBEdit.EXE, everything works fine.
I have tried to strip my code down to the most simple example. This is my first attempt at posting a code example so I hope it works.
I would like to keep the SUB that builds controls in a DLL.
I would like to create the DLL using PBEdit.EXE Ver 8.04
Does anyone know of anything I can do to accomplish my above 2 objectives?
In my main source code, which eventually gets compiled into an EXE, I create a dialog using DIALOG NEW.
This source code then calls a SUB (passing it the handle of the dialog BYREF).
The SUB adds a few controls to the dialog and returns.
The SUB gets compiled into a DLL because these are standard controls I use for many dialogs in many applications.
When the DLL is compiled using PBEdit.EXE Ver 7.04, the controls created by the SUB show up fine when my program runs.
When the DLL is compiled using PBEdit.EXE Ver 8.04, the controls created by the SUB do not show up when the program runs.
When I move the SUB from the DLL source code directly into my main source code and compile using PBEdit.EXE, everything works fine.
I have tried to strip my code down to the most simple example. This is my first attempt at posting a code example so I hope it works.
Code:
#COMPILE EXE #INCLUDE "G:\CTS\Library\WIN32API.INC" DECLARE SUB CommonControls LIB "CommCtrl.DLL" ( BYREF hDlg AS DWORD ) '-------------------------------------------------------------------- CALLBACK FUNCTION DlgProc() AS LONG END FUNCTION '-------------------------------------------------------------------- FUNCTION PBMAIN () AS LONG LOCAL hDlg AS DWORD DIALOG NEW 0, "Title",,, 100, 100, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDlg CommonControls ( BYREF hDlg ) DIALOG SHOW MODAL hDlg, CALL DlgProc END FUNCTION '-------------------------------------------------------------------- '--------------------------------------------------------------------
Code:
$COMPILE DLL "CommCtrl" $DEBUG ERROR ON $DIM ALL %console = 0 ' DECLARE SUB CommonControls LIB "CommCtrl.DLL" ( BYREF hDlg AS DWORD ) SUB CommonControls ( BYREF hDlg AS DWORD ) EXPORT CONTROL ADD LABEL, hDlg, 140, "STATION" , 6, 7, 50, 9 END SUB
I would like to create the DLL using PBEdit.EXE Ver 8.04
Does anyone know of anything I can do to accomplish my above 2 objectives?
Comment