I wanted created a simply dialog with a header on the right part of the window as you can see on this picture
How I can make it ?
I dont understand how is called the right part of this ownd

can you help me please ?
Falconi Silvio

Hallo, from Germany
I have the same problem.
regards
Uwe
// FWH Class TOutLook2003
#include "FiveWin.ch"
#include "Splitter.ch"
static lExit := .F.
STATIC aCtrl // <-----
//----------------------------------------------------------------------------//
function Main()
local oWnd, oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
local oFont
DEFINE WINDOW oWnd TITLE "FWH new Class TOutLook2003" MDI // ;
// MENU BuildMenu()
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp";
ON CHANGE (Show (oOutLook2003, oWnd:oWndClient)) // <-----
aCtrl := Array (Len (oOutLook2003:aGroups)) // <-----
oWnd:oLeft = nil // Because the splitter is going to control the resize
@ 1, 2 BUTTON "New" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION BuildDlg()
@ 3, 2 BUTTON "Edit" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 5, 2 BUTTON "Search" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Search" )
@ 1, 1 COMBOBOX cCombo ITEMS { "January", "February", "March", "April", "May" } ;
OF oOutLook2003:aDialogs[ 2 ] SIZE 170, 100
DEFINE FONT oFont NAME "Arial" SIZE 0, -10
@ 12, 10 SAY Date() OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 20 FONT oFont
@ 3, 1 RADIO oRad VAR nValue OF oOutLook2003:aDialogs[ 2 ] ;
ITEMS "&Day", "&Week", "&Month" SIZE 100, 20
oRad:SetFont( oFont )
#ifndef __CLIPPER__
DEFINE STATUSBAR oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#else
DEFINE MESSAGE oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#endif
SetParent( oOutLook2003:hWnd, oWnd:hWnd )
oWnd:oClient = nil
@ 0, 191 SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWnd:oWndClient ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
SetParent( oSplit:hWnd, oWnd:hWnd )
ACTIVATE WINDOW oWnd ;
ON RESIZE oSplit:Adjust() ;
VALID lExit := .T.
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&One"
MENUITEM "&Two"
MENUITEM "&Three"
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function BuildDlg()
local oDlg, oOutL2003
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE OUTLOOK2003 oOutL2003 ID 110 OF oDlg ;
PROMPTS "One", "Two", "Three" ;
BITMAPS "..\bitmaps\mail.bmp", "..\bitmaps\calendar.bmp", "..\bitmaps\notes.bmp" ;
DIALOGS "Page1", "Page2", "Page3"
REDEFINE BUTTON ID 110 OF oOutL2003:aDialogs[ 1 ] ACTION MsgInfo( "Click" )
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function WinRun()
while NoGPF()
if lExit
PostQuitMessage( 0 )
endif
end
return nil
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
BOOL SysRefresh( void );
HB_FUNC( NOGPF )
{
__try
{
hb_retl( SysRefresh() );
}
__except ( ( hb_retl( TRUE ), TRUE ) )
{}
}
#pragma ENDDUMP
//---------------------------------------------------------------
FUNCTION Show (oOutLook, oWnd) // <-----
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
LOCAL oDlg, oCtrl, i
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
DO CASE
CASE nPage = 1
CASE nPage = 2
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
DEFINE DIALOG aCtrl[nPage] FROM 1,1 TO 15,35 OF oWnd ;
TITLE "I am at the right side"
ACTIVATE DIALOG aCtrl[nPage] ;
ON INIT aCtrl[nPage]:Center (oWnd);
NOWAIT
ENDIF
CASE nPage = 3
ENDCASE
RETURN (nil)STEPHAN,
I wanted a dialog as my picture and not another dialog ( it is not mdi)
perhaps you not understand me
Stephan,
I wanted make an header with gradient from splitter to end of ownd
and then down a type of panel ( dialog) where I can insert a browse
I not wanted a "flying dialog"
I hope you understand me !!

#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"
static lExit := .F.
STATIC aCtrl // <-----
//----------------------------------------------------------------------------//
function Main()
local oWnd, oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
local oFont
lOCAL nSplit:=191
DEFINE WINDOW oWnd TITLE "FWH new Class TOutLook2003" MDI // ;
// MENU BuildMenu()
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Mail", "Calendar", "Contacts", "" ;
BITMAPS ".\bitmaps\mail.bmp", ".\bitmaps\calendar.bmp", ".\bitmaps\notes.bmp";
ON CHANGE (Show (oOutLook2003, oWnd:oWndClient,nSplit)) // <-----
aCtrl := Array (Len (oOutLook2003:aGroups)) // <-----
oWnd:oLeft = nil // Because the splitter is going to control the resize
@ 1, 2 BUTTON "New" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION BuildDlg()
@ 3, 2 BUTTON "Edit" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 5, 2 BUTTON "Search" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Search" )
@ 1, 1 COMBOBOX cCombo ITEMS { "January", "February", "March", "April", "May" } ;
OF oOutLook2003:aDialogs[ 2 ] SIZE 170, 100
DEFINE FONT oFont NAME "Arial" SIZE 0, -10
@ 12, 10 SAY Date() OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 20 FONT oFont
@ 3, 1 RADIO oRad VAR nValue OF oOutLook2003:aDialogs[ 2 ] ;
ITEMS "&Day", "&Week", "&Month" SIZE 100, 20
oRad:SetFont( oFont )
#ifndef __CLIPPER__
DEFINE STATUSBAR oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#else
DEFINE MESSAGE oStatusBar PROMPT " FWH Class TOutLook2003" OF oWnd
#endif
SetParent( oOutLook2003:hWnd, oWnd:hWnd )
oWnd:oClient = nil
@ 0, 191 SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWnd:oWndClient ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd
SetParent( oSplit:hWnd, oWnd:hWnd )
ACTIVATE WINDOW oWnd ;
ON RESIZE oSplit:Adjust() ;
VALID lExit := .T.
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu
MENUITEM "&One"
MENUITEM "&Two"
MENUITEM "&Three"
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function BuildDlg()
local oDlg, oOutL2003
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE OUTLOOK2003 oOutL2003 ID 110 OF oDlg ;
PROMPTS "One", "Two", "Three" ;
BITMAPS ".\bitmaps\mail.bmp", ".\bitmaps\calendar.bmp", ".\bitmaps\notes.bmp" ;
DIALOGS "Page1", "Page2", "Page3"
REDEFINE BUTTON ID 110 OF oOutL2003:aDialogs[ 1 ] ACTION MsgInfo( "Click" )
ACTIVATE DIALOG oDlg CENTERED
return nil
//----------------------------------------------------------------------------//
function WinRun()
while NoGPF()
if lExit
PostQuitMessage( 0 )
endif
end
return nil
//----------------------------------------------------------------------------//
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
BOOL SysRefresh( void );
HB_FUNC( NOGPF )
{
__try
{
hb_retl( SysRefresh() );
}
__except ( ( hb_retl( TRUE ), TRUE ) )
{}
}
#pragma ENDDUMP
#define LIGHTBLUE nRGB( 89, 135, 214 )
#define DARKBLUE nRGB( 3, 56, 147 )
#define LIGHTORANGE1 nRGB( 250, 227, 143 )
#define DARKORANGE1 nRGB( 238, 152, 25 )
#define LIGHTCYAN nRGB( 203, 225, 252 )
#define DARKCYAN nRGB( 125, 165, 224 )
#define LIGHTORANGE2 nRGB( 255, 255, 220 )
#define DARKORANGE2 nRGB( 247, 192, 91 )
//---------------------------------------------------------------
FUNCTION Show (oOutLook, oWnd,nSplit) // <-----
LOCAL nPage := AScan( oOutLook:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutLook:aGroups)
LOCAL oDlg, oCtrl, i
Local hDC :=oWnd:getdc()
Local oGrid,oFont
DEFINE FONT oFont NAME "Arial" SIZE 0, -20
FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT
DO CASE
CASE nPage = 1
CASE nPage = 2
IF Valtype (aCtrl[nPage]) ="O"
aCtrl[nPage]:Show()
ELSE
//header
nTop = oWnd:nHeight - ( Len(oOutLook:aGroups ) *166 )
Gradient( hDC, { nTop, 0, nTop + 30, oWnd:nWidth() }, DARKBLUE, LIGHTBLUE, .T. )
oWnd:Say( nTop + 8 , 200,"Customer",CLR_WHITE,,oFont, .T., .T. )
/* DEFINE DIALOG aCtrl[nPage] FROM 1,1 TO 15,35 OF oWnd ;
TITLE "I am at the right side"
ACTIVATE DIALOG aCtrl[nPage] ;
ON INIT aCtrl[nPage]:Center (oWnd);
NOWAIT
*/
// GRID
USE CUSTOMER NEW
INDEX ON field->first to "name"
SET INDEX TO "name"
oGrid := TXBrowse():New( oWnd )
oGrid:nTop := nTop +32
oGrid:nLeft := nSplit+1
oGrid:nBottom := oWnd:nheight()
oGrid:nRight := oWnd:nWidth()
oGrid:cAlias := "CUSTOMER"
oGrid:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oGrid:nColDividerStyle := LINESTYLE_BLACK
oGrid:nRowDividerStyle := LINESTYLE_BLACK
oGrid:lColDividerComplete := .f.
oGrid:SetRDD()
for nFor := 1 to len( oGrid:aCols )
oCol := oGrid:aCols[ nFor ]
oCol:nEditType := 1
oCol:bOnPostEdit := {|o, v, n| iif( n != VK_ESCAPE, FieldPut( o:nCreationOrder, v ), ) }
next
oGrid:CreateFromCode()
oWnd := oGrid
ENDIF
CASE nPage = 3
ENDCASE
RETURN (nil)Silvio,
the "flying dialog" was just a sample, how to control the right side.
You can try to use the TPages class to put your controls on. On every change of the outlook menu open the according page.
DEFINE OUTLOOK2003 .... ON CHANGE oPage:SetOption(...)
Hi Silvio
I am also need of exactly what have needed. Could you do it.
If so, can you please guide me as to how to accomplish it.
Thanks it
Ramesh,
i not founded a solution for my problems.
I saw there is a problem when i changed option .. on right part of with the procedure must to show different dialog , when i show buttons the procedure not erase the first dialog.
i not want mobile dialog but static dialog into right part of window
Silvio,
Use:
DEFINE DIALOG oDlg STYLE ...
to set the style of dialog that you want (fixed, mobile, border, no border, caption, no caption, etc.)
Please review FWH\samples\TestDlg7.prg and TestDlg8.prg to learn how to use the STYLE clause with dialogs.