Error when press ALT + XXX

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Error when press ALT + XXX

Post by Jimmy »

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
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Error when press ALT + XXX

Post by Antonio Linares »

Dear Jimmy,

In you Class TGrid please implement this method:

METHOD GetHotPos() VIRTUAL
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Error when press ALT + XXX

Post by Jimmy »

hi Antonio,
Antonio Linares wrote:METHOD GetHotPos() VIRTUAL
i have try to include

Code: Select all | Expand

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

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

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
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

Re: Error when press ALT + XXX

Post by Antonio Linares »

very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply