Checkbox text disappears Harbour/MSVC

User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Checkbox text disappears Harbour/MSVC

Post by TimStone »

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: Select all

  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: Select all

 CONTROL "Receipts", 2037, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 10, 75, 10
 
Thanks.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by Enrico Maria Giordano »

Tim,
TimStone wrote:

Code: Select all

CONTROL "Receipts", 2037, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 10, 75, 10 
This is what I use:

Code: Select all

CONTROL "Convenzione:", 102, "BUTTON", BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 70, 10, 50, 12
EMG
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by TimStone »

No, it's the same behavior

Remember, I'm using Microsoft Visual Studio ( VC+ ) and Harbour
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by Antonio Linares »

Tim,

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

Code: Select all

AUTOCHECKBOX    "Duplicates on functions panel", 110, 16, 58, 109, 8, 0, WS_EX_LEFT
https://bitbucket.org/fivetech/fivewin- ... ivedit.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by Antonio Linares »

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Checkbox text disappears Harbour/MSVC

Post by Rick Lipkin »

Tim

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

Rick Lipkin

Code: Select all

CHECKBOX "Receipts", 2037, 10, 10, 75, 10, BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP
 
Image
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by Antonio Linares »

Tim,

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

Code: Select all

#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
User avatar
TimStone
Posts: 2536
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by TimStone »

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
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Checkbox text disappears Harbour/MSVC

Post by Antonio Linares »

Tim,

Are you using themes in your app resources ?

1 24 "WindowsXP.Manifest"
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply