Files
harbour-core/harbour/contrib/hbwin/tests/testax.prg
Viktor Szakats 9efec46787 2010-04-02 09:40 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
+ config/ren_sfn.prg
  - external/bzip2/cnv_hb2o.bat
  - external/bzip2/cnv_o2hb.bat
  + external/bzip2/ren_sfn.txt
  - external/libhpdf/cnv_o2hb.bat
  - external/libhpdf/cnv_hb2o.bat
  + external/libhpdf/ren_sfn.txt
  - external/pcre/cnv_o2hb.bat
  - external/pcre/cnv_hb2o.bat
  + external/pcre/ren_sfn.txt
    + Replaced .bat method for converting long filenames to
      short ones to a .prg script and simple text input file.
      Also much of the logic is automatized.

  * src/rtl/gtwvt/gtwvt.c
    * Minor in old comment.

  * INSTALL
    - Deleted no more relevant restriction with HB_BUILD_PKG.

  * contrib/hbwin/wapi_winuser.c
  * contrib/hbwin/hbwin.ch
    + Added WAPI_SETWINDOWPOS() + relevant constants.
    + Added WIN_WS_* constants.
    + Added WAPI_ISICONIC(), WAPI_ISZOOMED().

  * contrib/hbwin/tests/testax.prg
    ! Fixed to compile without warning.
    * Using hbwin.ch.
2010-04-02 07:41:59 +00:00

56 lines
1.4 KiB
Plaintext

/*
* $Id$
*/
#include "hbgtinfo.ch"
#include "hbclass.ch"
#include "hbwin.ch"
REQUEST HB_GT_WVT_DEFAULT
PROCEDURE Main()
LOCAL oMSCAL
WAIT "Make sure we are 'Active Window'"
oMSCAL := HActiveX():Init( WAPI_GetActiveWindow(), "MSCAL.Calendar", 0, 0, 300, 300 )
WAIT "Press any key to exit"
HB_SYMBOL_UNUSED( oMSCAL )
RETURN
CREATE CLASS HActiveX
VAR oOLE
VAR hWnd
METHOD Init
METHOD Event
ERROR HANDLER OnError
DESTRUCTOR Close
ENDCLASS
METHOD Init( hWnd, cProgId, nTop, nLeft, nWidth, nHeight, cID ) CLASS HActiveX
LOCAL nStyle := WIN_WS_CHILD + WIN_WS_VISIBLE + WIN_WS_CLIPCHILDREN
win_AxInit()
::hWnd := WAPI_CreateWindowEX( 0, "AtlAxWin", cProgId, nStyle, nLeft, nTop, nWidth, nHeight, hWnd, 0 )
/* WAPI_SetWindowPos( ::hWnd, WIN_HWND_TOPMOST, 0, 0, 1, 1, hb_bitOr( WIN_SWP_NOSIZE, WIN_SWP_DRAWFRAME ) ) */
::oOLE := WIN_AxGetControl( ::hWnd, { | event, ... | ::Event( event, ... ) }, cID )
RETURN self
PROCEDURE Event( ... ) CLASS HActiveX
LOCAL cEvents := ""
LOCAL aEvents := { ... }
aEval( aEvents, { | xEvent | cEvents += HB_ValToStr( xEvent ) + ", " } )
wapi_OutputDebugString( cEvents )
RETURN
METHOD OnError() CLASS HActiveX
RETURN HB_ExecFromArray( ::oOLE, __GetMessage(), HB_AParams() )
METHOD Close() CLASS HActiveX
wapi_OutputDebugString( "Close" )
WAPI_DestroyWindow( ::hWnd )
::hWnd := NIL
::oOLE := NIL
wapi_OutputDebugString( "After Close" )
RETURN NIL