WHEN CLICKING ON RADIO BUTTONS OR CHECKBOXES, the Text disappears.
Here is an example of the problem.. This is a printer selection control.
This is the RC. Note we are using Radio buttons this time. They are vertically stacked. The first one starts at position 10, and is 12 points high. So it goes to 22. The next one is at row 25. I use 15 point line spacing for all my dialogs and everything works fine except the behavior on the checkbox and radio controls when clicking one.
- Code: Select all Expand view
PRNSELW DIALOG 0, 0, 230, 90
STYLE WS_POPUP | WS_CAPTION
CAPTION "Printer Selection Options"
{
CONTROL "Use DEFAULT printer",353,"Button",BS_AUTORADIOBUTTON,57,10,108,12
CONTROL "Select an ALTERNATE printer",354,"Button",BS_AUTORADIOBUTTON,57,25,158,12
PUSHBUTTON "",350,35,40,40,40
PUSHBUTTON "",351,95,40,40,40
PUSHBUTTON "",352,155,40,40,40
}
Here is the .prg code that uses this dialog:
- Code: Select all Expand view
/* FUNCTION prnsel
Description: Printer selection control
Date updated: 9/29/2007
*/
FUNCTION prnsel
// Declare EXTERNAL variables
LOCAL ofBrush
MEMVAR oWnd, lGxPrsnt
// Declare LOCAL variables
LOCAL prnmeth := 0, oDlg, oRadOpt, lView := .F. , lPrint := .F. , nPrn := 1
LOCAL cTitle := "Printer Selection Options"
lGxPrsnt := .T. // Assign static values
// Create the dialog
IF cWSshow = "W"
DEFINE DIALOG oDlg RESOURCE "PRNSELw" BRUSH oBrush transparent TITLE cTitle
ELSE
DEFINE DIALOG oDlg RESOURCE "PRNSEL" BRUSH oBrush transparent TITLE cTitle
ENDIF
// Create the radio control
REDEFINE RADIO oRadOpt VAR nPrn ID 353, 354 OF oDlg
// Create the button controls
REDEFINE BTNBMP ID 350 of oDlg RESOURCE "HRZMIN" PROMPT "View" NOBORDER TRANSPARENT ;
ACTION ( lView := .T., oDlg:End ) MESSAGE "Preview the report, with an option to print"
REDEFINE BTNBMP ID 351 of oDlg RESOURCE "HRPRINT" PROMPT "Print" NOBORDER TRANSPARENT;
ACTION ( lPrint := .T., oDlg:End ) MESSAGE "Print the report without previewing"
REDEFINE BTNBMP ID 352 of oDlg RESOURCE "HREXIT" PROMPT "Cancel" NOBORDER TRANSPARENT;
ACTION ( oDlg:End ) MESSAGE "Cancel the print operation "
// Activate the dialog
ACTIVATE DIALOG oDlg CENTERED
IF lView .AND. nPrn = 2 // View and select printer
prnmeth := 1
ELSEIF lView .AND. nPrn = 1 // View and default printer
prnmeth := 2
ELSEIF lPrint .AND. nPrn = 2 // Print with selection
prnmeth := 3
ELSEIF lPrint .AND. nPrn = 1 // Print to default
prnmeth := 4
ENDIF
RETURN ( prnmeth )
This has worked fine for the past 15 years. It started being a problem with the latest release of FWH. In this example, click on either button and the text next to it disappears.
I'm using the latest FWH libraries with Visual Studio Community 2022 and Harbour. Builds are both 32 bit and 64 bit.