Error when press ALT + XXX

Error when press ALT + XXX

Postby Jimmy » Fri Nov 11, 2022 9:45 am

hi,

i got a Error when press ALT + "any Key" using TGrid()

Error description: Error BASE/1004 Message not found: TWINDOW:GETHOTPOS
Args:
[ 1] = O TWINDOW

Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TWINDOW:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TWINDOW:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TWINDOW:GETHOTPOS( 0 )
Called from: .\source\classes\CONTROL.PRG => TGRID:SYSCOMMAND( 1337 )
Called from: .\source\classes\CONTROL.PRG => TGRID:HANDLEEVENT( 1835 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3681 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1114 )
Called from: TGRID.prg => MAIN( 512 )

but i have no "Hotkey" define ...
how can i avoid Error :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Error when press ALT + XXX

Postby Antonio Linares » Fri Nov 11, 2022 10:06 am

Dear Jimmy,

In you Class TGrid please implement this method:

METHOD GetHotPos() VIRTUAL
regards, saludos

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

Re: Error when press ALT + XXX

Postby Jimmy » Fri Nov 11, 2022 11:02 am

hi Antonio,
Antonio Linares wrote:METHOD GetHotPos() VIRTUAL

i have try to include
Code: Select all  Expand view
METHOD GetHotPos() VIRTUAL

in my CLASS TGrid() and CLASS TExplorer() but still get Error ... :(

---

after disable and reduce used CLASS i got to TControl:HandleEvent() which are SUPER CLASS of TGrid()

i have look for
Code: Select all  Expand view
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TControl
...
1834       case nMsg == WM_SYSCOMMAND
1836           return ::SysCommand( nWParam, nLoWord( nLParam ), nHiWord( nLParam ) )

so i "override" it in my CLASS TGrid()
Code: Select all  Expand view
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGrid
   DO CASE
      ...
      CASE nMsg == WM_SYSCOMMAND
         RETURN nil
   ENDCASE

now i got no Error any more :D

later when want to use ALT as Hotkey in TGrid() i can change it
thx for help to point me Direction to go
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Error when press ALT + XXX

Postby Antonio Linares » Fri Nov 11, 2022 11:24 am

very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
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 86 guests