Office2007-Buttonbar in Outlook2003-Dialog ( Question )

Office2007-Buttonbar in Outlook2003-Dialog ( Question )

Postby ukoenig » Sat Jan 19, 2008 7:27 pm

Hello, from Germany

I'm still busy with the new samples of Outlook2003 for the forum.

I have a small problem :

Image

[I want a Office2007-Bar ( Bottom ) on the righthandside of the
Outlook-Child.

Used :

oWnd
oOutl2003 of oDlg
aCtrl includes the Pages of oOutl2003
and a hidden Splitter

The code is not complete ( just to show the used objects )

------------------------------

#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"

function Main()
local oWnd, oFont, oBar1, oBar2

// Array for Dialog-Size
aCors := {}

DEFINE WINDOW oWnd TITLE "Outlook-Test" MDI

DEFINE BUTTON OF oBar2 ACTION ( BuildDlg(oWnd) ) ;
RESOURCE "magic" PROMPT "Outlook2003" + CRLF + "Basics"

ACTIVATE WINDOW oWnd MAXIMIZED

RETURN ( NIL )

//----------------------------------------------------------------------------//

function BuildDlg(oWnd)
local oDlg, oOutL2003, oSplit1

DEFINE DIALOG oDlg RESOURCE "BASICS" OF oWnd TITLE "Outlook2003 -Basics"

REDEFINE OUTLOOK2003 oOutL2003 ID 110 OF oDlg ;
PROMPTS "Eins", "Rechts Folder", "Rechts Gets","Rechts Browser","Ende" ;
BITMAPS "mail.bmp", "calendar.bmp", "calendar.bmp","calendar.bmp","ende1.bmp" ;
DIALOGS "Page1", "Page2", "Page3", "Page4", "Page5" ;
ON CHANGE ( TESTDLG(oWnd,oDlg,oOutL2003) )

REDEFINE SPLITTER oSplit1 ID 300 ;
VERTICAL ;
PREVIOUS CONTROLS oOutL2003 ;
HINDS CONTROLS oWnd:oWndClient ;
TOP MARGIN 20 ;
BOTTOM MARGIN 60 ;
OF oDlg ;
ON CHANGE MsgBeep() ;
_3DLOOK

oSplit1:Disable()
aCtrl := Array (Len (oOutL2003:aGroups))

SetParent( oOutL2003:hWnd, oWnd:hWnd )
aCORS := GetCoors( oDlg:hWnd )

ACTIVATE DIALOG oDlg CENTERED NOWAIT ;
ON INIT oDlg:Move( 150, 50, oDlg:nWidth, oDlg:nHeight, .f. )

RETURN NIL

//---------------------------------------------------------------

FUNCTION TESTDLG(oWnd,oDlg,oOutL2003)

LOCAL nPage := AScan( oOutL2003:aGroups, { | o | o:lSelected } )
LOCAL nAllPages := Len (oOutL2003:aGroups)
LOCAL oCtrl, i , oBtn1, oBtn2, oSplit1
LOCAL hDC :=oDlg:getdc()
LOCAL oLbx,oFont, aTEIL1, aTEIL2
Local oDlg1, oBar3
local aSIZEDLG := {}

That works !!!
----------------
I get a Buttonbar on the right side of the Outlook2003 -Maindialog
it dosn't change, wenn i change the child-window with a button
----------------------------------------------------------------------------
DEFINE BUTTONBAR oBar3 SIZE 60, 90 _3D 2007 OF oDlg RIGHT

FOR i := 1 TO nAllPages
IIF (Valtype (aCtrl[i]) ="O",aCtrl[i]:Hide(), )
NEXT

DO CASE
CASE nPage = 3 // Child-Window right
IF Valtype (aCtrl[nPage]) ="O" ;
aCtrl[nPage]:Show()
ELSE
PROG_1(oWnd,oDlg,aCtrl,nPage,oOutL2003)
ENDIF
CASE nPage = 5
oDlg:End()
ENDCASE

RETURN ( NIL )

// --------------------------------------------

FUNCTION PROG_1(oWnd,oDlg,aCtrl,nPage,oOutL2003)
local oBar3

DEFINE DIALOG aCtrl[nPage] RESOURCE "PAGE6" OF oDlg PIXEL

That is what i want to do, a Buttonbar in a Child-Window of oDlg!
---------------------------------------------------------------------------
---------------------------------------------------------------------------

* DEFINE BUTTONBAR oBar3 SIZE 150, 60 _3D 2007 ;
OF aCtrl[nPage] BOTTOM
// doesn't work !!!!!


* DEFINE BUTTON OF oBar3 ACTION ;
(MsgAlert ( "Button1", "ACHTUNG" ) ) ;
* RESOURCE "mappe" PROMPT "Test 1"

* DEFINE BUTTON OF oBar3 ACTION ;
( MsgAlert( "Button 2", "ACHTUNG" ) ) ;
* RESOURCE "mappe" PROMPT "Test 2"

---------------------------------
---------------------------------

That works fine !!!!!!!!!
--------------------------

REDEFINE GET aTEIL1 VAR aDAT1 ID 120 OF aCtrl[nPage] ;
PICTURE "!XXXXXXXXXX" UPDATE
REDEFINE GET aTEIL2 VAR aDAT2 ID 130 OF aCtrl[nPage] ;
PICTURE "!XXXXXXXXXX" UPDATE

REDEFINE BUTTON oBtn1 ID 1 OF aCtrl[nPage] ;
ACTION ( DBSKIP(+1), aDAT1 := (1)->FIRST, aDAT2 := (1)->LAST, ;
aCtrl[nPage]:Update() )

REDEFINE BUTTON oBtn2 ID 2 OF aCtrl[nPage] ;
ACTION ( DBSKIP(-1), aDAT1 := (1)->FIRST, aDAT2 := (1)->LAST, ;
aCtrl[nPage]:Update() )

It connects to the left corner of the dialog
------------------------------------------------
ACTIVATE DIALOG aCtrl[nPage] NOWAIT ;
ON INIT ( aCtrl[nPage]:Move( aCORS [1] + 10, aCORS [2] + 230, ;
aCtrl[nPage]:nWidth, aCtrl[nPage]:nHeight, .f. ) )

RETURN( NIL )




With Gets und Buttons ererything is ok.

Redefine Get aTeil1 var aDat1 ID 120 Of aCtrl[npage]
Redefine Get aTeil1 var aDat1 ID 120 Of aCtrl[npage]

Redefine Button oBtn1 ID 1 Of aCtrl[npage]
Action .......

Redefine Button oBtn2 ID 2 Of aCtrl[npage]
Action .......

It works fine ( the Dialog is on the righthand side with buttons
und gets ) but with :

Define Buttonbar oBar3 Size 150,60 -3D2007 Of aCtrl[npage] BOTTOM

it doesn't work

The object is the same for both Button and Buttonbar
but with buttonbar it's not working

Anybody knows why ?

Thank you

U.König


[/img]
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

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests