I have an error in GROUP when using REDEFINE commands, while it works with @ commands
Error description: Error BASE/1004 Message not found: TGROUP:DEFCONTROL
Args:
[ 1] = O TGROUP
Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TGROUP:ERROR( 148 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 77 )
Called from: ../../../tobject.prg => TGROUP:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TGROUP:DEFCONTROL( 142 )
Called from: .\source\classes\BUTTON.PRG => TBUTTON:REDEFINE( 157 )
I hope you can help me
I found your example of RAO and it works fine
- Code: Select all Expand view RUN
- #include "fivewin.ch"
function Main()
local oDlg, oGroup
DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL
ACTIVATE DIALOG oDlg CENTERED ON INIT DlgControls( oDlg)
return nil
function dlgcontrols( oDlg )
local oGroup ,cF := space(20)
local oget
@ 50,20 GROUP oGroup TO 150,170 PIXEL OF oDlg
@ 20,20 GET oGET VAR cF SIZE 100,20 PIXEL OF oGroup
@ 45,20 say 'inside click OK to move ' SIZE 130,20 PIXEL OF oGroup
@ 70,30 BUTTON "OK" SIZE 60,20 PIXEL OF oGroup ;
ACTION oGroup:Move( oGroup:nTop, oGroup:nLeft + 30, , , .t. )
return nil
I need to use REDEFINE commands in a DLL, I prepared an example PRG e RC and it doesn't work
- Code: Select all Expand view RUN
- #include "fivewin.ch"
function Main()
local oDlg, oGroup
DEFINE DIALOG oDlg RESOURCE "test"
ACTIVATE DIALOG oDlg CENTERED ON INIT DlgControls( oDlg)
return nil
function dlgcontrols( oDlg )
local oGroup ,cF := space(20)
local oget, oBtn
REDEFINE GROUP oGroup ID 4001 OF oDlg
REDEFINE get oGet Var cF ID 4002 OF oGroup
REDEFINE BUTTON oBtn ID 250 OF oGroup ;
ACTION oGroup:Move( oGroup:nTop, oGroup:nLeft + 30, , , .t. )
return nil
//**** RC
- Code: Select all Expand view RUN
- LANGUAGE LANG_ITALIAN,SUBLANG_ITALIAN
test DIALOG DISCARDABLE 22, 74, 174, 129
STYLE WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_SYSMENU
FONT 8, "Arial"
{
CONTROL "OK", 250, "Button", WS_TABSTOP, 28, 59, 45, 15
CONTROL "Group-box", 4001, "Button", BS_GROUPBOX, 19, 13, 107, 68
CONTROL "", 4002, "Edit", ES_AUTOHSCROLL|WS_BORDER|WS_TABSTOP, 26, 26, 82, 13
CONTROL "inside click OK to move", 4003, "Static", WS_GROUP, 27, 45, 80, 8
}
Regards Maurizio