#include "FiveWin.ch"
#include "Splitter.ch"
static oWnd
static oLbx, oGet
static oSplit
function Main()
local cTitle := "Testing the Splitter controls"
local cText
DEFINE WINDOW oWnd FROM 1, 1 TO 400, 600 PIXEL ;
TITLE cTitle ;
BORDER NONE MDI
SELECT 1
USE EJEMPLO1.DBF
@ 20,20 LISTBOX oLbx FIELDS SIZE 200,300 PIXEL OF oWnd ;
ON CHANGE cText := Ejemplo1->Sintax
SetParent( oLbx:hWnd, oWnd:hWnd )
@ 20,225 GET oGet VAR cText TEXT SIZE 300,300 PIXEL OF oWnd
oLbx:bChange:={|| oGet:Refresh() }
SetParent( oGet:hWnd, oWnd:hWnd )
@ 20, 220 SPLITTER oSplit ;
VERTICAL ;
PREVIOUS CONTROLS oLbx ;
HINDS CONTROLS oGet ;
LEFT MARGIN 100 ;
RIGHT MARGIN 140 ;
SIZE 4, 300 PIXEL ;
OF oWnd ;
_3DLOOK ;
UPDATE
SetParent( oSplit:hWnd, oWnd:hWnd )
ACTIVATE WINDOW oWnd
return nil
// FWH Class TOutLook2003
#include "FiveWin.ch"
#include "Splitter.ch"
//----------------------------------------------------------------------------//
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"
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 PostQuitMessage( 0 )
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()
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
Application
===========
Path and name: D:\FWH\samples\testspl7.exe (32 bits)
Size: 1,295,360 bytes
Time from start: 0 hours 0 mins 36 secs
Error occurred at: 11/20/07, 09:36:36
Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = U
Stack Calls
===========
Called from: MDIFRAME.PRG => TMDIFRAME:END(0)
Called from: MDIFRAME.PRG => (b)TMDIFRAME:NEW(0)
Called from: MENU.PRG => TMENU:COMMAND(0)
Called from: WINDOW.PRG => TWINDOW:COMMAND(0)
Called from: MDIFRAME.PRG => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: testspl7.prg => NOGPF(0)
Called from: testspl7.prg => WINRUN(102)
Called from: WINDOW.PRG => TMDIFRAME:ACTIVATE(0)
Called from: testspl7.prg => MAIN(61)
Antonio Linares wrote:Silvio,
What error ?
Probably the error get fixed with this code:
VALID ( PostQuitMessage( 0 ), .T. )
// FWH Class TOutLook2003
#include "FiveWin.ch"
#include "Splitter.ch"
static lExit := .F.
//----------------------------------------------------------------------------//
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"
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
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 99 guests