dialog into outlook2003

dialog into outlook2003

Postby Silvio » Thu Jan 10, 2008 2:45 am

Dear Antonio,
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

Image

can you help me please ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Dialog in Outlook 2003

Postby ukoenig » Thu Jan 10, 2008 3:37 pm

Hallo, from Germany

I have the same problem.

regards

Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby StefanHaupt » Thu Jan 10, 2008 7:08 pm

Here you have a working sample. On page 2 a dialog is shown on the right side. See the lines with a marker (// <-----).

Code: Select all  Expand view
// 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)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby Silvio » Fri Jan 11, 2008 12:02 am

STEPHAN,
I wanted a dialog as my picture and not another dialog ( it is not mdi)

perhaps you not understand me
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Fri Jan 11, 2008 12:08 am

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 !!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Fri Jan 11, 2008 2:26 am

look this :
Image
Code: Select all  Expand view


#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)




if you click on calendar you can see at right part a header and a xbrowse

if you click another menu of outlook2003 the controls on the right not hide and the there is an error alias dont exit

and the header hide when the resizethe window
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby StefanHaupt » Fri Jan 11, 2008 9:09 am

Silvio,

the "flying dialog" was just a sample, how to control the right side. :wink:


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(...)
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Postby RAMESHBABU » Sun Oct 05, 2008 6:24 am

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 Babu P
User avatar
RAMESHBABU
 
Posts: 615
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Postby Silvio » Sun Oct 05, 2008 10:25 am

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
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Sun Oct 05, 2008 4:22 pm

Silvio,

Use:

DEFINE DIALOG oDlg STYLE ...

to set the style of dialog that you want (fixed, mobile, border, no border, caption, no caption, etc.)
regards, saludos

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

Postby Antonio Linares » Sun Oct 05, 2008 4:23 pm

Please review FWH\samples\TestDlg7.prg and TestDlg8.prg to learn how to use the STYLE clause with dialogs.
regards, saludos

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