Page 1 of 3

Checkbox text disappears Harbour/MSVC

Posted: Thu Feb 19, 2015 4:37 pm
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.

Re: Checkbox text disappears Harbour/MSVC

Posted: Thu Feb 19, 2015 6:25 pm
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

Re: Checkbox text disappears Harbour/MSVC

Posted: Thu Feb 19, 2015 7:08 pm
by TimStone
No, it's the same behavior

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

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 4:48 am
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

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 10:00 am
by Enrico Maria Giordano
Antonio,

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

EMG

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 4:54 pm
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.

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 6:05 pm
by Enrico Maria Giordano
Tim,

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

EMG

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 6:49 pm
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) ?

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 7:11 pm
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

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 8:02 pm
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

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 8:38 pm
by Enrico Maria Giordano
Tim,

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

EMG

Re: Checkbox text disappears Harbour/MSVC

Posted: Fri Feb 20, 2015 8:43 pm
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

Re: Checkbox text disappears Harbour/MSVC

Posted: Sat Feb 21, 2015 7:45 am
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.

Re: Checkbox text disappears Harbour/MSVC

Posted: Sat Feb 21, 2015 7:35 pm
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 ).

Re: Checkbox text disappears Harbour/MSVC

Posted: Sun Feb 22, 2015 7:32 am
by Antonio Linares
Tim,

Are you using themes in your app resources ?

1 24 "WindowsXP.Manifest"