FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour bug in FW 13.04 combobox
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: bug in FW 13.04 combobox
Posted: Tue May 07, 2013 07:54 PM

testcombo.prg not working the same way between 13.03 and 13.04. If you initialize cItem local cItem := "Testing" it is shown with 13.03 and not with 13.04.

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Tue May 07, 2013 08:31 PM

André,

I email you the fixed library :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: bug in FW 13.04 combobox
Posted: Tue May 07, 2013 08:40 PM

Ok now working with BCC582. Can you send me the libs for msvc10 or better teach how to remove and add a prg from the libs like in the old days lib -+ ...

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 85
Joined: Mon Apr 18, 2011 02:32 AM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 02:53 AM

Antonio...

I have same problem. Advisable your posting the fix here..
but in my case, in RC file I must be change all combobox elements..
is so very very very very very back breaking....:(
TQ.

Mulyadi

Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 08:33 AM

Antonio, in my code it is beeing enough to write directly in the code "REDEFINE COMBOBOX....STYLE CBS_DROPDOWN". The RC-file must not be changed.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 10:08 AM

André,

This is how I manage the libraries with Microsoft:

set VCDIR="%ProgramFiles%\Microsoft Visual Studio 10.0\VC"

%VCDIR%\bin\Lib Fivehc32.lib /OUT:Fivehc32.lib module.obj

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 10:09 AM

Mulyadi,

have you tested the fix that I have published above ?

If keeps failing, could you please post a portion of your RC where you use the comboboxes and what you have to change ? thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 10:11 AM

Günther,

FWH COMBOBOX command also supports that clause :-)

Could you please show an example of what is failing with current combobox implementation ? Here is fine on our tests, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 11:26 AM

Antonio,

I just perceived I don´t have the new combobox.prg. Can you mail it please?

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 11:31 AM

Already sent :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 11:32 AM
Antonio, now the reaction seems to be OK! :-)

Additional i had moved the creation from the ::oGet and ::bLostFocus and ::bKeyChar in ::initiate(). So this code are required only once. (not separate in ::new() and ::redefine() ) -> see code down
Only the function in ::GetKeyChar( nKey ) to seek in the list are not optimal. When no item found, strange things are to see. (double chars, ...)

Code (fw): Select all Collapse
METHOD Initiate( hDlg ) CLASS TComboBox

   ::Super:Initiate( hDlg )

   ::Default()

   if nAnd( GetWindowLong( ::hWnd, GWL_STYLE ), CBS_DROPDOWNLIST ) == CBS_DROPDOWN
      ::oGet := TGet():ReDefine( nil,    ;  // ID not used
                              ::bSetGet, ;  // bSETGET(uVar)
                              Self,      ;  // oDlg
                              ::nHelpID, ;  // Help Context ID
                              ::cPict,     ;  // Picture
                              nil,       ;  // Valid is handled by the CBx
                              ::nClrText,;
                              ::nClrPane,;
                              ::oFont,   ;  // <oFont>
                              nil,       ;  // <oCursor>
                              ::cMsg,      ;  // cMsg
                              nil,       ;  // <.update.>
                              nil,       ;  // <{uWhen}>
                              ::bEChange,  ;  // {|nKey,nFlags,Self| <uEChange>}
                              .F.        )  // <.readonly.> )

      ::oGet:hWnd = GetWindow( ::hWnd, GW_CHILD )
      ::oGet:Link()
      ::oGet:bLostFocus = ;
      {| hCtlFocus, nAt, cItem| cItem := GetWindowText( ::hWnd ), ;
      nAt := ::SendMsg( CB_FINDSTRING, 0, Trim( cItem )) + 1,;
      Eval( ::bSetGet, cItem ),;
      ::Select( nAt ),;
      SetWindowText( ::hWnd, cItem ),;
      If( ::bValid != nil .and. ;
      GetParent( hCtlFocus ) == GetParent( ::hWnd ),;
      If( ! Eval( ::bValid, ::oGet, Self ),;
      ::PostMsg( WM_SETFOCUS ),),) }

      ::oGet:bKeyChar = { | nKey | ::GetKeyChar( nKey ) }
    endif
   ::Refresh()
return nil
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 11:34 AM
Günther,

Additional i had moved the creation from the ::oGet and ::bLostFocus and ::bKeyChar in ::initiate()


We can't do that or we break existing legacy code, like this:

REDEFINE COMBOBOX oCbx ...

oCbx:... = ... // Your changes will error here!

ACTIVATE DIALOG oDlg
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 11:46 AM

Ok Antonio. General: On what moment the ::initiate() from the controls are called and from what code?

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 12:08 PM
Günther,

Method Initiate() is invoked in response to Windows WM_INITDIALOG message:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms645428(v=vs.85).aspx

So it is executed from ACTIVATE DIALOG but _before_ the dialog is shown :-)

Sent to the dialog box procedure immediately before a dialog box is displayed
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: bug in FW 13.04 combobox
Posted: Wed May 08, 2013 12:24 PM

Antonio, thanks!

Regards,
Günther
---------------------------------
office@byte-one.com