Strange checkbox issue with Windows IDE

Strange checkbox issue with Windows IDE

Postby TimStone » Mon May 09, 2016 8:27 pm

I am using Windows 10, Visual Studio 2015 Community IDE, Harbour 3.2 and FWH 16.03.

This problem ONLY occurs when building the application with the Visual Studio IDE. Building using an external .bat file, or building with xHarbour(.com) does not create the problem. I use the Visual Studio IDE for fast builds of testing module. I would like to get to the bottom of this problem, so any input will be appreciated.

In this setting, the following code:
REDEFINE CHECKBOX oPart:invtyp ID 748 OF oDiw MESSAGE "Is this a stocking part ?" UPDATE
works with the following line in an .rc file
AUTOCHECKBOX "Stock",748,115,175,40,13

When the dialog is first displayed, the checkbox appears with the prompt Stock showing. If I click the checkbox, the word disappears after displaying the check mark. If I click in one of the Get fields on the dialog, the word will come back.

Does anyone have some ideas on how to correct this ? As I said, it works in other build formats, but not when built by the IDE.

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Tue May 10, 2016 6:54 am

Tim,

Please post here the complete RC file.

Also if a manifest file is being used, please copy it here.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Tue May 10, 2016 7:05 pm

You don't want the complete .rc file. It is far too large. Here are the sections you need:

Code: Select all  Expand view


/*
            PRG:            MLS10.rc
            Purpose:    Resource file for Windows builds
           
            Updated:    8/1/2015 12:13:02 PM
*/
         
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "asw8.h"


#ifndef WC_TABCONTROL
   #define WC_TABCONTROL "SysTabControl32"
#endif
#ifndef WC_XBROWSE
   #define WC_XBROWSE "TxBrowse"
#endif

2 24 WindowsXP.manifest

LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US





INVMASTERW DIALOG 0, 0, 850, 460
STYLE WS_POPUP | WS_CAPTION
CAPTION "Inventory Master Editor"
{
    CONTROL                 "", 100, "TBar", 0|WS_CHILD|WS_VISIBLE, 0,0, 850, 30
    CONTROL         "",716,"TxBrowse",WS_BORDER | WS_VSCROLL | WS_TABSTOP,5,225,840,225
    LTEXT           "Number",-1,5,40,50,13
    EDITTEXT        770,50,40,100,13,ES_AUTOHSCROLL
    LTEXT           "Cross Ref.",-1,5,55,50,13
    EDITTEXT        768,50,55,100,13,ES_AUTOHSCROLL
    LTEXT           "Super.",-1,5,70,50,13
    EDITTEXT        763,50,70,100,13,ES_AUTOHSCROLL
    LTEXT           "UPC",-1,5,85,40,13
    EDITTEXT        868,50,85,100,13,ES_AUTOHSCROLL
    LTEXT           "Description",-1,200,40,50,13
    EDITTEXT        769,260,40,180,13,ES_AUTOHSCROLL
    LTEXT           "Manufacturer",-1,200,55,50,13
    COMBOBOX        767,260,55,100,162,CBS_DROPDOWN | WS_BORDER | WS_VSCROLL | WS_TABSTOP
    LTEXT           "Location",-1,200,70,50,13
    EDITTEXT        766,260,70,40,13
    AUTOCHECKBOX    "Return ?",1300,310,70,40,13
    LTEXT           "Quan:",-1,360,70,30, 13
    EDITTEXT        1301,395,70,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Stock Here",-1,5,100,40,13
    EDITTEXT        762,50,100,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "On Order",-1,5,115,40,13
    EDITTEXT        761,50,115,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Core Here",-1,5,130,40,13
    EDITTEXT        760,50,130,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Due Back",-1,5,145,40,13
    EDITTEXT        759,50,145,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Minimum",-1,5,160,40,13
    EDITTEXT        758,50,160,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Stock To",-1,5,175,40,13
    EDITTEXT        757,50,175,45,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Build",-1,5,190,40,13
    EDITTEXT        4001,50,190,45,13,ES_AUTOHSCROLL
    LTEXT           "Move",-1,5,205,40,13
    EDITTEXT        4002,50,205,45,13,ES_AUTOHSCROLL
    LTEXT           "Category ",-1,115,100,45,13
    EDITTEXT        506,165,100,100,13
    LTEXT           "Table",-1,115,115,24,13
    COMBOBOX        745,165,115,100,143,CBS_DROPDOWN | WS_BORDER | WS_VSCROLL | WS_TABSTOP
    AUTOCHECKBOX    "List",747,115,130,32,13
    COMBOBOX        746,165,130,100,111,CBS_DROPDOWN | WS_BORDER | WS_VSCROLL | WS_TABSTOP
    AUTOCHECKBOX    "Tax",749,115,160,40,13
    AUTOCHECKBOX    "Stock",748,115,175,40,13
    AUTOCHECKBOX    "Core",750,115,190,40,13
    LTEXT           "Weight",-1,175,145,30,13
    EDITTEXT        717,210,145,55,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Type",-1,175,160,30,13
    EDITTEXT        764,210,160,55,13,ES_AUTOHSCROLL
    LTEXT           "Sort",-1,175,175,30,13
    EDITTEXT        765,210,175,55,13,ES_AUTOHSCROLL
    LTEXT           "Return",-1,175,190,30,13
    EDITTEXT        4003,210,190,55,13,ES_AUTOHSCROLL
    LTEXT           "Pack",-1,175,205,30,13
    EDITTEXT        4004,210,205,55,13,ES_AUTOHSCROLL
    LTEXT           "Notes",-1,300,90,40,13
    EDITTEXT        4005,300,100,140,115,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
    CTEXT           "HISTORY:",-1,546,40,40,13
    LTEXT           "M-T-D",-1,470,55,40,13
    EDITTEXT        756,520,55,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Y-T-D",-1,470,70,40,13
    EDITTEXT        755,520,70,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "-1 Year",-1,470,85,40,13
    EDITTEXT        754,520,85,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "-2 Years",-1,470,100,40,13
    EDITTEXT        753,520,100,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Purchase",-1,470,115,40,13
    EDITTEXT        752,520,115,60,13,ES_CENTER
    LTEXT           "Sale",-1,470,130,40,13
    EDITTEXT        751,520,130,60,13,ES_CENTER
    LTEXT           "Vendor 1",-1,470,160,40,13
    EDITTEXT        744,520,160,60,13,ES_AUTOHSCROLL
    LTEXT           "Vendor 2",-1,470,175,40,13
    EDITTEXT        743,520,175,60,13,ES_AUTOHSCROLL
    LTEXT           "Vendor 3",-1,470,190,40,13
    EDITTEXT        742,520,190,60,13,ES_AUTOHSCROLL
    LTEXT           "Vendor 4",-1,470,205,40,13
    EDITTEXT        741,520,205,60,13,ES_AUTOHSCROLL
    LTEXT           "Jan",-1,600,40,20,13
    EDITTEXT        740,630,40,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Feb",-1,600,55,20,13
    EDITTEXT        739,630,55,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Mar",-1,600,70,20,13
    EDITTEXT        738,630,70,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Apr",-1,600,85,20,13
    EDITTEXT        737,630,85,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "May",-1,600,100,20,13
    EDITTEXT        736,630,100,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Jun",-1,600,115,20,13
    EDITTEXT        735,630,115,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Jul",-1,600,130,20,13
    EDITTEXT        734,630,130,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Aug",-1,600,145,20,13
    EDITTEXT        733,630,145,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Sep",-1,600,160,20,13
    EDITTEXT        732,630,160,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Oct",-1,600,175,20,13
    EDITTEXT        731,630,175,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Nov",-1,600,190,20,13
    EDITTEXT        730,630,190,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Dec",-1,600,205,20,13
    EDITTEXT        729,630,205,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Average Cost",-1,710,40,60,13
    EDITTEXT        728,780,40,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Last Price Paid",-1,710,55,60,13
    EDITTEXT        727,780,55,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Core Value",-1,710,70,60,13
    EDITTEXT        726,780,70,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Retail",-1,710,85,60,13
    EDITTEXT        725,780,85,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Wholesale 1",-1,710,100,60,13
    EDITTEXT        724,780,100,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Wholesale 2",-1,710,115,60,13
    EDITTEXT        723,780,115,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Wholesale 3",-1,710,130,60,13
    EDITTEXT        722,780,130,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Wholesale 4",-1,710,145,60,13
    EDITTEXT        721,780,145,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Core Charge",-1,710,160,60,13
    EDITTEXT        720,780,160,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Assessment",-1,710,175,60,13
    EDITTEXT        719,780,175,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "Environmental",-1,710,190,60,13
    EDITTEXT        718,780,190,60,13,ES_RIGHT | ES_MULTILINE
    LTEXT           "",7001,480,10,150,13
}

 



And the manifest file referenced above:

Code: Select all  Expand view

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
    version="1.0.0.0"
    processorArchitecture="X86"
    name="FiveTech Software.FiveWin.32bits"
    type="win32"
/>
<description>Your application description here.</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Tue May 10, 2016 7:14 pm

Tim,

I would like to test it here.

Could you send me a zip with the complete Visual Studio Solution ?

In case you don't want to provide me your sources, we could do a TeamViewer session.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Tue May 10, 2016 8:11 pm

I sent an email for Team Viewer. It's much too large an application to send.

When you sign on, you will see the application screen open. Click on a check box, any one, and you will see the issue
In the IDE you will see the code for that dialog.

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Wed May 11, 2016 8:01 am

Tim,

I have sent you an email, the session was down (this morning)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Thu May 12, 2016 10:00 pm

This is still an open item in case someone has ideas. It is a curiosity more than a significant problem since I can use a batch build to create a distributable version that does not have the problem.

The issue is with both checkbox and radio controls, which means it's actually an issue of the "button" control which both inherit from. It is not likely to be a code problem in FWH since it works fine with xHarbour builds and those created with the .mak routine. It is apparently an issue with something that the Visual Studio IDE links in that we do not specify in the .mak builds.

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Fri May 13, 2016 5:06 am

Tim,

We need a small example that we can build in the VSC2015 IDE
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Fri May 13, 2016 2:56 pm

I will do that today.
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
User avatar
TimStone
 
Posts: 2927
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Sun May 15, 2016 7:20 am

Tim,

Visual Studio automatically includes a manifest file that has to be disabled like in the image.

Without it, it works fine
Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Sun May 15, 2016 4:39 pm

Antonio,

Thank you ... so this leads to some more specific questions:

1) Can we name the manifest anything as long as we specify the alternate name in our resource file ? WindowsXP.manifest seems very old ... so if I wanted to call it MLS32.manifest and changed that reference in the .rc file, will that work ok ?

2) We have a .manifest file for 32 bit, but is there a sample of a 64 bit manifest ?

3) If I wanted to use the same .rc file for both 32 bit and 64 bit builds, how should we reference that in the file ? Right now we use: 2 24 WindowsXP.manifest but would want to have the build select either a 32 bit or 64 bit manifest file.

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Sun May 15, 2016 5:59 pm

Tim,

1) I have not tried it. Please try it and check it for yourself, thanks

2) There is a 64 bits manifest at c:\fwh\samples\winxp\WindowsXP.Manifest64

3) There is no way (that I may be aware) to detect 64 bits from the RC, so in FWH we use a define in samples\build64.bat

IF EXIST %1.rc rc -r -D__64__ %1

so in our RCs we use such __64__ when needed:

from samples\combos.rc:
Code: Select all  Expand view
#ifndef __64__
   1 24 ".\WinXP\WindowsXP.Manifest"
#endif

#ifdef __64__
   1 24 ".\WinXP\WindowsXP.Manifest64"
#endif
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Strange checkbox issue with Windows IDE

Postby TimStone » Mon May 16, 2016 4:04 pm

Antonio,

After making the change and telling the IDE to not make the manifest, the dialog worked fine. Then I moved to the 64 bit version, and it failed, even with a 64 bit manifrest. So then I commented out the MANIFEST instruction line in the .rc and rebuilt the project. Suddenly all worked correctly.

For further testing, I did the same on the 32 bit version. It worked fine. I made sure there was no manifest file in the path of the .exe, and then I did the rebuilds with a bat / mak combo, and also with xHarbour.com and in all cases, it works fine with no manifest in the path, and no manifest in the .rc.

Further testing will determine if there is an issue somewhere along the way but so far ... it's good.

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

Re: Strange checkbox issue with Windows IDE

Postby Antonio Linares » Mon May 16, 2016 10:21 pm

Tim,

Sometimes Visual Studio keeps a buffer and it is a good practise to clean the solution working on regularly

Glad to know that it is working fine :-)

Personally I think that Visual Studio is a great tool to use with Harbour and FWH
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests