FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Checkbox text disappears Harbour/MSVC
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Checkbox text disappears Harbour/MSVC
Posted: Thu Feb 19, 2015 04:37 PM
I have this problem consistently on a program build using Harbour, FWH, and MSVC 2013 ( or even previous versions ).

The checkbox displays normally, but when I click on a checkbox, the text ( in this case Receipts ) disappears.

I suspect I should be using a different control than BS_AUTOCHECKBOX ... but don't know what it would be. Does anyone have a suggestion ?

From the .prg file:
Code (fw): Select all Collapse
  REDEFINE CHECKBOX aRpt[1] ID 2037 HELPID 128 ;
      MESSAGE "Daily Totals, and itemized list, for all work completed today" ;
      OF oFld:aDialogs[ 1 ]


From the .rc file:
Code (fw): Select all Collapse
 CONTROL "Receipts", 2037, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 10, 75, 10


Thanks.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Thu Feb 19, 2015 06:25 PM
Tim,

TimStone wrote:
Code (fw): Select all Collapse
CONTROL "Receipts", 2037, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 10, 75, 10


This is what I use:

Code (fw): Select all Collapse
CONTROL "Convenzione:", 102, "BUTTON", BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 70, 10, 50, 12


EMG
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Thu Feb 19, 2015 07:08 PM

No, it's the same behavior

Remember, I'm using Microsoft Visual Studio ( VC+ ) and Harbour

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 04:48 AM
Tim,

In Fivedit preferences, general, there is a checkbox working fine defined this way:

Code (fw): Select all Collapse
AUTOCHECKBOX    "Duplicates on functions panel", 110, 16, 58, 109, 8, 0, WS_EX_LEFT


https://bitbucket.org/fivetech/fivewin-contributions/downloads/fivedit.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 10:00 AM

Antonio,

WS_EX_LEFT is 0 so I wonder if it can make any differences...

EMG

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 04:54 PM

Using that format in the RC results in the same problem.

When a page of checkboxes appears, the prompts are all there. Check on the checkbox, and the text ( prompt ) goes away.

Remember ... this is FWH with Harbour ( no problem using an older xHarbour.com build ) with MSVC. The problem has been there for a long time and I've mentioned it before.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 06:05 PM

Tim,

the problem surely comes from FWH, not from [x]Harbour nor from the C compiler.

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 06:49 PM

Tim,

Does this happen only with a checkbox on a folder page ?

Does this also happen with a checkbox on a dialogbox (no folder) ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 07:11 PM
Tim

I had the same problem with radio buttons and the fix was to add the Group Attribute to the control ..

Rick Lipkin
Code (fw): Select all Collapse
CHECKBOX "Receipts", 2037, 10, 10, 75, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP


Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 08:02 PM

Rick: Group doesn't help, and I also tried changing CONTROL to CHECKBOX, as in your example, but it doesn't recognize that.

Antonio: It is on both folders, and dialog, pages. Also, if I check one box, but then go back and check a different one, then the text comes back on the original. So, when a box is checked, then the prompt does not show. If focus goes elsewhere, then it restores the text by the now unchecked box.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 08:38 PM

Tim,

at this point, we absolutely need a sample showing the problem.

EMG

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Fri Feb 20, 2015 08:43 PM

Actually, at this point I'm going to revise the .rc file.

I've just looked at the MSDN formatting, which is what Antonio used in the editor. For too long I've carried over the old Borland Resource Editor file with some modifications.

Once I do that I will come back here and we can revisit the issue.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Sat Feb 21, 2015 07:45 AM
Tim,

I have started with this simple example and build it using FWH\samples\buildh32.bat that uses MS Visual C

Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   local oDlg, lValue := .T.

   DEFINE DIALOG oDlg

   @ 2, 2 CHECKBOX lValue PROMPT "Checkbox" OF oDlg SIZE 80, 20

   ACTIVATE DIALOG oDlg CENTERED

return nil


Here it is working fine. Could you build it there also and confirm me that it works fine for you ? thanks

Next step: we will use a RC file to define the dialog.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Sat Feb 21, 2015 07:35 PM

Antonio,

OK ... I added it as a function within the application, and it has the same behavior as I see with the .RC

It shows checked, but click on it and it disappears.

If I add two more checkboxes, the one that is clicked ( checked or unchecked ) does not show the text, but the others do. If I click on a different one, then it loses the text, and the previous one regains it.

I should add that I also see this with Radio buttons. I read Rick's note, but grouping didn't seem to help here.

Tim

Built with Microsoft Visual Studio 2013 ( not a build.bat file ), FWH ( current release ) and Harbour ( current FW release ).

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Checkbox text disappears Harbour/MSVC
Posted: Sun Feb 22, 2015 07:32 AM

Tim,

Are you using themes in your app resources ?

1 24 "WindowsXP.Manifest"

regards, saludos

Antonio Linares
www.fivetechsoft.com