Change Dialog Style at runtime
Posted: Fri May 23, 2008 4:49 am
How to change dialog style define from resource?
RC:
INFO DIALOG 6, 15, 473, 347
STYLE WS_POPUP | WS_VISIBLE | WS_SYSMENU
FONT 10, "Courier"
{
}
PRG:
//perfectly as expected
DEFINE DIALOG oDlg RESOURCE 'INFO'
...
ACTIVATE DIALOG oDlg
//-------------------
//on the other prg with child window
DEFINE WINDOW oWnd TITLE "Test Child" MDICHID
DEFINE DIALOG oDlg RESOURCE 'INFO' OF oWnd
...
ACTIVATE DIALOG oDlg NOWAIT;
ON INIT SetWindowLong( oDlg:hWnd, GWL_EXSTYLE, nOr(WS_CHILD ) )
ACTIVATE WINDOW oWnd
//-------------------
not working as expected...??? the oDlg must be transform to child of oWnd
any help?
The purpose is to use dialog 'INFO' as popup dialog somewhere and a child of oWnd somewhere within the app.
How to change dialog style at runtime?
-Best Regards,
RC:
INFO DIALOG 6, 15, 473, 347
STYLE WS_POPUP | WS_VISIBLE | WS_SYSMENU
FONT 10, "Courier"
{
}
PRG:
//perfectly as expected
DEFINE DIALOG oDlg RESOURCE 'INFO'
...
ACTIVATE DIALOG oDlg
//-------------------
//on the other prg with child window
DEFINE WINDOW oWnd TITLE "Test Child" MDICHID
DEFINE DIALOG oDlg RESOURCE 'INFO' OF oWnd
...
ACTIVATE DIALOG oDlg NOWAIT;
ON INIT SetWindowLong( oDlg:hWnd, GWL_EXSTYLE, nOr(WS_CHILD ) )
ACTIVATE WINDOW oWnd
//-------------------
not working as expected...??? the oDlg must be transform to child of oWnd
any help?
The purpose is to use dialog 'INFO' as popup dialog somewhere and a child of oWnd somewhere within the app.
How to change dialog style at runtime?
-Best Regards,