Tim,
Have you tried linking in the ver 10.6 control.prg with the 10.7 FWH version. This would confirm that the problem is in the control.prg code and not elsewhere.
Regards,
James
Tim,
Have you tried linking in the ver 10.6 control.prg with the 10.7 FWH version. This would confirm that the problem is in the control.prg code and not elsewhere.
Regards,
James
lTransparent is .t. for the keyclick.
I understand your question. I have to do this soft of evaluation all the time. Often a client has a problem I can't duplicate.
However, the reality is that something changed. If I simply substituted in the 10.06 control.prg, the problem goes away.
I am going to try adding in the changes one section at a time to the 10.06 code until the problem starts ... then I can tell you exactly !
This is the offending code:
case nMsg == WM_LBUTTONDOWN
if ::lTransparent .and. ( ::IsKindOf( "TRADIO" ) .or. ::IsKindOf( "TCHECKBOX" ) )
::oWnd:Refresh( .f. )
endif
return ::LButtonDown( nHiWord( nLParam ), nLoWord( nLParam ), nWParam )
The changes to WM_UPDATEUISTATE and the addition of WM_LBUTTONUP are fine. Howevever, with LBUTTONDOWN I'm having to double click the checkboxes. Also setting the default to lTransparent to .f. is not a problem. The only other change in the code was with the FOLDER, and that is not a problem.
So, the need to double click a checkbox is limited to the above addition made to 10.07. Any thoughts on why or what is wrong ?
::oWnd:Refresh( .f. )::oWnd:Refresh()It still requires a double click, but the flash returns !
Ok. Is the problem solved without side effects if you completely remove the case WM_LBUTTONDOWN?
EMG
James,
As you probably saw from the additional posts, I was able to isolate the problem to the WM_LBUTTONDOWN case in the event handler. Yes, it was added in 10.7, and not present in 10.6. All other changes in 10.7 were fine and did not cause a problem. Those same changes exist through 10.10.
EMG
Yes, if I comment out WM_LBUTTONDOWN from the 10.10 ( or previous ) version of FWH, then the problem goes away.
I'm wondering if there is a variable name in conflict in the classes. The problem is that this occurs consistently in some dialogs, on every checkbox. In other dialogs, it does not occur. It is always the same dialogs, and it is universal within them. That is why I can't give you a sample.
Why was the WM_LBUTTONDOWN added ? Perhaps I can better get this resolved if I knew the reason it was necessary in 10.7 when it worked fine without these changes in all previous versions. The solution to the problem probably lies within this reason.
Thanks.
Tim
* Fix: samples\GradBrus.prg was failing when Alt was pressed or the mouse was clicked on a
radio or a checkbox. We have modified Class TControl Method HandleEvent() to solve it.
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 80, 220, 40, 13
James Bott wrote:I still wonder about the above. What is a "core" control?
#INCLUDE "fivewin.ch"
#INCLUDE "tdata.ch"
#INCLUDE "wcolors.CH"
#INCLUDE "xbrowse.CH"
FUNCTION TestInv
// Declare PRIVATE variables
PRIVATE oDiw, oInv, oInvr, oLbxin // Main dialog object
// Open the inventory database and set the index to part number order
oInv := tdata():new(, "einmst" )
IF !oInv:use()
MsgAlert( "Inventory file could not be opened" )
RETURN nil
ENDIF
oInv:setorder( "einnum" )
oInv:gotop()
// Create the tRecord for editing
oInvr:= TRecord():new( oInv )
// Create the editor dialog
DEFINE DIALOG oDiw RESOURCE "PRO2100" TRANSPARENT // BRUSH oBrush TRANSPARENT
REDEFINE CHECKBOX oInvr:invcof ID 750 OF oDiw ;
MESSAGE "Does this part have cores attached ?" UPDATE
REDEFINE CHECKBOX oInvr:invtxf ID 749 OF oDiw ;
MESSAGE "Is this part generally taxable ?" UPDATE
REDEFINE CHECKBOX oInvr:invtyp ID 748 OF oDiw ;
MESSAGE "Is this a stocking part ?" UPDATE
REDEFINE CHECKBOX oInvr:invapa ID 747 OF oDiw ;
MESSAGE "Should there be a parts kit attached to this item ? " UPDATE
// Create the browse control
REDEFINE XBROWSE oLBxin ID 716 OF oDiw ON CHANGE ( oInvr:load(), oDiw:update() ) UPDATE
oLbxin:setoDBF( oInv )
add to oLbxin header "Part" data oInv:invnum ALIGN LEFT
add to oLbxin Header "Description" data oInv:invdes ALIGN LEFT
add to oLbxin header "Cross Ref." data oInv:invcod ALIGN LEFT
add to oLbxin header "On Hand" data oInv:invstk ALIGN RIGHT PICTURE "9999.99"
add to oLbxin Header "Charge" data oInv:invchg ALIGN RIGHT PICTURE "99,999.99"
add to oLbxin Header "Location" data oInv:invloc ALIGN LEFT
add to oLbxin Header "Manufacturer" data oInv:invman ALIGN LEFT
// Activate the dialog screen
ACTIVATE DIALOG oDiw ON PAINT oLbxin:setfocus() ON INIT ( oDiw:center(wndmain()) )
RETURN NIL// RESOURCE SCRIPT FOR ASW9 Updated: 09/2009 to 11/2009
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "asw8.h"
#include "c:\fwh\include\WinApi.ch"
1 24 "WindowsXP.Manifest"
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
PRO2100 DIALOG DISCARDABLE 0, 0, 660, 175
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_VISIBLE
CAPTION "Checkbox Test Program"
FONT 8, "Arial"
BEGIN
CONTROL "", 716, "TXBrowse", WS_TABSTOP|0x00a00000, 5, 30, 650, 135
CONTROL "Tax", 749, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 10, 5, 40, 13
CONTROL "Stock", 748, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 60, 5, 40, 13
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 110, 5, 40, 13
CONTROL "List", 747, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 160, 5, 32, 13
ENDTimStone wrote:ON PAINT oLbxin:setfocus()
James, you have misunderstood: "Core" is the label, "Button" is the control type.
CONTROL "Core", 750, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 80, 220, 40, 13AUTOCHECKBOX "Core", 750, 80, 220, 40, 13, BS_AUTOCHECKBOX | WS_TABSTOPJames Bott wrote:But why use a button as a ckeckbox?