FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour auto focus a checkbox desde DIALOG ... ON INIT
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
auto focus a checkbox desde DIALOG ... ON INIT
Posted: Thu Jun 02, 2011 11:27 AM
Code (fw): Select all Collapse
#include "Fivewin.ch"

#define WM_SYSKEYDOWN      0x0104

Function TestCheck
    LOCAL oDlg
 
    LOCAL oChk, lChk, nChk := 0
    LOCAL oChk2, lChk2, nChk2 := 0
 
    DEFINE DIALOG oDlg
 
    @ 0, 1 CHECKBOX oChk VAR lChk OF oDlg
    @ 1.2, 1 CHECKBOX oChk2 VAR lChk2 OF oDlg
 
    @ 2, 1 BUTTON "&Close" ACTION oDlg:End()
 
    ACTIVATE DIALOG oDlg CENTER  ;
       ON INIT oChk:PostMsg( WM_SYSKEYDOWN, 0, 2 ** 29 )
 
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: auto focus a checkbox desde DIALOG ... ON INIT
Posted: Thu Jun 02, 2011 01:06 PM
http://msdn.microsoft.com/en-us/library/ms646286(v=vs.85).aspx

lParam
The repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, as shown in the following table.

...
29 The context code. The value is 1 if the ALT key is down while the key is pressed; it is 0 if the WM_SYSKEYDOWN message is posted to the active window because no window has the keyboard focus.

De esa forma simulamos la pulsación de ALT
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion