2012-11-05 02:22 UTC+0100 Viktor Szakats (harbour syenar.net)
* extras/gfspell/*.c
* extras/gtwvw/*.[c|h]
* extras/hbusb/*.c
* uncrustified automatically (rerun with new settings)
! fixed some code/comments causing problems
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2012-11-05 02:22 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
* extras/gfspell/*.c
|
||||
* extras/gtwvw/*.[c|h]
|
||||
* extras/hbusb/*.c
|
||||
* uncrustified automatically (rerun with new settings)
|
||||
! fixed some code/comments causing problems
|
||||
|
||||
2012-11-05 01:03 UTC+0100 Viktor Szakats (harbour syenar.net)
|
||||
+ contrib/hbtip/tests/gmail.hbp
|
||||
+ added hbmk2 project for gmail.prg (picked up automatically
|
||||
|
||||
@@ -178,10 +178,10 @@ HB_FUNC( SP_RATE )
|
||||
const uchar * cFound;
|
||||
int nFound;
|
||||
const uchar * cWord;
|
||||
int nWord;
|
||||
int nMinLen;
|
||||
int x;
|
||||
int lim;
|
||||
int nWord;
|
||||
int nMinLen;
|
||||
int x;
|
||||
int lim;
|
||||
uchar * cRating = "nZZ";
|
||||
|
||||
cFound = _parc( 1 );
|
||||
@@ -242,7 +242,7 @@ HB_FUNC( SP_RATE )
|
||||
|
||||
HB_FUNC( C_METAFONE )
|
||||
{
|
||||
char * sReturn; /* Pointer to the return string. */
|
||||
char * sReturn; /* Pointer to the return string. */
|
||||
const char * sMeta; /* Pointer to the passed string. */
|
||||
unsigned int iRetLen; /* Length of the return string. */
|
||||
unsigned int iStrLen; /* Length of the passed string. */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -133,18 +133,18 @@ typedef __int64 LONG_PTR;
|
||||
#if ( ( defined( _MSC_VER ) && ( _MSC_VER <= 1200 || defined( HB_OS_WIN_CE ) ) ) || \
|
||||
defined( __DMC__ ) ) && ! defined( HB_ARCH_64BIT )
|
||||
# ifndef GetWindowLongPtr
|
||||
# define GetWindowLongPtr GetWindowLong
|
||||
# define GetWindowLongPtr GetWindowLong
|
||||
# endif
|
||||
# ifndef SetWindowLongPtr
|
||||
# define SetWindowLongPtr SetWindowLong
|
||||
# define SetWindowLongPtr SetWindowLong
|
||||
# endif
|
||||
# ifndef SetClassLongPtr
|
||||
# define SetClassLongPtr SetClassLong
|
||||
# define SetClassLongPtr SetClassLong
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ( defined( __MSC6__ ) || defined( __DMC__ ) )
|
||||
#define LONG_PTR LONG
|
||||
#define LONG_PTR LONG
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
@@ -152,131 +152,131 @@ typedef __int64 LONG_PTR;
|
||||
|
||||
/* xHarbour compatible definitions */
|
||||
#if ! defined( K_SH_LEFT )
|
||||
#define K_SH_LEFT K_LEFT /* Shift-Left == Left */
|
||||
#define K_SH_UP K_UP /* Shift-Up == Up */
|
||||
#define K_SH_RIGHT K_RIGHT /* Shift-Right == Right */
|
||||
#define K_SH_DOWN K_DOWN /* Shift-Down == Down */
|
||||
#define K_SH_INS K_INS /* Shift-Ins == Ins */
|
||||
#define K_SH_DEL K_DEL /* Shift-Del == Del */
|
||||
#define K_SH_HOME K_HOME /* Shift-Home == Home */
|
||||
#define K_SH_END K_END /* Shift-End == End */
|
||||
#define K_SH_PGUP K_PGUP /* Shift-PgUp == PgUp */
|
||||
#define K_SH_PGDN K_PGDN /* Shift-PgDn == PgDn */
|
||||
#define K_SH_RETURN K_RETURN /* Shift-Enter == Enter */
|
||||
#define K_SH_ENTER K_ENTER /* Shift-Enter == Enter */
|
||||
#define K_SH_LEFT K_LEFT /* Shift-Left == Left */
|
||||
#define K_SH_UP K_UP /* Shift-Up == Up */
|
||||
#define K_SH_RIGHT K_RIGHT /* Shift-Right == Right */
|
||||
#define K_SH_DOWN K_DOWN /* Shift-Down == Down */
|
||||
#define K_SH_INS K_INS /* Shift-Ins == Ins */
|
||||
#define K_SH_DEL K_DEL /* Shift-Del == Del */
|
||||
#define K_SH_HOME K_HOME /* Shift-Home == Home */
|
||||
#define K_SH_END K_END /* Shift-End == End */
|
||||
#define K_SH_PGUP K_PGUP /* Shift-PgUp == PgUp */
|
||||
#define K_SH_PGDN K_PGDN /* Shift-PgDn == PgDn */
|
||||
#define K_SH_RETURN K_RETURN /* Shift-Enter == Enter */
|
||||
#define K_SH_ENTER K_ENTER /* Shift-Enter == Enter */
|
||||
#endif
|
||||
|
||||
#define WVW_MAXWINDOWS 40
|
||||
#define WVW_MAXWINDOWS 40
|
||||
|
||||
#define WVW_MAXWINNAMELENGTH 256
|
||||
#define WVW_MAXWINNAMELENGTH 256
|
||||
|
||||
#define WVW_DEFAULT_MENUKEYEVENT 1024
|
||||
#define WVW_DEFAULT_MENUKEYEVENT 1024
|
||||
|
||||
#define WVW_MAX_STATUS_PARTS 40 /* max # of parts in Status Bar */
|
||||
#define WVW_SPACE_BETWEEN_PARTS 2 /* pixel space between Status Bar's parts */
|
||||
#define WVW_MAX_STATUS_PARTS 40 /* max # of parts in Status Bar */
|
||||
#define WVW_SPACE_BETWEEN_PARTS 2 /* pixel space between Status Bar's parts */
|
||||
|
||||
#define WVW_ID_SYSTEM_TIMER 1
|
||||
#define WVW_ID_SYSTEM_TIMER 1
|
||||
|
||||
#define WVW_ID_BASE_STATUSBAR 100
|
||||
#define WVW_ID_BASE_TIMER 100
|
||||
#define WVW_ID_BASE_STATUSBAR 100
|
||||
#define WVW_ID_BASE_TIMER 100
|
||||
|
||||
#define WVW_ID_BASE_TOOLTIP 100
|
||||
#define WVW_ID_BASE_TOOLTIP 100
|
||||
|
||||
#define WVW_ID_BASE_TOOLBAR 100
|
||||
#define WVW_ID_BASE_TOOLBAR 100
|
||||
|
||||
#define WVW_ID_BASE_SCROLLBAR 100
|
||||
#define WVW_ID_BASE_SCROLLBAR 100
|
||||
|
||||
#define WVW_ID_BASE_PROGRESSBAR 100
|
||||
#define WVW_ID_BASE_STATIC 200
|
||||
#define WVW_ID_BASE_PROGRESSBAR 100
|
||||
#define WVW_ID_BASE_STATIC 200
|
||||
|
||||
#define WVW_ID_BASE_PUSHBUTTON 64000
|
||||
#define WVW_ID_BASE_CHECKBOX 64000
|
||||
#define WVW_ID_BASE_PUSHBUTTON 64000
|
||||
#define WVW_ID_BASE_CHECKBOX 64000
|
||||
|
||||
#define WVW_ID_MAX_PUSHBUTTON WVW_ID_BASE_PUSHBUTTON + 200 - 1
|
||||
#define WVW_ID_MAX_CHECKBOX WVW_ID_BASE_CHECKBOX + 200 - 1
|
||||
#define WVW_ID_MAX_PUSHBUTTON WVW_ID_BASE_PUSHBUTTON + 200 - 1
|
||||
#define WVW_ID_MAX_CHECKBOX WVW_ID_BASE_CHECKBOX + 200 - 1
|
||||
/* ie. effectively there are max 200 buttons on a window */
|
||||
|
||||
#define WVW_ID_BASE_COMBOBOX WVW_ID_MAX_PUSHBUTTON + 1
|
||||
#define WVW_CB_KBD_STANDARD 0
|
||||
#define WVW_CB_KBD_CLIPPER 1
|
||||
#define WVW_ID_BASE_COMBOBOX WVW_ID_MAX_PUSHBUTTON + 1
|
||||
#define WVW_CB_KBD_STANDARD 0
|
||||
#define WVW_CB_KBD_CLIPPER 1
|
||||
|
||||
#define WVW_COMBOBOX_MAXLEN 255 /* maximum length of combobox string */
|
||||
#define WVW_COMBOBOX_MAXLEN 255 /* maximum length of combobox string */
|
||||
|
||||
#define WVW_ID_MAX_COMBOBOX WVW_ID_BASE_COMBOBOX + 200 - 1
|
||||
#define WVW_ID_MAX_COMBOBOX WVW_ID_BASE_COMBOBOX + 200 - 1
|
||||
|
||||
#define WVW_ID_BASE_EDITBOX WVW_ID_MAX_COMBOBOX + 1
|
||||
#define WVW_ID_MAX_EDITBOX WVW_ID_BASE_EDITBOX + 200 - 1
|
||||
#define WVW_ID_BASE_EDITBOX WVW_ID_MAX_COMBOBOX + 1
|
||||
#define WVW_ID_MAX_EDITBOX WVW_ID_BASE_EDITBOX + 200 - 1
|
||||
|
||||
#define WVW_EB_SINGLELINE 1
|
||||
#define WVW_EB_MULTILINE 2
|
||||
#define WVW_EB_SINGLELINE 1
|
||||
#define WVW_EB_MULTILINE 2
|
||||
|
||||
#define WVW_CHAR_QUEUE_SIZE 128
|
||||
#define WVW_MAX_TITLE_SIZE 128
|
||||
#define WVW_CHAR_BUFFER 1024
|
||||
#define WVW_MAX_ROWS 256
|
||||
#define WVW_MAX_COLS 256
|
||||
#define WVW_DEFAULT_ROWS 25
|
||||
#define WVW_DEFAULT_COLS 80
|
||||
#define WVW_CHAR_QUEUE_SIZE 128
|
||||
#define WVW_MAX_TITLE_SIZE 128
|
||||
#define WVW_CHAR_BUFFER 1024
|
||||
#define WVW_MAX_ROWS 256
|
||||
#define WVW_MAX_COLS 256
|
||||
#define WVW_DEFAULT_ROWS 25
|
||||
#define WVW_DEFAULT_COLS 80
|
||||
|
||||
#define WVW_PICTURES_MAX 20
|
||||
#define WVW_PICTURES_MAX 20
|
||||
|
||||
#define WVW_FONTS_MAX 20
|
||||
#define WVW_PENS_MAX 20
|
||||
#define WVW_DLGML_MAX 20
|
||||
#define WVW_DLGMD_MAX 20
|
||||
#define WVW_FONTS_MAX 20
|
||||
#define WVW_PENS_MAX 20
|
||||
#define WVW_DLGML_MAX 20
|
||||
#define WVW_DLGMD_MAX 20
|
||||
|
||||
/* default maximum number of user bitmap cache
|
||||
One bitmap cache currently takes 280 bytes (see BITMAP_HANDLE).
|
||||
See also wvw_setMaxBMCache().
|
||||
*/
|
||||
#define WVW_DEFAULT_MAX_BMCACHE 20
|
||||
#define WVW_DEFAULT_MAX_BMCACHE 20
|
||||
|
||||
/* Como as descricoes sao grandes, precisei aumetar isso - Peluffo - 26/10/2007
|
||||
#define WVW_TB_LABELMAXLENGTH 40
|
||||
*/
|
||||
#define WVW_TB_LABELMAXLENGTH 100
|
||||
#define WVW_TB_LABELMAXLENGTH 100
|
||||
|
||||
//#define WVW_WHICH_WINDOW ( HB_ISNIL( 1 ) ? ( s_bMainCoordMode ? s_usNumWindows-1 : s_usCurWindow ) : ((UINT) hb_parni( 1 )) )
|
||||
#define WVW_WHICH_WINDOW ( HB_ISNIL( 1 ) ? ( hb_gt_wvw_GetMainCoordMode() ? ( ( hb_gt_wvw_GetNumWindows() ) - 1 ) : hb_gt_wvw_GetCurWindow() ) : ( ( UINT ) hb_parni( 1 ) ) )
|
||||
#define WVW_WHICH_WINDOW ( HB_ISNIL( 1 ) ? ( hb_gt_wvw_GetMainCoordMode() ? ( ( hb_gt_wvw_GetNumWindows() ) - 1 ) : hb_gt_wvw_GetCurWindow() ) : ( ( UINT ) hb_parni( 1 ) ) )
|
||||
|
||||
#define BLACK RGB( 0x0, 0x0, 0x0 )
|
||||
#define BLUE RGB( 0x0, 0x0, 0x85 )
|
||||
#define GREEN RGB( 0x0, 0x85, 0x0 )
|
||||
#define CYAN RGB( 0x0, 0x85, 0x85 )
|
||||
#define RED RGB( 0x85, 0x0, 0x0 )
|
||||
#define MAGENTA RGB( 0x85, 0x0, 0x85 )
|
||||
#define BROWN RGB( 0x85, 0x85, 0x0 )
|
||||
#define WHITE RGB( 0xC6, 0xC6, 0xC6 )
|
||||
#define LIGHT_GRAY RGB( 0x60, 0x60, 0x60 )
|
||||
#define BRIGHT_BLUE RGB( 0x00, 0x00, 0xFF )
|
||||
#define BRIGHT_GREEN RGB( 0x60, 0xFF, 0x60 )
|
||||
#define BRIGHT_CYAN RGB( 0x60, 0xFF, 0xFF )
|
||||
#define BRIGHT_RED RGB( 0xF8, 0x00, 0x26 )
|
||||
#define BRIGHT_MAGENTA RGB( 0xFF, 0x60, 0xFF )
|
||||
#define YELLOW RGB( 0xFF, 0xFF, 0x00 )
|
||||
#define BRIGHT_WHITE RGB( 0xFF, 0xFF, 0xFF )
|
||||
#define BLACK RGB( 0x0, 0x0, 0x0 )
|
||||
#define BLUE RGB( 0x0, 0x0, 0x85 )
|
||||
#define GREEN RGB( 0x0, 0x85, 0x0 )
|
||||
#define CYAN RGB( 0x0, 0x85, 0x85 )
|
||||
#define RED RGB( 0x85, 0x0, 0x0 )
|
||||
#define MAGENTA RGB( 0x85, 0x0, 0x85 )
|
||||
#define BROWN RGB( 0x85, 0x85, 0x0 )
|
||||
#define WHITE RGB( 0xC6, 0xC6, 0xC6 )
|
||||
#define LIGHT_GRAY RGB( 0x60, 0x60, 0x60 )
|
||||
#define BRIGHT_BLUE RGB( 0x00, 0x00, 0xFF )
|
||||
#define BRIGHT_GREEN RGB( 0x60, 0xFF, 0x60 )
|
||||
#define BRIGHT_CYAN RGB( 0x60, 0xFF, 0xFF )
|
||||
#define BRIGHT_RED RGB( 0xF8, 0x00, 0x26 )
|
||||
#define BRIGHT_MAGENTA RGB( 0xFF, 0x60, 0xFF )
|
||||
#define YELLOW RGB( 0xFF, 0xFF, 0x00 )
|
||||
#define BRIGHT_WHITE RGB( 0xFF, 0xFF, 0xFF )
|
||||
|
||||
#if defined( __DMC__ )
|
||||
|
||||
#define SBT_TOOLTIPS 0x0800
|
||||
#define SB_SETICON ( WM_USER + 15 )
|
||||
#define SB_SETTIPTEXT ( WM_USER + 17 )
|
||||
#define SB_GETTIPTEXT ( WM_USER + 18 )
|
||||
#define TBSTYLE_FLAT 0x0800
|
||||
#define TBSTYLE_LIST 0x1000
|
||||
#define BTNS_WHOLEDROPDOWN 0x0080
|
||||
#define TBSTYLE_CUSTOMERASE 0x2000
|
||||
#define IDB_HIST_SMALL_COLOR 8
|
||||
#define IDB_HIST_LARGE_COLOR 9
|
||||
#define TB_SETMAXTEXTROWS ( WM_USER + 60 )
|
||||
#define PBS_VERTICAL 0x04
|
||||
#define PBS_SMOOTH 0x01
|
||||
#define CCM_FIRST 0x2000
|
||||
#define CCM_SETBKCOLOR ( CCM_FIRST + 1 )
|
||||
#define PBM_SETBKCOLOR CCM_SETBKCOLOR
|
||||
#define PBM_SETBARCOLOR ( WM_USER + 9 )
|
||||
#define PBM_GETRANGE ( WM_USER + 7 )
|
||||
#define PBM_GETPOS ( WM_USER + 8 )
|
||||
#define SBT_TOOLTIPS 0x0800
|
||||
#define SB_SETICON ( WM_USER + 15 )
|
||||
#define SB_SETTIPTEXT ( WM_USER + 17 )
|
||||
#define SB_GETTIPTEXT ( WM_USER + 18 )
|
||||
#define TBSTYLE_FLAT 0x0800
|
||||
#define TBSTYLE_LIST 0x1000
|
||||
#define BTNS_WHOLEDROPDOWN 0x0080
|
||||
#define TBSTYLE_CUSTOMERASE 0x2000
|
||||
#define IDB_HIST_SMALL_COLOR 8
|
||||
#define IDB_HIST_LARGE_COLOR 9
|
||||
#define TB_SETMAXTEXTROWS ( WM_USER + 60 )
|
||||
#define PBS_VERTICAL 0x04
|
||||
#define PBS_SMOOTH 0x01
|
||||
#define CCM_FIRST 0x2000
|
||||
#define CCM_SETBKCOLOR ( CCM_FIRST + 1 )
|
||||
#define PBM_SETBKCOLOR CCM_SETBKCOLOR
|
||||
#define PBM_SETBARCOLOR ( WM_USER + 9 )
|
||||
#define PBM_GETRANGE ( WM_USER + 7 )
|
||||
#define PBM_GETPOS ( WM_USER + 8 )
|
||||
|
||||
typedef DWORD UINT_PTR;
|
||||
|
||||
@@ -286,14 +286,14 @@ typedef struct
|
||||
int iHigh;
|
||||
} PBRANGE, * PPBRANGE;
|
||||
|
||||
#define ICC_BAR_CLASSES 0x00000004
|
||||
#define ICC_BAR_CLASSES 0x00000004
|
||||
|
||||
typedef USHORT COLOR16;
|
||||
|
||||
typedef struct _TRIVERTEX
|
||||
{
|
||||
LONG x;
|
||||
LONG y;
|
||||
LONG x;
|
||||
LONG y;
|
||||
COLOR16 Red;
|
||||
COLOR16 Green;
|
||||
COLOR16 Blue;
|
||||
@@ -315,7 +315,7 @@ typedef struct _GRADIENT_RECT
|
||||
} GRADIENT_RECT, * PGRADIENT_RECT, * LPGRADIENT_RECT;
|
||||
#endif
|
||||
|
||||
#define WM_MY_UPDATE_CARET ( WM_USER + 0x0101 )
|
||||
#define WM_MY_UPDATE_CARET ( WM_USER + 0x0101 )
|
||||
|
||||
typedef BOOL ( WINAPI * wvwGradientFill )(
|
||||
HDC hdc,
|
||||
@@ -326,22 +326,22 @@ typedef BOOL ( WINAPI * wvwGradientFill )(
|
||||
ULONG dwMode );
|
||||
|
||||
#ifndef _MAX_PATH
|
||||
#define _MAX_PATH 256
|
||||
#define _MAX_PATH 256
|
||||
#endif
|
||||
|
||||
typedef struct bitmap_handle
|
||||
{
|
||||
char szFilename[ _MAX_PATH + 1 ];
|
||||
char szFilename[ _MAX_PATH + 1 ];
|
||||
HBITMAP hBitmap;
|
||||
int iWidth, iHeight;
|
||||
int iWidth, iHeight;
|
||||
struct bitmap_handle * pNext;
|
||||
} BITMAP_HANDLE;
|
||||
|
||||
typedef struct picture_handle
|
||||
{
|
||||
char szFilename[ _MAX_PATH + 1 ];
|
||||
char szFilename[ _MAX_PATH + 1 ];
|
||||
IPicture * iPicture;
|
||||
int iWidth, iHeight;
|
||||
int iWidth, iHeight;
|
||||
struct picture_handle * pNext;
|
||||
} PICTURE_HANDLE;
|
||||
|
||||
@@ -358,13 +358,13 @@ typedef struct picture_handle
|
||||
|
||||
typedef struct control_data
|
||||
{
|
||||
BYTE byCtrlClass;
|
||||
HWND hWndCtrl;
|
||||
UINT uiCtrlid;
|
||||
BYTE byCtrlClass;
|
||||
HWND hWndCtrl;
|
||||
UINT uiCtrlid;
|
||||
PHB_ITEM phiCodeBlock;
|
||||
BOOL bBusy;
|
||||
UINT uiBusy;
|
||||
RECT rCtrl, rOffCtrl;
|
||||
BOOL bBusy;
|
||||
UINT uiBusy;
|
||||
RECT rCtrl, rOffCtrl;
|
||||
|
||||
/* SCROLLBAR specifics: */
|
||||
/* also used by combobox to store kbd type */
|
||||
@@ -385,15 +385,15 @@ typedef struct app_data
|
||||
BOOL Win9X; /* Flag to say if running on Win9X not NT/2000/XP */
|
||||
BOOL AltF4Close; /* Can use Alt+F4 to close application */
|
||||
|
||||
HPEN penWhite; /* White pen to draw GDI elements */
|
||||
HPEN penBlack; /* Black pen to draw GDI elements */
|
||||
HPEN penWhiteDim; /* White dim pen to draw GDI elements */
|
||||
HPEN penDarkGray; /* Dark gray pen to draw GDI elements */
|
||||
HPEN penGray; /* Gray pen equivalent to Clipper White */
|
||||
HPEN penNull; /* Null pen */
|
||||
HPEN OriginalPen; /* Handle da Pen original do Device Context */
|
||||
HPEN currentPen; /* Handle to current pen settable at runtime */
|
||||
HPEN gridPen; /* Handle da Pen para Grid */
|
||||
HPEN penWhite; /* White pen to draw GDI elements */
|
||||
HPEN penBlack; /* Black pen to draw GDI elements */
|
||||
HPEN penWhiteDim; /* White dim pen to draw GDI elements */
|
||||
HPEN penDarkGray; /* Dark gray pen to draw GDI elements */
|
||||
HPEN penGray; /* Gray pen equivalent to Clipper White */
|
||||
HPEN penNull; /* Null pen */
|
||||
HPEN OriginalPen; /* Handle da Pen original do Device Context */
|
||||
HPEN currentPen; /* Handle to current pen settable at runtime */
|
||||
HPEN gridPen; /* Handle da Pen para Grid */
|
||||
HBRUSH currentBrush; /* Handle to current brush settable by runtime */
|
||||
HBRUSH diagonalBrush; /* Handle to diaoganl brush to draw scrollbars */
|
||||
HBRUSH solidBrush; /* Handle to solid brush */
|
||||
@@ -401,10 +401,10 @@ typedef struct app_data
|
||||
HBRUSH OriginalBrush; /* Handle da Brush original do Device Context */
|
||||
|
||||
IPicture * iPicture[ WVW_PICTURES_MAX ]; /* Array to hold the Picture Streams to avoid recurring loading and unloading */
|
||||
HFONT hUserFonts[ WVW_FONTS_MAX ]; /* User defined font handles */
|
||||
HPEN hUserPens[ WVW_PENS_MAX ]; /* User defined pens */
|
||||
HFONT hUserFonts[ WVW_FONTS_MAX ]; /* User defined font handles */
|
||||
HPEN hUserPens[ WVW_PENS_MAX ]; /* User defined pens */
|
||||
|
||||
HINSTANCE hMSImg32; /* Handle to the loaded library msimg32.dll */
|
||||
HINSTANCE hMSImg32; /* Handle to the loaded library msimg32.dll */
|
||||
wvwGradientFill pfnGF; /* Pointer to Address of the GradientFill function in MSImg32.dll */
|
||||
|
||||
HWND hDlgModeless[ WVW_DLGML_MAX ]; /* Handle to a modeless dialog */
|
||||
@@ -412,15 +412,15 @@ typedef struct app_data
|
||||
PHB_ITEM pFunc[ WVW_DLGML_MAX ]; /* Function pointer for WndProc */
|
||||
/* TODO: pcbFunc is redundant and should be removed */
|
||||
PHB_ITEM pcbFunc[ WVW_DLGML_MAX ]; /* codeblock for WndProc */
|
||||
int iType[ WVW_DLGML_MAX ]; /* Type of Function Pointers - Function 1, Block 2, Method 3 */
|
||||
int iType[ WVW_DLGML_MAX ]; /* Type of Function Pointers - Function 1, Block 2, Method 3 */
|
||||
|
||||
HWND hDlgModal[ WVW_DLGMD_MAX ]; /* Handle to a modal dialog */
|
||||
HWND hDlgModal[ WVW_DLGMD_MAX ]; /* Handle to a modal dialog */
|
||||
PHB_ITEM pFuncModal[ WVW_DLGMD_MAX ]; /* Function pointer for WndProc */
|
||||
/* TODO: pcbFuncModal is redundant and should be removed */
|
||||
PHB_ITEM pcbFuncModal[ WVW_DLGMD_MAX ]; /* codeblock for WndProc */
|
||||
int iTypeModal[ WVW_DLGMD_MAX ]; /* Type of Function Pointers - Function 1, Block 2, Method 3 */
|
||||
int iTypeModal[ WVW_DLGMD_MAX ]; /* Type of Function Pointers - Function 1, Block 2, Method 3 */
|
||||
|
||||
BITMAP_HANDLE * pbhBitmapList;
|
||||
BITMAP_HANDLE * pbhBitmapList;
|
||||
PICTURE_HANDLE * pphPictureList;
|
||||
|
||||
BITMAP_HANDLE * pbhUserBitmap; /* User bitmap (wvw_drawimage) */
|
||||
@@ -446,7 +446,7 @@ typedef struct app_data
|
||||
|
||||
typedef struct win_data
|
||||
{
|
||||
UINT byWinId; /*x Window's Id, a number 0..WVWMAXWINDOWS */
|
||||
UINT byWinId; /*x Window's Id, a number 0..WVWMAXWINDOWS */
|
||||
TCHAR szWinName[ WVW_MAXWINNAMELENGTH ]; /*x name of Window ~ szAppName for Window 0 */
|
||||
|
||||
int byLineSpacing; /*x linespacing in pixels */
|
||||
@@ -454,17 +454,17 @@ typedef struct win_data
|
||||
|
||||
USHORT usRowOfs; /*x offset to Main Window's (0,0) */
|
||||
USHORT usColOfs; /*x offset to Main Window's (0,0) */
|
||||
int uiDispCount; /*x pending DispEnd() request */
|
||||
BOOL bPaintPending; /*x pending WVW_PAINT() execution */
|
||||
RECT rPaintPending; /*x rect of pending bPaintPending */
|
||||
HWND hStatusBar; /* handle to status bar */
|
||||
int uiDispCount; /*x pending DispEnd() request */
|
||||
BOOL bPaintPending; /*x pending WVW_PAINT() execution */
|
||||
RECT rPaintPending; /*x rect of pending bPaintPending */
|
||||
HWND hStatusBar; /* handle to status bar */
|
||||
USHORT usSBHeight; /* height of status bar */
|
||||
|
||||
HWND hToolBar; /* TB handle to toolbar */
|
||||
HWND hToolBar; /* TB handle to toolbar */
|
||||
USHORT usTBHeight; /* TB height of toolbar */
|
||||
int iStartStdBitmap,
|
||||
iStartViewBitmap,
|
||||
iStartHistBitmap; /* start of bitmap index */
|
||||
int iStartStdBitmap,
|
||||
iStartViewBitmap,
|
||||
iStartHistBitmap; /* start of bitmap index */
|
||||
int iTBImgWidth,
|
||||
iTBImgHeight; /* image width and height */
|
||||
WNDPROC tbOldProc;
|
||||
@@ -482,7 +482,7 @@ typedef struct win_data
|
||||
HFONT hCXfont; /* handle to font used by checkboxes when 'focused' */
|
||||
HFONT hSTfont; /* handle to font used by checkboxes when 'focused' */
|
||||
|
||||
BOOL bSBPaint;
|
||||
BOOL bSBPaint;
|
||||
COLORREF cSBColorForeground;
|
||||
COLORREF cSBColorBackground;
|
||||
|
||||
@@ -490,41 +490,41 @@ typedef struct win_data
|
||||
BOOL bPaint;
|
||||
BOOL bGetFocus;
|
||||
|
||||
POINT PTEXTSIZE; /* size of the fixed width font */
|
||||
BOOL FixedFont; /* TRUE if current font is a fixed font */
|
||||
int FixedSize[ WVW_MAX_COLS ]; /* buffer for ExtTextOut() to emulate fixed pitch when Proportional font selected */
|
||||
USHORT ROWS; /* number of displayable rows in window */
|
||||
USHORT COLS; /* number of displayable columns in window */
|
||||
POINT PTEXTSIZE; /* size of the fixed width font */
|
||||
BOOL FixedFont; /* TRUE if current font is a fixed font */
|
||||
int FixedSize[ WVW_MAX_COLS ]; /* buffer for ExtTextOut() to emulate fixed pitch when Proportional font selected */
|
||||
USHORT ROWS; /* number of displayable rows in window */
|
||||
USHORT COLS; /* number of displayable columns in window */
|
||||
COLORREF foreground; /* foreground colour */
|
||||
|
||||
COLORREF background; /* background colour */
|
||||
|
||||
USHORT BUFFERSIZE; /* size of the screen text buffer */
|
||||
BYTE byBuffer[ WVW_MAX_ROWS * WVW_MAX_COLS ]; /* buffer with the text to be displayed on the screen */
|
||||
BYTE byColors[ WVW_MAX_ROWS * WVW_MAX_COLS ];
|
||||
BYTE byBuffer[ WVW_MAX_ROWS * WVW_MAX_COLS ]; /* buffer with the text to be displayed on the screen */
|
||||
BYTE byColors[ WVW_MAX_ROWS * WVW_MAX_COLS ];
|
||||
BYTE * pBuffer; /* " " " */
|
||||
BYTE * pColors; /* " " " */
|
||||
POINT caretPos; /* the current caret position */
|
||||
POINT caretPos; /* the current caret position */
|
||||
|
||||
int CaretSize; /*x this may be specific to each windows, eg. different font size */
|
||||
int CaretSize; /*x this may be specific to each windows, eg. different font size */
|
||||
POINT mousePos; /* the last mousedown position */
|
||||
BOOL MouseMove; /* Flag to say whether to return mouse movement events */
|
||||
HWND hWnd; /* the window handle */
|
||||
int Keys[ WVW_CHAR_QUEUE_SIZE ]; /* Array to hold the characters & events */
|
||||
int keyPointerIn; /* Offset into key array for character to be placed */
|
||||
int keyPointerOut; /* Offset into key array of next character to read */
|
||||
int keyLast;
|
||||
BOOL MouseMove; /* Flag to say whether to return mouse movement events */
|
||||
HWND hWnd; /* the window handle */
|
||||
int Keys[ WVW_CHAR_QUEUE_SIZE ]; /* Array to hold the characters & events */
|
||||
int keyPointerIn; /* Offset into key array for character to be placed */
|
||||
int keyPointerOut; /* Offset into key array of next character to read */
|
||||
int keyLast;
|
||||
|
||||
RECT RectInvalid; /* Invalid rectangle if DISPBEGIN() active */
|
||||
RECT RectInvalid; /* Invalid rectangle if DISPBEGIN() active */
|
||||
HFONT hFont;
|
||||
int fontHeight; /* requested font height */
|
||||
int fontWidth; /* requested font width */
|
||||
int fontWeight; /* Bold level */
|
||||
int fontQuality;
|
||||
char fontFace[ LF_FACESIZE ]; /* requested font face name LF_FACESIZE #defined in wingdi.h */
|
||||
int fontHeight; /* requested font height */
|
||||
int fontWidth; /* requested font width */
|
||||
int fontWeight; /* Bold level */
|
||||
int fontQuality;
|
||||
char fontFace[ LF_FACESIZE ]; /* requested font face name LF_FACESIZE #defined in wingdi.h */
|
||||
|
||||
int LastMenuEvent; /* Last menu item selected */
|
||||
int MenuKeyEvent; /* User definable event number for windows menu command */
|
||||
int LastMenuEvent; /* Last menu item selected */
|
||||
int MenuKeyEvent; /* User definable event number for windows menu command */
|
||||
BOOL CentreWindow; /* True if window is to be Reset into centre of window */
|
||||
|
||||
/* if CentreWindow is FALSE, two following settings are examined */
|
||||
@@ -540,9 +540,9 @@ typedef struct win_data
|
||||
|
||||
HMENU hPopup; /* Handle of context menu invokable with right click */
|
||||
|
||||
HDC hCompDC; /* Compatible DC to _s.hdc */
|
||||
HWND hWndTT; /* Handle to hold tooltip information */
|
||||
BOOL bToolTipActive; /* Flag to set whether tooltip is active or not */
|
||||
HDC hCompDC; /* Compatible DC to _s.hdc */
|
||||
HWND hWndTT; /* Handle to hold tooltip information */
|
||||
BOOL bToolTipActive; /* Flag to set whether tooltip is active or not */
|
||||
HICON hIcon;
|
||||
|
||||
} WIN_DATA;
|
||||
@@ -601,7 +601,7 @@ typedef struct wvw_data
|
||||
|
||||
TCHAR szAppName[ 13 ];
|
||||
TCHAR szSubWinName[ 25 ];
|
||||
BOOL s_bSWRegistered;
|
||||
BOOL s_bSWRegistered;
|
||||
|
||||
HINSTANCE hInstance;
|
||||
|
||||
@@ -616,9 +616,9 @@ typedef struct wvw_data
|
||||
//#define HB_RETHANDLE( h ) hb_retptr( ( void * ) ( h ) )
|
||||
//#define HB_PARHANDLE( n ) hb_parptr( n )
|
||||
//#define HB_STOREHANDLE( h, n ) hb_storptr( ( void * ) ( h ), n )
|
||||
#define HB_RETHANDLE( h ) hb_retnl( ( LONG ) ( h ) )
|
||||
#define HB_PARHANDLE( n ) ( ( LONG ) hb_parnl( n ) )
|
||||
#define HB_STOREHANDLE( h, n ) hb_stornl( ( LONG ) ( h ), n )
|
||||
#define HB_RETHANDLE( h ) hb_retnl( ( LONG ) ( h ) )
|
||||
#define HB_PARHANDLE( n ) ( ( LONG ) hb_parnl( n ) )
|
||||
#define HB_STOREHANDLE( h, n ) hb_stornl( ( LONG ) ( h ), n )
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* Get functions for internal Data */
|
||||
|
||||
@@ -63,31 +63,31 @@
|
||||
! defined( __LCC__ ) && ! defined( __POCC__ ) && ! defined( __XCC__ )
|
||||
|
||||
#ifndef CINTERFACE
|
||||
#define CINTERFACE 1
|
||||
#define CINTERFACE 1
|
||||
#endif
|
||||
|
||||
#ifndef _REFGUID_DEFINED
|
||||
#define _REFGUID_DEFINED 1
|
||||
#define REFGUID const GUID * const
|
||||
#define _REFGUID_DEFINED 1
|
||||
#define REFGUID const GUID * const
|
||||
#endif
|
||||
|
||||
#ifndef _REFIID_DEFINED
|
||||
#define _REFIID_DEFINED 1
|
||||
#define REFIID const IID * const
|
||||
#define _REFIID_DEFINED 1
|
||||
#define REFIID const IID * const
|
||||
#endif
|
||||
|
||||
#ifndef _REFCLSID_DEFINED
|
||||
#define _REFCLSID_DEFINED 1
|
||||
#define REFCLSID const IID * const
|
||||
#define _REFCLSID_DEFINED 1
|
||||
#define REFCLSID const IID * const
|
||||
#endif
|
||||
|
||||
#ifndef _REFFMTID_DEFINED
|
||||
#define _REFFMTID_DEFINED 1
|
||||
#define REFFMTID const IID * const
|
||||
#define _REFFMTID_DEFINED 1
|
||||
#define REFFMTID const IID * const
|
||||
#endif
|
||||
|
||||
#ifndef _SYS_GUID_OPERATOR_EQ_
|
||||
#define _SYS_GUID_OPERATOR_EQ_ 1
|
||||
#define _SYS_GUID_OPERATOR_EQ_ 1
|
||||
#endif // _SYS_GUID_OPERATOR_EQ_
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
@@ -83,21 +83,21 @@
|
||||
|
||||
/*WVW_CXcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, cImage/nImage, bBlock, aOffset,;
|
||||
* nStretchBitmap, lMap3Dcolors)
|
||||
**create CHECKBOX for window nWinNum
|
||||
**nTop: row of top/left corner (in character unit)
|
||||
**nLeft: col of top/left corner (in character unit)
|
||||
**nBottom: row of bottom/right corner (in character unit) defaults==nTop
|
||||
**nRight: col of bottom/right corner (in character unit) defaults==??
|
||||
**cText: caption, default == ""
|
||||
* create CHECKBOX for window nWinNum
|
||||
* nTop: row of top/left corner (in character unit)
|
||||
* nLeft: col of top/left corner (in character unit)
|
||||
* nBottom: row of bottom/right corner (in character unit) defaults==nTop
|
||||
* nRight: col of bottom/right corner (in character unit) defaults==??
|
||||
* cText: caption, default == ""
|
||||
*
|
||||
**cImage: bitmap file name, can be supplied as nImage: bitmap resource id
|
||||
**nStretchBitmap: a number between 0 and 1 (inclusive) as a factor to
|
||||
* cImage: bitmap file name, can be supplied as nImage: bitmap resource id
|
||||
* nStretchBitmap: a number between 0 and 1 (inclusive) as a factor to
|
||||
* stretch the bitmap.
|
||||
* 1.0: bitmap covers the whole button
|
||||
* 0.5: bitmap covers 50% of button
|
||||
* 0: bitmap is not stretch
|
||||
* (default is 1)
|
||||
**lMap3Dcolors: defaults to .f.
|
||||
* lMap3Dcolors: defaults to .f.
|
||||
* if .t. the following color mapping will be performed:
|
||||
* RGB(192,192,192) --> COLOR_3DFACE ("transparent")
|
||||
* RGB(128,128,128) --> COLOR_3DSHADOW
|
||||
@@ -105,36 +105,36 @@
|
||||
* This might be desirable to have transparent effect.
|
||||
* LIMITATION: this will work on 256 colored bitmaps only
|
||||
*
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of CHECKBOX.
|
||||
* defaults for CHECKBOX: {-2,-2,+2,+2}
|
||||
*
|
||||
**bBlock: codeblock to execute on every BN_CLICK event.
|
||||
* bBlock: codeblock to execute on every BN_CLICK event.
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
* nWinNum: window number
|
||||
* nCXid : CHECKBOX id
|
||||
*
|
||||
**returns control id of newly created CHECKBOX of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created CHECKBOX of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
* example:
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_CXCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
// int iStyle;
|
||||
UINT uiPBid;
|
||||
USHORT usTop = ( BYTE ) hb_parni( 2 ),
|
||||
usLeft = ( BYTE ) hb_parni( 3 ),
|
||||
usBottom = ( BYTE ) hb_parni( 4 ),
|
||||
usRight = ( BYTE ) hb_parni( 5 );
|
||||
LPCTSTR lpszCaption = HB_ISCHAR( 6 ) ? hb_parcx( 6 ) : NULL;
|
||||
char * szBitmap = HB_ISCHAR( 7 ) ? ( char * ) hb_parcx( 7 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 7 ) ? ( UINT ) hb_parni( 7 ) : 0;
|
||||
double dStretch = ! HB_ISNIL( 10 ) ? hb_parnd( 10 ) : 1;
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 11 ) ? ( BOOL ) hb_parl( 11 ) : FALSE;
|
||||
UINT uiPBid;
|
||||
USHORT usTop = ( BYTE ) hb_parni( 2 ),
|
||||
usLeft = ( BYTE ) hb_parni( 3 ),
|
||||
usBottom = ( BYTE ) hb_parni( 4 ),
|
||||
usRight = ( BYTE ) hb_parni( 5 );
|
||||
LPCTSTR lpszCaption = HB_ISCHAR( 6 ) ? hb_parcx( 6 ) : NULL;
|
||||
char * szBitmap = HB_ISCHAR( 7 ) ? ( char * ) hb_parcx( 7 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 7 ) ? ( UINT ) hb_parni( 7 ) : 0;
|
||||
double dStretch = ! HB_ISNIL( 10 ) ? hb_parnd( 10 ) : 1;
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 11 ) ? ( BOOL ) hb_parl( 11 ) : FALSE;
|
||||
|
||||
if( ! HB_ISBLOCK( 8 ) )
|
||||
{
|
||||
@@ -142,16 +142,16 @@ HB_FUNC( WVW_CXCREATE )
|
||||
return;
|
||||
}
|
||||
|
||||
iOffTop = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 1 ) : -2;
|
||||
iOffLeft = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 2 ) : -2;
|
||||
iOffBottom = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 3 ) : +2;
|
||||
iOffRight = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 4 ) : +2;
|
||||
iOffTop = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 1 ) : -2;
|
||||
iOffLeft = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 2 ) : -2;
|
||||
iOffBottom = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 3 ) : +2;
|
||||
iOffRight = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 4 ) : +2;
|
||||
|
||||
uiPBid = ButtonCreate( usWinNum, usTop, usLeft, usBottom, usRight, lpszCaption,
|
||||
szBitmap, uiBitmap, hb_param( 8, HB_IT_BLOCK ),
|
||||
iOffTop, iOffLeft, iOffBottom, iOffRight,
|
||||
dStretch, bMap3Dcolors,
|
||||
BS_AUTOCHECKBOX );
|
||||
uiPBid = ButtonCreate( usWinNum, usTop, usLeft, usBottom, usRight, lpszCaption,
|
||||
szBitmap, uiBitmap, hb_param( 8, HB_IT_BLOCK ),
|
||||
iOffTop, iOffLeft, iOffBottom, iOffRight,
|
||||
dStretch, bMap3Dcolors,
|
||||
BS_AUTOCHECKBOX );
|
||||
hb_retnl( ( LONG ) uiPBid );
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ HB_FUNC( WVW_CXCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_CXDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -172,8 +172,8 @@ HB_FUNC( WVW_CXDESTROY )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
|
||||
if( pcd == NULL )
|
||||
@@ -206,10 +206,10 @@ HB_FUNC( WVW_CXDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_CXSETFOCUS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCX = FindControlHandle( usWinNum, WVW_CONTROL_CHECKBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCX = FindControlHandle( usWinNum, WVW_CONTROL_CHECKBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndCX )
|
||||
{
|
||||
@@ -230,12 +230,12 @@ HB_FUNC( WVW_CXSETFOCUS )
|
||||
*/
|
||||
HB_FUNC( WVW_CXENABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndCX = FindControlHandle( usWinNum, WVW_CONTROL_CHECKBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndCX = FindControlHandle( usWinNum, WVW_CONTROL_CHECKBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndCX )
|
||||
{
|
||||
@@ -259,12 +259,12 @@ HB_FUNC( WVW_CXENABLE )
|
||||
*/
|
||||
HB_FUNC( WVW_CXSETCODEBLOCK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
|
||||
if( ! phiCodeBlock || pcd == NULL || pcd->bBusy )
|
||||
{
|
||||
@@ -273,7 +273,7 @@ HB_FUNC( WVW_CXSETCODEBLOCK )
|
||||
}
|
||||
|
||||
pData->s_bRecurseCBlock = FALSE;
|
||||
pcd->bBusy = TRUE;
|
||||
pcd->bBusy = TRUE;
|
||||
|
||||
if( pcd->phiCodeBlock )
|
||||
{
|
||||
@@ -281,28 +281,28 @@ HB_FUNC( WVW_CXSETCODEBLOCK )
|
||||
|
||||
}
|
||||
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
|
||||
pcd->bBusy = FALSE;
|
||||
pcd->bBusy = FALSE;
|
||||
pData->s_bRecurseCBlock = bOldSetting;
|
||||
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
|
||||
/*WVW_CXsetcheck( [nWinNum], nCXid, nCheckState )
|
||||
*assigns check-state of checkbox nCXid
|
||||
/* WVW_CXsetcheck( [nWinNum], nCXid, nCheckState )
|
||||
* assigns check-state of checkbox nCXid
|
||||
* 0==unchecked BST_UNCHECKED
|
||||
* 1==checked BST_CHECKED
|
||||
* 2==indeterminate BST_INDETERMINATE
|
||||
**this function always returns .t.
|
||||
* this function always returns .t.
|
||||
*/
|
||||
HB_FUNC( WVW_CXSETCHECK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulCheck = ( ULONG ) ( HB_ISNIL( 3 ) ? BST_CHECKED : hb_parni( 3 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulCheck = ( ULONG ) ( HB_ISNIL( 3 ) ? BST_CHECKED : hb_parni( 3 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
|
||||
if( pcd->hWndCtrl )
|
||||
{
|
||||
@@ -321,11 +321,11 @@ HB_FUNC( WVW_CXSETCHECK )
|
||||
*/
|
||||
HB_FUNC( WVW_CXGETCHECK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulCheck = 0;
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
UINT uiCXid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulCheck = 0;
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_CHECKBOX, NULL, uiCXid );
|
||||
|
||||
if( pcd->hWndCtrl )
|
||||
{
|
||||
@@ -342,24 +342,24 @@ HB_FUNC( WVW_CXGETCHECK )
|
||||
*/
|
||||
HB_FUNC( WVW_CXSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
|
||||
BOOL retval = TRUE;
|
||||
BOOL retval = TRUE;
|
||||
|
||||
pData->s_lfCX.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfCX.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfCX.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfCX.lfEscapement = 0;
|
||||
pData->s_lfCX.lfOrientation = 0;
|
||||
pData->s_lfCX.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfCX.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfCX.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfCX.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfCX.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfCX.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfCX.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfCX.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfCX.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfCX.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfCX.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfCX.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfCX.lfEscapement = 0;
|
||||
pData->s_lfCX.lfOrientation = 0;
|
||||
pData->s_lfCX.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfCX.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfCX.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfCX.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfCX.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfCX.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfCX.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfCX.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfCX.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfCX.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfCX.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfCX.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfCX.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfCX.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfCX.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfCX.lfFaceName, hb_parcx( 2 ) );
|
||||
@@ -400,12 +400,12 @@ HB_FUNC( WVW_CXSETFONT )
|
||||
|
||||
HB_FUNC( WVW_CXSTATUSFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
BOOL bFocus = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
BOOL bFocus = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
|
||||
if( pcd->hWndCtrl )
|
||||
{
|
||||
@@ -433,80 +433,80 @@ HB_FUNC( WVW_CXSTATUSFONT )
|
||||
/* PROGRESSBAR begins */
|
||||
|
||||
|
||||
/*WVW_PGcreate( [nWinNum], nTop, nLeft, nBottom, nRight, [aOffset],
|
||||
/* WVW_PGcreate( [nWinNum], nTop, nLeft, nBottom, nRight, [aOffset],
|
||||
* [nBackColor], [nBarColor], [lSmooth], [lVertical])
|
||||
**create progress bar for window nWinNum
|
||||
**nTop: row of top/left corner (in character unit)
|
||||
**nLeft: col of top/left corner (in character unit)
|
||||
**nBottom: row of bottom/right corner (in character unit)
|
||||
**nRight: col of bottom/right corner (in character unit)
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of progress bar. defaults: {0, 0, 0, 0}
|
||||
**nBackColor: color of background (as RGB value)
|
||||
**nBarColor: color of bar (as RGB value)
|
||||
**lSmooth: if .t., draw as smooth bar (default is .f.)
|
||||
**lVertical: if .t., draw as vertical progress bar (default is .f.)
|
||||
* create progress bar for window nWinNum
|
||||
* nTop: row of top/left corner (in character unit)
|
||||
* nLeft: col of top/left corner (in character unit)
|
||||
* nBottom: row of bottom/right corner (in character unit)
|
||||
* nRight: col of bottom/right corner (in character unit)
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of progress bar. defaults: {0, 0, 0, 0}
|
||||
* nBackColor: color of background (as RGB value)
|
||||
* nBarColor: color of bar (as RGB value)
|
||||
* lSmooth: if .t., draw as smooth bar (default is .f.)
|
||||
* lVertical: if .t., draw as vertical progress bar (default is .f.)
|
||||
*
|
||||
**returns control id of newly created progress bar of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created progress bar of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
**WVW_PGcreate( , 5, 10, 5, 30)
|
||||
* example:
|
||||
* WVW_PGcreate( , 5, 10, 5, 30)
|
||||
* :: creates horiz progressbar on current window at (5,10) to (5,30)
|
||||
* colors using default ones.
|
||||
*
|
||||
**WVW_PGcreate( , 5, 10, 5, 30, {-1, 0, +1, 0} )
|
||||
* WVW_PGcreate( , 5, 10, 5, 30, {-1, 0, +1, 0} )
|
||||
* :: same as above, but the bar is enlarged 1 pixel to the top
|
||||
* and 1 pixel to the bottom
|
||||
*
|
||||
**NOTES:
|
||||
**ProgressRange is initially set as 0 - 100.
|
||||
**Initial ProgressPos is 0
|
||||
* NOTES:
|
||||
* ProgressRange is initially set as 0 - 100.
|
||||
* Initial ProgressPos is 0
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_PGCREATE )
|
||||
{
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndPG;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
int iStyle = 0;
|
||||
BOOL bBackColor = ! HB_ISNIL( 7 );
|
||||
BOOL bBarColor = ! HB_ISNIL( 8 );
|
||||
BOOL bSmooth = ( ! HB_ISLOG( 9 ) ? FALSE : hb_parl( 9 ) );
|
||||
BOOL bVertical = ( ! HB_ISLOG( 10 ) ? FALSE : hb_parl( 10 ) );
|
||||
UINT uiPGid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndPG;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
int iStyle = 0;
|
||||
BOOL bBackColor = ! HB_ISNIL( 7 );
|
||||
BOOL bBarColor = ! HB_ISNIL( 8 );
|
||||
BOOL bSmooth = ( ! HB_ISLOG( 9 ) ? FALSE : hb_parl( 9 ) );
|
||||
BOOL bVertical = ( ! HB_ISLOG( 10 ) ? FALSE : hb_parl( 10 ) );
|
||||
UINT uiPGid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
|
||||
InitCommonControls();
|
||||
|
||||
iOffTop = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 4 ) : 0;
|
||||
iOffTop = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 4 ) : 0;
|
||||
|
||||
if( hb_gt_wvw_GetMainCoordMode() )
|
||||
{
|
||||
hb_wvw_HBFUNCPrologue( usWinNum, &usTop, &usLeft, &usBottom, &usRight );
|
||||
}
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
|
||||
uiPGid = LastControlId( usWinNum, WVW_CONTROL_PROGRESSBAR );
|
||||
uiPGid = LastControlId( usWinNum, WVW_CONTROL_PROGRESSBAR );
|
||||
if( uiPGid == 0 )
|
||||
{
|
||||
uiPGid = WVW_ID_BASE_PROGRESSBAR;
|
||||
@@ -560,10 +560,10 @@ HB_FUNC( WVW_PGCREATE )
|
||||
SendMessage( hWndPG, PBM_SETRANGE, 0, MAKELPARAM( 0, 100 ) );
|
||||
SendMessage( hWndPG, PBM_SETPOS, ( WPARAM ) 0, 0 );
|
||||
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
|
||||
AddControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, hWndPG, uiPGid, ( PHB_ITEM ) NULL, rXB, rOffXB, ( byte ) iStyle );
|
||||
|
||||
@@ -582,7 +582,7 @@ HB_FUNC( WVW_PGCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_PGDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -595,8 +595,8 @@ HB_FUNC( WVW_PGDESTROY )
|
||||
break;
|
||||
}
|
||||
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -623,24 +623,24 @@ HB_FUNC( WVW_PGDESTROY )
|
||||
hb_xfree( pcd );
|
||||
}
|
||||
|
||||
/*WVW_PGsetrange(nWinNum, PGid, [nMin], [nMax])
|
||||
*update progressbar data range (default is 0-100)
|
||||
*nMin: a number in range of -32767 to +32767
|
||||
*nMax: a number in range of -32767 to +32767
|
||||
/* WVW_PGsetrange(nWinNum, PGid, [nMin], [nMax])
|
||||
* update progressbar data range (default is 0-100)
|
||||
* nMin: a number in range of -32767 to +32767
|
||||
* nMax: a number in range of -32767 to +32767
|
||||
*
|
||||
**Remark: progress position is reset to nMin
|
||||
* Remark: progress position is reset to nMin
|
||||
*
|
||||
**returns .t. if operation considered successfull
|
||||
* returns .t. if operation considered successfull
|
||||
*/
|
||||
HB_FUNC( WVW_PGSETRANGE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
int iMin = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
int iMax = ( int ) ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) );
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
int iMin = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
int iMax = ( int ) ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) );
|
||||
|
||||
if( uiPGid == 0 || hWndPG == NULL || ( iMin > iMax ) )
|
||||
{
|
||||
@@ -661,13 +661,13 @@ HB_FUNC( WVW_PGSETRANGE )
|
||||
*/
|
||||
HB_FUNC( WVW_PGSETPOS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
int iPos = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
PBRANGE pbrange;
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
int iPos = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
PBRANGE pbrange;
|
||||
|
||||
if( uiPGid == 0 || hWndPG == NULL )
|
||||
{
|
||||
@@ -694,11 +694,11 @@ HB_FUNC( WVW_PGSETPOS )
|
||||
*/
|
||||
HB_FUNC( WVW_PGGETPOS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
UINT uiPGid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndPG = FindControlHandle( usWinNum, WVW_CONTROL_PROGRESSBAR, uiPGid, &bStyle );
|
||||
|
||||
if( uiPGid == 0 || hWndPG == NULL )
|
||||
{
|
||||
@@ -712,4 +712,3 @@ HB_FUNC( WVW_PGGETPOS )
|
||||
|
||||
|
||||
/* PROGRESSBAR ends */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -77,16 +77,16 @@
|
||||
|
||||
#include "hbgtwvw.h"
|
||||
|
||||
/*WVW_EBcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, bBlock, ;
|
||||
/* WVW_EBcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, bBlock, ;
|
||||
* lMultiline, nMoreStyle, nMaxChar, nReserved, aOffset)
|
||||
**create editbox for window nWinNum
|
||||
**nTop: row of top/left corner (in character unit)
|
||||
**nLeft: col of top/left corner (in character unit)
|
||||
**nBottom: row of bottom/right corner (in character unit)
|
||||
**nRight: col of bottom/right corner (in character unit)
|
||||
**cText: initial text to display, default = ""
|
||||
* WARNING!! must be of "C" typed!
|
||||
**bBlock: codeblock to execute on these events:
|
||||
* create editbox for window nWinNum
|
||||
* nTop: row of top/left corner (in character unit)
|
||||
* nLeft: col of top/left corner (in character unit)
|
||||
* nBottom: row of bottom/right corner (in character unit)
|
||||
* nRight: col of bottom/right corner (in character unit)
|
||||
* cText: initial text to display, default = ""
|
||||
* WARNING!! must be of "C" typed!
|
||||
* bBlock: codeblock to execute on these events:
|
||||
* event=EN_SETFOCUS(...): editbox got focus
|
||||
* event=EN_KILLFOCUS(...): editbox lose focus
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
@@ -95,56 +95,56 @@
|
||||
* nType : event type (EN_SETFOCUS/EN_KILLFOCUS supported)
|
||||
*
|
||||
*
|
||||
**lMultiline: .f. :: single line editbox (default)
|
||||
* lMultiline: .f. :: single line editbox (default)
|
||||
* .t. :: multi line editbox
|
||||
* mapped internally into two types of editbox:
|
||||
* WVW_EB_SINGLELINE (1): single line editbox
|
||||
* WVW_EB_MULTILINE (2): multi line editbox
|
||||
* default is WVW_EB_SINGLELINE (1)
|
||||
*
|
||||
**nMoreStyle: more style that will be added to the predefined style
|
||||
* nMoreStyle: more style that will be added to the predefined style
|
||||
* some examples: ES_PASSWORD, ES_READONLY
|
||||
*
|
||||
**nMaxChar: (FUTURE FEATURE) maximum number of chars allowed
|
||||
* nMaxChar: (FUTURE FEATURE) maximum number of chars allowed
|
||||
*
|
||||
**nReserved: reserved for future use
|
||||
* nReserved: reserved for future use
|
||||
*
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of editbox.
|
||||
* defaults: {-2,-2,+2,+2}
|
||||
*
|
||||
**returns control id of newly created editbox of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created editbox of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
* example:
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_EBCREATE )
|
||||
{
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndEB;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT uiEBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_parcx( 6 );
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndEB;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT uiEBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_parcx( 6 );
|
||||
|
||||
BOOL bMultiline = ( HB_ISLOG( 8 ) ? hb_parl( 8 ) : FALSE );
|
||||
BYTE bEBType = ( BYTE ) ( bMultiline ? WVW_EB_MULTILINE : WVW_EB_SINGLELINE );
|
||||
BOOL bMultiline = ( HB_ISLOG( 8 ) ? hb_parl( 8 ) : FALSE );
|
||||
BYTE bEBType = ( BYTE ) ( bMultiline ? WVW_EB_MULTILINE : WVW_EB_SINGLELINE );
|
||||
|
||||
DWORD dwMoreStyle = ( DWORD ) ( HB_ISNUM( 9 ) ? hb_parnl( 9 ) : 0 );
|
||||
DWORD dwMoreStyle = ( DWORD ) ( HB_ISNUM( 9 ) ? hb_parnl( 9 ) : 0 );
|
||||
|
||||
USHORT usMaxChar = ( USHORT ) ( HB_ISNUM( 10 ) && hb_parni( 10 ) > 0 ? hb_parni( 10 ) : 0 );
|
||||
USHORT usMaxChar = ( USHORT ) ( HB_ISNUM( 10 ) && hb_parni( 10 ) > 0 ? hb_parni( 10 ) : 0 );
|
||||
|
||||
DWORD dwStyle;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
DWORD dwStyle;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
|
||||
if( pWindowData->hEBfont == NULL )
|
||||
{
|
||||
@@ -156,28 +156,28 @@ HB_FUNC( WVW_EBCREATE )
|
||||
}
|
||||
}
|
||||
|
||||
iOffTop = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 4 ) : 0;
|
||||
iOffTop = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 12 ) ? hb_parvni( 12, 4 ) : 0;
|
||||
|
||||
if( hb_gt_wvw_GetMainCoordMode() )
|
||||
{
|
||||
hb_wvw_HBFUNCPrologue( usWinNum, &usTop, &usLeft, &usBottom, &usRight );
|
||||
}
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
|
||||
uiEBid = LastControlId( usWinNum, WVW_CONTROL_EDITBOX );
|
||||
uiEBid = LastControlId( usWinNum, WVW_CONTROL_EDITBOX );
|
||||
if( uiEBid == 0 )
|
||||
{
|
||||
uiEBid = WVW_ID_BASE_EDITBOX;
|
||||
@@ -224,15 +224,15 @@ HB_FUNC( WVW_EBCREATE )
|
||||
|
||||
if( hWndEB )
|
||||
{
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
WNDPROC OldProc;
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
WNDPROC OldProc;
|
||||
//USHORT i;
|
||||
BOOL bFromOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
BOOL bFromOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
|
||||
if( bFromOEM )
|
||||
{
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszText );
|
||||
LPTSTR lpszTextANSI = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszText );
|
||||
LPTSTR lpszTextANSI = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
OemToChar( lpszText, lpszTextANSI );
|
||||
lpszText = lpszTextANSI;
|
||||
}
|
||||
@@ -259,10 +259,10 @@ HB_FUNC( WVW_EBCREATE )
|
||||
);
|
||||
}
|
||||
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
|
||||
AddControlHandle( usWinNum, WVW_CONTROL_EDITBOX, hWndEB, uiEBid, ( PHB_ITEM ) hb_param( 7, HB_IT_BLOCK ), rXB, rOffXB, ( byte ) bEBType );
|
||||
|
||||
@@ -287,7 +287,7 @@ HB_FUNC( WVW_EBCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_EBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiEBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -300,8 +300,8 @@ HB_FUNC( WVW_EBDESTROY )
|
||||
break;
|
||||
}
|
||||
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -333,10 +333,10 @@ HB_FUNC( WVW_EBDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_EBSETFOCUS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndEB )
|
||||
{
|
||||
@@ -353,10 +353,10 @@ HB_FUNC( WVW_EBSETFOCUS )
|
||||
*/
|
||||
HB_FUNC( WVW_EBISFOCUSED )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
|
||||
hb_retl( ( HWND ) GetFocus() == hWndEB );
|
||||
}
|
||||
@@ -369,12 +369,12 @@ HB_FUNC( WVW_EBISFOCUSED )
|
||||
*/
|
||||
HB_FUNC( WVW_EBENABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
if( hWndEB )
|
||||
{
|
||||
@@ -399,11 +399,11 @@ HB_FUNC( WVW_EBENABLE )
|
||||
*/
|
||||
HB_FUNC( WVW_EBEDITABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEditable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEditable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
byte bStyle;
|
||||
HWND hWndEB = FindControlHandle( usWinNum, WVW_CONTROL_EDITBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndEB )
|
||||
{
|
||||
@@ -434,13 +434,13 @@ HB_FUNC( WVW_EBEDITABLE )
|
||||
*/
|
||||
HB_FUNC( WVW_EBSETCODEBLOCK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiEBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
UINT uiEBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
|
||||
if( ! phiCodeBlock || pcd == NULL || pcd->bBusy )
|
||||
{
|
||||
@@ -449,7 +449,7 @@ HB_FUNC( WVW_EBSETCODEBLOCK )
|
||||
}
|
||||
|
||||
pData->s_bRecurseCBlock = FALSE;
|
||||
pcd->bBusy = TRUE;
|
||||
pcd->bBusy = TRUE;
|
||||
|
||||
if( pcd->phiCodeBlock )
|
||||
{
|
||||
@@ -457,41 +457,41 @@ HB_FUNC( WVW_EBSETCODEBLOCK )
|
||||
|
||||
}
|
||||
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
|
||||
pcd->bBusy = FALSE;
|
||||
pcd->bBusy = FALSE;
|
||||
pData->s_bRecurseCBlock = bOldSetting;
|
||||
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
|
||||
/*WVW_EBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
/* WVW_EBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
* lItalic, lUnderline, lStrikeout
|
||||
*
|
||||
**this will initialize font for ALL editboxes in window nWinNum
|
||||
**(including ones created later on)
|
||||
* this will initialize font for ALL editboxes in window nWinNum
|
||||
* (including ones created later on)
|
||||
*
|
||||
**TODO: ? should nHeight be ignored, and always forced to use standard char height?
|
||||
* TODO: ? should nHeight be ignored, and always forced to use standard char height?
|
||||
*/
|
||||
HB_FUNC( WVW_EBSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
BOOL retval = TRUE;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
BOOL retval = TRUE;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
|
||||
pData->s_lfEB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfEB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfEB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfEB.lfEscapement = 0;
|
||||
pData->s_lfEB.lfOrientation = 0;
|
||||
pData->s_lfEB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfEB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfEB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfEB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfEB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfEB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfEB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfEB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfEB.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfEB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfEB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfEB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfEB.lfEscapement = 0;
|
||||
pData->s_lfEB.lfOrientation = 0;
|
||||
pData->s_lfEB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfEB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfEB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfEB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfEB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfEB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfEB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfEB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfEB.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfEB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfEB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfEB.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfEB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfEB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfEB.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfEB.lfFaceName, hb_parcx( 2 ) );
|
||||
@@ -539,10 +539,10 @@ HB_FUNC( WVW_EBSETFONT )
|
||||
*/
|
||||
HB_FUNC( WVW_EBISMULTILINE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
BOOL bMultiline;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
BOOL bMultiline;
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -554,28 +554,28 @@ HB_FUNC( WVW_EBISMULTILINE )
|
||||
hb_retl( bMultiline );
|
||||
}
|
||||
|
||||
/*WVW_EBgettext( [nWinNum], nEBid,;
|
||||
/* WVW_EBgettext( [nWinNum], nEBid,;
|
||||
* lSoftBreak )
|
||||
**returns current text from editbox nEBid in window nWinNum
|
||||
**lSoftBreak: Default is FALSE.
|
||||
* returns current text from editbox nEBid in window nWinNum
|
||||
* lSoftBreak: Default is FALSE.
|
||||
* insert soft line break character (CR+CR+LF) at wordwrap positions
|
||||
* can be usefull to convert the text to MEMO format
|
||||
* eg. converting editbox's softbreaks into memoline softbreak:
|
||||
* cStr := wvw_ebgettext( NIL, nEBid, .T. )
|
||||
* cStr := StrTran( cStr, CR + CR + LF, Chr( 141 ) + LF )
|
||||
*
|
||||
**returns "" in case of error (eg. nEBid not valid)
|
||||
* returns "" in case of error (eg. nEBid not valid)
|
||||
*/
|
||||
HB_FUNC( WVW_EBGETTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
BOOL bSoftBreak = ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : FALSE );
|
||||
USHORT usLen;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
LPTSTR lpszTextANSI;
|
||||
BOOL bToOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
BOOL bSoftBreak = ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : FALSE );
|
||||
USHORT usLen;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
LPTSTR lpszTextANSI;
|
||||
BOOL bToOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -594,9 +594,9 @@ HB_FUNC( WVW_EBGETTEXT )
|
||||
|
||||
}
|
||||
|
||||
usLen = ( USHORT ) SendMessage( ( HWND ) pcd->hWndCtrl, WM_GETTEXTLENGTH, 0, 0 ) + 1;
|
||||
usLen = ( USHORT ) SendMessage( ( HWND ) pcd->hWndCtrl, WM_GETTEXTLENGTH, 0, 0 ) + 1;
|
||||
|
||||
lpszTextANSI = ( LPTSTR ) hb_xgrab( usLen );
|
||||
lpszTextANSI = ( LPTSTR ) hb_xgrab( usLen );
|
||||
|
||||
SendMessage(
|
||||
( HWND ) pcd->hWndCtrl,
|
||||
@@ -607,8 +607,8 @@ HB_FUNC( WVW_EBGETTEXT )
|
||||
|
||||
if( bToOEM )
|
||||
{
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszTextANSI );
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszTextANSI );
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
CharToOem( lpszTextANSI, lpszText );
|
||||
hb_retc( lpszText );
|
||||
hb_xfree( lpszText );
|
||||
@@ -627,13 +627,13 @@ HB_FUNC( WVW_EBGETTEXT )
|
||||
*/
|
||||
HB_FUNC( WVW_EBSETTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
BOOL bRetval;
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_parcx( 3 );
|
||||
BOOL bFromOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
BOOL bRetval;
|
||||
LPTSTR lpszText = ( LPTSTR ) hb_parcx( 3 );
|
||||
BOOL bFromOEM = ( pWindowData->CodePage == OEM_CHARSET );
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -643,8 +643,8 @@ HB_FUNC( WVW_EBSETTEXT )
|
||||
|
||||
if( bFromOEM )
|
||||
{
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszText );
|
||||
LPTSTR lpszTextANSI = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
ULONG ulLen = ( ULONG ) strlen( lpszText );
|
||||
LPTSTR lpszTextANSI = ( LPTSTR ) hb_xgrab( ulLen + 1 );
|
||||
OemToChar( lpszText, lpszTextANSI );
|
||||
lpszText = lpszTextANSI;
|
||||
}
|
||||
@@ -673,9 +673,9 @@ HB_FUNC( WVW_EBSETTEXT )
|
||||
*/
|
||||
HB_FUNC( WVW_EBGETSEL )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
DWORD dwStart, dwEnd;
|
||||
|
||||
if( pcd == NULL )
|
||||
@@ -708,11 +708,11 @@ HB_FUNC( WVW_EBGETSEL )
|
||||
*/
|
||||
HB_FUNC( WVW_EBSETSEL )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
DWORD dwStart = ( DWORD ) ( HB_ISNUM( 3 ) ? hb_parnl( 3 ) : 0 );
|
||||
DWORD dwEnd = ( DWORD ) ( HB_ISNUM( 4 ) ? hb_parnl( 4 ) : 0 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiEBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_EDITBOX, NULL, uiEBid );
|
||||
DWORD dwStart = ( DWORD ) ( HB_ISNUM( 3 ) ? hb_parnl( 3 ) : 0 );
|
||||
DWORD dwEnd = ( DWORD ) ( HB_ISNUM( 4 ) ? hb_parnl( 4 ) : 0 );
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -731,33 +731,33 @@ HB_FUNC( WVW_EBSETSEL )
|
||||
|
||||
HB_FUNC( WVW_STCREATE )
|
||||
{
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndCB;
|
||||
HANDLE hInstance = NULL;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndCB;
|
||||
//RECT r;
|
||||
// HDC hDc;
|
||||
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT uiCBid;
|
||||
BOOL bBorder = hb_parnl( 7 );
|
||||
ULONG ulExStyle = 0 | ( bBorder ? WS_EX_CLIENTEDGE : 0 );
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT uiCBid;
|
||||
BOOL bBorder = hb_parnl( 7 );
|
||||
ULONG ulExStyle = 0 | ( bBorder ? WS_EX_CLIENTEDGE : 0 );
|
||||
|
||||
USHORT usWidth = ( USHORT ) hb_parni( 4 );
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = HB_ISNUM( 11 ) ? ( USHORT ) hb_parni( 11 ) : usTop,
|
||||
usRight = HB_ISNUM( 12 ) ? ( USHORT ) hb_parni( 12 ) : usLeft + usWidth - 1;
|
||||
USHORT usWidth = ( USHORT ) hb_parni( 4 );
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = HB_ISNUM( 11 ) ? ( USHORT ) hb_parni( 11 ) : usTop,
|
||||
usRight = HB_ISNUM( 12 ) ? ( USHORT ) hb_parni( 12 ) : usLeft + usWidth - 1;
|
||||
//char * sText = hb_parc( 5 );
|
||||
|
||||
|
||||
int iStyle = ( bBorder ? WS_BORDER : 0 );
|
||||
int iBox = HB_ISNUM( 10 ) ? hb_parni( 10 ) : 0;
|
||||
HFONT hFont = NULL;
|
||||
int iStyle = ( bBorder ? WS_BORDER : 0 );
|
||||
int iBox = HB_ISNUM( 10 ) ? hb_parni( 10 ) : 0;
|
||||
HFONT hFont = NULL;
|
||||
|
||||
if( iBox > 0 )
|
||||
iStyle |= iBox;
|
||||
@@ -778,29 +778,29 @@ HB_FUNC( WVW_STCREATE )
|
||||
|
||||
|
||||
|
||||
iOffTop = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 2 ) : 0;
|
||||
iOffTop = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 2 ) : 0;
|
||||
|
||||
iOffBottom = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 4 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 6 ) ? hb_parvni( 6, 4 ) : 0;
|
||||
|
||||
if( hb_gt_wvw_GetMainCoordMode() )
|
||||
{
|
||||
hb_wvw_HBFUNCPrologue( usWinNum, &usTop, &usLeft, &usBottom, &usRight );
|
||||
}
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
|
||||
uiCBid = LastControlId( usWinNum, WVW_CONTROL_STATIC );
|
||||
uiCBid = LastControlId( usWinNum, WVW_CONTROL_STATIC );
|
||||
if( uiCBid == 0 )
|
||||
{
|
||||
uiCBid = WVW_ID_BASE_STATIC;
|
||||
@@ -833,10 +833,10 @@ HB_FUNC( WVW_STCREATE )
|
||||
|
||||
// WNDPROC OldProc;
|
||||
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
|
||||
|
||||
if( HB_ISCHAR( 5 ) )
|
||||
@@ -878,23 +878,23 @@ HB_FUNC( WVW_STSETTEXT )
|
||||
|
||||
HB_FUNC( WVW_STSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL retval = TRUE;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL retval = TRUE;
|
||||
|
||||
pData->s_lfST.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfST.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfST.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfST.lfEscapement = 0;
|
||||
pData->s_lfST.lfOrientation = 0;
|
||||
pData->s_lfST.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfST.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfST.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfST.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfST.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfST.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfST.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfST.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfST.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfST.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfST.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfST.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfST.lfEscapement = 0;
|
||||
pData->s_lfST.lfOrientation = 0;
|
||||
pData->s_lfST.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfST.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfST.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfST.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfST.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfST.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfST.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfST.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfST.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfST.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfST.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfST.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfST.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfST.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfST.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfST.lfFaceName, hb_parcx( 2 ) );
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -90,8 +90,8 @@
|
||||
|
||||
HB_FUNC( WVW_SETMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWinData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWinData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
SetMenu( pWinData->hWnd, ( HMENU ) HB_PARHANDLE( 2 ) );
|
||||
|
||||
@@ -102,9 +102,9 @@ HB_FUNC( WVW_SETMENU )
|
||||
|
||||
HB_FUNC( WVW_SETPOPUPMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWinData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HMENU hPopup = pWinData->hPopup;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWinData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HMENU hPopup = pWinData->hPopup;
|
||||
|
||||
pWinData->hPopup = ( HMENU ) HB_PARHANDLE( 2 );
|
||||
/* if ( hPopup ) */
|
||||
@@ -133,9 +133,9 @@ HB_FUNC( WVW_CREATEPOPUPMENU )
|
||||
|
||||
HB_FUNC( WVW_APPENDMENU )
|
||||
{
|
||||
char ucBuf[ 256 ];
|
||||
int i, iLen;
|
||||
LPCTSTR lpszCaption;
|
||||
char ucBuf[ 256 ];
|
||||
int i, iLen;
|
||||
LPCTSTR lpszCaption;
|
||||
|
||||
if( ! ( hb_parni( 2 ) & ( MF_SEPARATOR | MF_POPUP ) ) &&
|
||||
( hb_parni( 3 ) >= WVW_ID_BASE_PUSHBUTTON ) )
|
||||
@@ -157,8 +157,8 @@ HB_FUNC( WVW_APPENDMENU )
|
||||
ucBuf[ i ] = ( *lpszCaption == '~' ) ? '&' : *lpszCaption;
|
||||
lpszCaption++;
|
||||
}
|
||||
ucBuf[ iLen ] = '\0';
|
||||
lpszCaption = ucBuf;
|
||||
ucBuf[ iLen ] = '\0';
|
||||
lpszCaption = ucBuf;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,8 +216,8 @@ HB_FUNC( WVW_SETLASTMENUEVENT )
|
||||
|
||||
HB_FUNC( WVW_SETMENUKEYEVENT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iEvent = 0;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iEvent = 0;
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
{
|
||||
@@ -236,10 +236,10 @@ HB_FUNC( WVW_SETMENUKEYEVENT )
|
||||
//
|
||||
HB_FUNC( WVW_MENUITEM_SETBITMAPS )
|
||||
{
|
||||
HBITMAP hBitmapUnchecked = NULL;
|
||||
HBITMAP hBitmapChecked = NULL;
|
||||
char szResname[ _MAX_PATH + 1 ];
|
||||
int iWidth, iHeight;
|
||||
HBITMAP hBitmapUnchecked = NULL;
|
||||
HBITMAP hBitmapChecked = NULL;
|
||||
char szResname[ _MAX_PATH + 1 ];
|
||||
int iWidth, iHeight;
|
||||
|
||||
if( ! HB_ISNIL( 4 ) )
|
||||
{
|
||||
@@ -308,8 +308,8 @@ HB_FUNC( WVW_MENUITEM_SETBITMAPS )
|
||||
|
||||
HB_FUNC( WVW_DRAWMENUBAR )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
DrawMenuBar( pWindowData->hWnd );
|
||||
}
|
||||
@@ -324,8 +324,8 @@ HB_FUNC( WVW_ENDMENU )
|
||||
/* WVW_GetMenu([nWinNum]) */
|
||||
HB_FUNC( WVW_GETMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
HB_RETHANDLE( GetMenu( pWindowData->hWnd ) );
|
||||
}
|
||||
@@ -333,9 +333,9 @@ HB_FUNC( WVW_GETMENU )
|
||||
/* WVW_TrackPopupMenu([nWinNum], n) */
|
||||
HB_FUNC( WVW_TRACKPOPUPMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
POINT xy = { 0 };
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
POINT xy = { 0 };
|
||||
|
||||
GetCursorPos( &xy );
|
||||
|
||||
@@ -354,18 +354,18 @@ HB_FUNC( WIN_SETMENU )
|
||||
}
|
||||
|
||||
/*
|
||||
*WVW_NOSYSMENU( [nWinNum], lRemoveClose )
|
||||
*removes System Menu of a window
|
||||
*if lRemoveClose is .t., also removes the 'Close' command and 'X' button
|
||||
* WVW_NOSYSMENU( [nWinNum], lRemoveClose )
|
||||
* removes System Menu of a window
|
||||
* if lRemoveClose is .t., also removes the 'Close' command and 'X' button
|
||||
*
|
||||
**no return value
|
||||
* no return value
|
||||
*/
|
||||
HB_FUNC( WVW_NOSYSMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
BOOL lRemoveClose = HB_ISNIL( 2 ) ? FALSE : hb_parl( 2 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HMENU hMenu = GetSystemMenu( pWindowData->hWnd, FALSE );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
BOOL lRemoveClose = HB_ISNIL( 2 ) ? FALSE : hb_parl( 2 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HMENU hMenu = GetSystemMenu( pWindowData->hWnd, FALSE );
|
||||
|
||||
if( hMenu )
|
||||
{
|
||||
@@ -390,9 +390,9 @@ HB_FUNC( WVW_NOSYSMENU )
|
||||
*/
|
||||
HB_FUNC( WVW_GETSYSTEMMENU )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
BOOL lReset = HB_ISNIL( 2 ) ? FALSE : hb_parl( 2 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
BOOL lReset = HB_ISNIL( 2 ) ? FALSE : hb_parl( 2 );
|
||||
|
||||
hb_retnl( ( ULONG ) GetSystemMenu( pWindowData->hWnd, lReset ) );
|
||||
}
|
||||
|
||||
@@ -77,63 +77,63 @@
|
||||
|
||||
#include "hbgtwvw.h"
|
||||
|
||||
/*WVW_PBcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, cImage/nImage, bBlock, aOffset,;
|
||||
* nStretchBitmap, lMap3Dcolors)
|
||||
**create pushbutton for window nWinNum
|
||||
**nTop: row of top/left corner (in character unit)
|
||||
**nLeft: col of top/left corner (in character unit)
|
||||
**nBottom: row of bottom/right corner (in character unit) defaults==nTop
|
||||
**nRight: col of bottom/right corner (in character unit) defaults==??
|
||||
**cText: caption, default == ""
|
||||
/* WVW_PBcreate( [nWinNum], nTop, nLeft, nBottom, nRight, cText, cImage/nImage, bBlock, aOffset,;
|
||||
* nStretchBitmap, lMap3Dcolors)
|
||||
* create pushbutton for window nWinNum
|
||||
* nTop: row of top/left corner (in character unit)
|
||||
* nLeft: col of top/left corner (in character unit)
|
||||
* nBottom: row of bottom/right corner (in character unit) defaults==nTop
|
||||
* nRight: col of bottom/right corner (in character unit) defaults==??
|
||||
* cText: caption, default == ""
|
||||
*
|
||||
*
|
||||
**cImage: bitmap file name, can be supplied as nImage: bitmap resource id
|
||||
* cImage: bitmap file name, can be supplied as nImage: bitmap resource id
|
||||
*
|
||||
**nStretchBitmap: a number between 0 and 1 (inclusive) as a factor to
|
||||
* stretch the bitmap.
|
||||
* 1.0: bitmap covers the whole button
|
||||
* 0.5: bitmap covers 50% of button
|
||||
* 0: bitmap is not stretch
|
||||
* (default is 1)
|
||||
* nStretchBitmap: a number between 0 and 1 (inclusive) as a factor to
|
||||
* stretch the bitmap.
|
||||
* 1.0: bitmap covers the whole button
|
||||
* 0.5: bitmap covers 50% of button
|
||||
* 0: bitmap is not stretch
|
||||
* (default is 1)
|
||||
*
|
||||
**lMap3Dcolors: defaults to .f.
|
||||
* if .t. the following color mapping will be performed:
|
||||
* RGB(192,192,192) --> COLOR_3DFACE ("transparent")
|
||||
* RGB(128,128,128) --> COLOR_3DSHADOW
|
||||
* RGB(223,223,223) --> COLOR_3DLIGHT
|
||||
* This might be desirable to have transparent effect.
|
||||
* LIMITATION: this will work on 256 colored bitmaps only
|
||||
* lMap3Dcolors: defaults to .f.
|
||||
* if .t. the following color mapping will be performed:
|
||||
* RGB(192,192,192) --> COLOR_3DFACE ("transparent")
|
||||
* RGB(128,128,128) --> COLOR_3DSHADOW
|
||||
* RGB(223,223,223) --> COLOR_3DLIGHT
|
||||
* This might be desirable to have transparent effect.
|
||||
* LIMITATION: this will work on 256 colored bitmaps only
|
||||
*
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of pushbutton.
|
||||
* defaults for pushbutton: {-2,-2,+2,+2}
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of pushbutton.
|
||||
* defaults for pushbutton: {-2,-2,+2,+2}
|
||||
*
|
||||
**bBlock: codeblock to execute on every BN_CLICK event.
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
* nWinNum: window number
|
||||
* nPBid : pushbutton id
|
||||
* bBlock: codeblock to execute on every BN_CLICK event.
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
* nWinNum: window number
|
||||
* nPBid : pushbutton id
|
||||
*
|
||||
**returns control id of newly created pushbutton of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created pushbutton of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
* example:
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_PBCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
// int iStyle;
|
||||
UINT uiPBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
LPCTSTR lpszCaption = HB_ISCHAR( 6 ) ? hb_parcx( 6 ) : NULL;
|
||||
char * szBitmap = HB_ISCHAR( 7 ) ? ( char * ) hb_parcx( 7 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 7 ) ? ( UINT ) hb_parni( 7 ) : 0;
|
||||
double dStretch = ! HB_ISNIL( 10 ) ? hb_parnd( 10 ) : 1;
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 11 ) ? ( BOOL ) hb_parl( 11 ) : FALSE;
|
||||
UINT uiPBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = ( USHORT ) hb_parni( 4 ),
|
||||
usRight = ( USHORT ) hb_parni( 5 );
|
||||
LPCTSTR lpszCaption = HB_ISCHAR( 6 ) ? hb_parcx( 6 ) : NULL;
|
||||
char * szBitmap = HB_ISCHAR( 7 ) ? ( char * ) hb_parcx( 7 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 7 ) ? ( UINT ) hb_parni( 7 ) : 0;
|
||||
double dStretch = ! HB_ISNIL( 10 ) ? hb_parnd( 10 ) : 1;
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 11 ) ? ( BOOL ) hb_parl( 11 ) : FALSE;
|
||||
|
||||
if( ! HB_ISBLOCK( 8 ) )
|
||||
{
|
||||
@@ -141,16 +141,16 @@ HB_FUNC( WVW_PBCREATE )
|
||||
return;
|
||||
}
|
||||
|
||||
iOffTop = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 1 ) : -2;
|
||||
iOffLeft = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 2 ) : -2;
|
||||
iOffBottom = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 3 ) : +2;
|
||||
iOffRight = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 4 ) : +2;
|
||||
iOffTop = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 1 ) : -2;
|
||||
iOffLeft = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 2 ) : -2;
|
||||
iOffBottom = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 3 ) : +2;
|
||||
iOffRight = ! HB_ISNIL( 9 ) ? hb_parvni( 9, 4 ) : +2;
|
||||
|
||||
uiPBid = ButtonCreate( usWinNum, usTop, usLeft, usBottom, usRight, lpszCaption,
|
||||
szBitmap, uiBitmap, hb_param( 8, HB_IT_BLOCK ),
|
||||
iOffTop, iOffLeft, iOffBottom, iOffRight,
|
||||
dStretch, bMap3Dcolors,
|
||||
BS_PUSHBUTTON );
|
||||
uiPBid = ButtonCreate( usWinNum, usTop, usLeft, usBottom, usRight, lpszCaption,
|
||||
szBitmap, uiBitmap, hb_param( 8, HB_IT_BLOCK ),
|
||||
iOffTop, iOffLeft, iOffBottom, iOffRight,
|
||||
dStretch, bMap3Dcolors,
|
||||
BS_PUSHBUTTON );
|
||||
hb_retnl( ( LONG ) uiPBid );
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ HB_FUNC( WVW_PBCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_PBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -171,8 +171,8 @@ HB_FUNC( WVW_PBDESTROY )
|
||||
{
|
||||
break;
|
||||
}
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
|
||||
if( pcd == NULL )
|
||||
@@ -205,10 +205,10 @@ HB_FUNC( WVW_PBDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_PBSETFOCUS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndPB )
|
||||
{
|
||||
@@ -226,10 +226,10 @@ HB_FUNC( WVW_PBSETFOCUS )
|
||||
*/
|
||||
HB_FUNC( WVW_PBISFOCUSED )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
|
||||
hb_retl( ( HWND ) GetFocus() == hWndPB );
|
||||
}
|
||||
@@ -242,12 +242,12 @@ HB_FUNC( WVW_PBISFOCUSED )
|
||||
*/
|
||||
HB_FUNC( WVW_PBENABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
byte bStyle;
|
||||
HWND hWndPB = FindControlHandle( usWinNum, WVW_CONTROL_PUSHBUTTON, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndPB )
|
||||
{
|
||||
@@ -271,12 +271,12 @@ HB_FUNC( WVW_PBENABLE )
|
||||
*/
|
||||
HB_FUNC( WVW_PBSETCODEBLOCK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
|
||||
if( ! phiCodeBlock || pcd == NULL || pcd->bBusy )
|
||||
{
|
||||
@@ -306,7 +306,7 @@ HB_FUNC( WVW_PBSETCODEBLOCK )
|
||||
}
|
||||
|
||||
pData->s_bRecurseCBlock = FALSE;
|
||||
pcd->bBusy = TRUE;
|
||||
pcd->bBusy = TRUE;
|
||||
|
||||
if( pcd->phiCodeBlock )
|
||||
{
|
||||
@@ -314,34 +314,34 @@ HB_FUNC( WVW_PBSETCODEBLOCK )
|
||||
|
||||
}
|
||||
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
|
||||
pcd->bBusy = FALSE;
|
||||
pcd->bBusy = FALSE;
|
||||
pData->s_bRecurseCBlock = bOldSetting;
|
||||
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
|
||||
/*WVW_PBsetstyle( [nWinNum], nPBid, nStyle )
|
||||
*assign new style nStyle to button nPBid for window nWinNum
|
||||
*typical usage: nStyle==BS_DEFPUSHBUTTON (==01) to turn the button
|
||||
/* WVW_PBsetstyle( [nWinNum], nPBid, nStyle )
|
||||
* assign new style nStyle to button nPBid for window nWinNum
|
||||
* typical usage: nStyle==BS_DEFPUSHBUTTON (==01) to turn the button
|
||||
* into default push button
|
||||
* (thick border)
|
||||
* BS_PUSHBUTTON (==00) to turn the button
|
||||
* into regular push button
|
||||
*
|
||||
**using other styles like BS_MULTILINE may also be usefull,
|
||||
**but I haven't tried that
|
||||
* using other styles like BS_MULTILINE may also be usefull,
|
||||
* but I haven't tried that
|
||||
*
|
||||
* this function always return .t.
|
||||
*/
|
||||
HB_FUNC( WVW_PBSETSTYLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulStyle = ( ULONG ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
UINT uiPBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
ULONG ulStyle = ( ULONG ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_PUSHBUTTON, NULL, uiPBid );
|
||||
|
||||
if( pcd->hWndCtrl )
|
||||
{
|
||||
@@ -351,31 +351,31 @@ HB_FUNC( WVW_PBSETSTYLE )
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
|
||||
/*WVW_PBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
/* WVW_PBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
* lItalic, lUnderline, lStrikeout
|
||||
*
|
||||
**this will initialize font for ALL pushbuttons in window nWinNum
|
||||
**(including ones created later on)
|
||||
* this will initialize font for ALL pushbuttons in window nWinNum
|
||||
* (including ones created later on)
|
||||
*/
|
||||
HB_FUNC( WVW_PBSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL retval = TRUE;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL retval = TRUE;
|
||||
|
||||
pData->s_lfPB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfPB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfPB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfPB.lfEscapement = 0;
|
||||
pData->s_lfPB.lfOrientation = 0;
|
||||
pData->s_lfPB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfPB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfPB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfPB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfPB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfPB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfPB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfPB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfPB.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfPB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfPB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfPB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfPB.lfEscapement = 0;
|
||||
pData->s_lfPB.lfOrientation = 0;
|
||||
pData->s_lfPB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfPB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfPB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfPB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfPB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfPB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfPB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfPB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfPB.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfPB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfPB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfPB.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfPB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfPB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfPB.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfPB.lfFaceName, hb_parcx( 2 ) );
|
||||
@@ -423,18 +423,18 @@ HB_FUNC( WVW_PBSETFONT )
|
||||
/* COMBOBOX begins (experimental) */
|
||||
|
||||
|
||||
/*WVW_CBcreate( [nWinNum], nTop, nLeft, nWidth, aText, bBlock, nListLines, ;
|
||||
* nReserved, nKbdType, aOffset, hControl )
|
||||
**create combobox (drop-down list, no editbox) for window nWinNum
|
||||
**nTop: row of top/left corner (in character unit)
|
||||
**nLeft: col of top/left corner (in character unit)
|
||||
**nWidth: width of combobox (in character unit)
|
||||
**aText: array of drop-down list members, default = {"empty"}
|
||||
* eg. {"yes","no"}
|
||||
**bBlock: codeblock to execute on these events:
|
||||
* event=CBN_SELCHANGE(1): user changes selection
|
||||
(not executed if selection
|
||||
is changed programmatically)
|
||||
/* WVW_CBcreate( [nWinNum], nTop, nLeft, nWidth, aText, bBlock, nListLines, ;
|
||||
* nReserved, nKbdType, aOffset, hControl )
|
||||
* create combobox (drop-down list, no editbox) for window nWinNum
|
||||
* nTop: row of top/left corner (in character unit)
|
||||
* nLeft: col of top/left corner (in character unit)
|
||||
* nWidth: width of combobox (in character unit)
|
||||
* aText: array of drop-down list members, default = {"empty"}
|
||||
* eg. {"yes","no"}
|
||||
* bBlock: codeblock to execute on these events:
|
||||
* event=CBN_SELCHANGE(1): user changes selection
|
||||
* (not executed if selection
|
||||
* is changed programmatically)
|
||||
* event=CBN_SETFOCUS
|
||||
* event=CBN_KILLFOCUS
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
@@ -442,61 +442,61 @@ HB_FUNC( WVW_PBSETFONT )
|
||||
* nCBid : combobox id
|
||||
* nType : event type (CBN_SELCHANGE/CBN_SETFOCUS/CBN_KILLFOCUS supported)
|
||||
* nIndex : index of the selected list item (0 based)
|
||||
**nListLines: number of lines for list items, default = 3
|
||||
* nListLines: number of lines for list items, default = 3
|
||||
* (will be automatically truncated if it's > len(aText))
|
||||
**nReserved: reserved for future (this parm is now ignored)
|
||||
* nReserved: reserved for future (this parm is now ignored)
|
||||
*
|
||||
**nKbdType: WVW_CB_KBD_STANDARD (0): similar to standard windows convention
|
||||
* nKbdType: WVW_CB_KBD_STANDARD (0): similar to standard windows convention
|
||||
* ENTER/ESC: will kill focus from combobox
|
||||
* WVW_CB_KBD_CLIPPER (1):
|
||||
* ENTER: drop (show) the list box
|
||||
* UP/DOWN/TAB/SHIFTTAB/ESC: kill focus
|
||||
**default is WVW_CB_KBD_STANDARD (0)
|
||||
* default is WVW_CB_KBD_STANDARD (0)
|
||||
*
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of combobox.
|
||||
* defaults: {-2,-2,+2,+2}
|
||||
* NOTES: the third element (y2) is actually ignored.
|
||||
* height of combobox is always 1 char height
|
||||
* (see also wvw_cbSetFont())
|
||||
*
|
||||
**returns control id of newly created combobox of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created combobox of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
* example:
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_CBCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndCB;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndCB;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
// LONG cnt;
|
||||
LONG numofchars;
|
||||
LONG avgwidth;
|
||||
LONG LongComboWidth, NewLongComboWidth;
|
||||
LONG numofchars;
|
||||
LONG avgwidth;
|
||||
LONG LongComboWidth, NewLongComboWidth;
|
||||
// RECT r;
|
||||
HFONT hFont = hb_gt_wvwGetFont( pWindowData->fontFace, 10, pWindowData->fontWidth, pWindowData->fontWeight, pWindowData->fontQuality, pWindowData->CodePage );
|
||||
HFONT hFont = hb_gt_wvwGetFont( pWindowData->fontFace, 10, pWindowData->fontWidth, pWindowData->fontWeight, pWindowData->fontQuality, pWindowData->CodePage );
|
||||
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
|
||||
UINT uiCBid;
|
||||
USHORT usWidth = ( USHORT ) hb_parni( 4 );
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = usTop,
|
||||
usRight = usLeft + usWidth - 1;
|
||||
USHORT usNumElement = ( USHORT ) ( HB_ISARRAY( 5 ) ? hb_arrayLen( hb_param( 5, HB_IT_ARRAY ) ) : 0 );
|
||||
USHORT usListLines = ( USHORT ) ( HB_ISNUM( 7 ) ? hb_parni( 7 ) : 3 );
|
||||
BYTE byCharHeight = hb_wvw_LineHeight( pWindowData );
|
||||
UINT uiCBid;
|
||||
USHORT usWidth = ( USHORT ) hb_parni( 4 );
|
||||
USHORT usTop = ( USHORT ) hb_parni( 2 ),
|
||||
usLeft = ( USHORT ) hb_parni( 3 ),
|
||||
usBottom = usTop,
|
||||
usRight = usLeft + usWidth - 1;
|
||||
USHORT usNumElement = ( USHORT ) ( HB_ISARRAY( 5 ) ? hb_arrayLen( hb_param( 5, HB_IT_ARRAY ) ) : 0 );
|
||||
USHORT usListLines = ( USHORT ) ( HB_ISNUM( 7 ) ? hb_parni( 7 ) : 3 );
|
||||
BYTE byCharHeight = hb_wvw_LineHeight( pWindowData );
|
||||
|
||||
/* in the future combobox type might be selectable by 8th parameter */
|
||||
int iStyle = CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
BYTE bKbdType = HB_ISNUM( 9 ) ? ( BYTE ) hb_parni( 9 ) : ( BYTE ) WVW_CB_KBD_STANDARD;
|
||||
int iStyle = CBS_DROPDOWNLIST | WS_VSCROLL;
|
||||
BYTE bKbdType = HB_ISNUM( 9 ) ? ( BYTE ) hb_parni( 9 ) : ( BYTE ) WVW_CB_KBD_STANDARD;
|
||||
|
||||
|
||||
if( pWindowData->hCBfont == NULL )
|
||||
@@ -513,26 +513,26 @@ HB_FUNC( WVW_CBCREATE )
|
||||
iOffTop = ! HB_ISNIL( 10 ) ? hb_parvni( 10, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 10 ) ? hb_parvni( 10, 2 ) : 0;
|
||||
|
||||
iOffBottom = usListLines;
|
||||
iOffRight = ! HB_ISNIL( 10 ) ? hb_parvni( 10, 4 ) : 0;
|
||||
iOffBottom = usListLines;
|
||||
iOffRight = ! HB_ISNIL( 10 ) ? hb_parvni( 10, 4 ) : 0;
|
||||
|
||||
if( hb_gt_wvw_GetMainCoordMode() )
|
||||
{
|
||||
hb_wvw_HBFUNCPrologue( usWinNum, &usTop, &usLeft, &usBottom, &usRight );
|
||||
}
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
|
||||
iBottom = xy.y - 1 + ( iOffBottom * byCharHeight );
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
iBottom = xy.y - 1 + ( iOffBottom * byCharHeight );
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
|
||||
uiCBid = LastControlId( usWinNum, WVW_CONTROL_COMBOBOX );
|
||||
uiCBid = LastControlId( usWinNum, WVW_CONTROL_COMBOBOX );
|
||||
if( uiCBid == 0 )
|
||||
{
|
||||
uiCBid = WVW_ID_BASE_COMBOBOX;
|
||||
@@ -561,10 +561,10 @@ HB_FUNC( WVW_CBCREATE )
|
||||
|
||||
if( hWndCB )
|
||||
{
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
WNDPROC OldProc;
|
||||
USHORT i;
|
||||
TCHAR szDefault[] = TEXT( "empty" );
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
WNDPROC OldProc;
|
||||
USHORT i;
|
||||
TCHAR szDefault[] = TEXT( "empty" );
|
||||
|
||||
SendMessage(
|
||||
( HWND ) hWndCB,
|
||||
@@ -621,7 +621,7 @@ HB_FUNC( WVW_CBCREATE )
|
||||
( WPARAM ) TRUE,
|
||||
( LPARAM ) 0
|
||||
);
|
||||
avgwidth = GetFontDialogUnits( hWndParent, hFont );
|
||||
avgwidth = GetFontDialogUnits( hWndParent, hFont );
|
||||
NewLongComboWidth = ( LongComboWidth - 2 ) * avgwidth;
|
||||
SendMessage(
|
||||
( HWND ) hWndCB,
|
||||
@@ -630,11 +630,11 @@ HB_FUNC( WVW_CBCREATE )
|
||||
( LPARAM ) 0
|
||||
);
|
||||
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
|
||||
AddControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, hWndCB, uiCBid, ( PHB_ITEM ) hb_param( 6, HB_IT_BLOCK ), rXB, rOffXB, ( byte ) bKbdType );
|
||||
|
||||
@@ -660,7 +660,7 @@ HB_FUNC( WVW_CBCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_CBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiCBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -673,8 +673,8 @@ HB_FUNC( WVW_CBDESTROY )
|
||||
break;
|
||||
}
|
||||
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -706,10 +706,10 @@ HB_FUNC( WVW_CBDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_CBSETFOCUS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndCB )
|
||||
{
|
||||
@@ -727,10 +727,10 @@ HB_FUNC( WVW_CBSETFOCUS )
|
||||
*/
|
||||
HB_FUNC( WVW_CBISFOCUSED )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
|
||||
hb_retl( ( HWND ) GetFocus() == hWndCB );
|
||||
}
|
||||
@@ -743,12 +743,12 @@ HB_FUNC( WVW_CBISFOCUSED )
|
||||
*/
|
||||
HB_FUNC( WVW_CBENABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiCtrlId = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
BOOL bEnable = HB_ISNIL( 3 ) ? TRUE : hb_parl( 3 );
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
byte bStyle;
|
||||
HWND hWndCB = FindControlHandle( usWinNum, WVW_CONTROL_COMBOBOX, uiCtrlId, &bStyle );
|
||||
|
||||
if( hWndCB )
|
||||
{
|
||||
@@ -772,13 +772,13 @@ HB_FUNC( WVW_CBENABLE )
|
||||
*/
|
||||
HB_FUNC( WVW_CBSETCODEBLOCK )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
UINT uiCBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
PHB_ITEM phiCodeBlock = hb_param( 3, HB_IT_BLOCK );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
BOOL bOldSetting = pData->s_bRecurseCBlock;
|
||||
|
||||
if( ! phiCodeBlock || pcd == NULL || pcd->bBusy )
|
||||
{
|
||||
@@ -787,7 +787,7 @@ HB_FUNC( WVW_CBSETCODEBLOCK )
|
||||
}
|
||||
|
||||
pData->s_bRecurseCBlock = FALSE;
|
||||
pcd->bBusy = TRUE;
|
||||
pcd->bBusy = TRUE;
|
||||
|
||||
if( pcd->phiCodeBlock )
|
||||
{
|
||||
@@ -795,42 +795,42 @@ HB_FUNC( WVW_CBSETCODEBLOCK )
|
||||
|
||||
}
|
||||
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
pcd->phiCodeBlock = hb_itemNew( phiCodeBlock );
|
||||
|
||||
pcd->bBusy = FALSE;
|
||||
pcd->bBusy = FALSE;
|
||||
pData->s_bRecurseCBlock = bOldSetting;
|
||||
|
||||
hb_retl( TRUE );
|
||||
}
|
||||
|
||||
/*WVW_CBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
/* WVW_CBSetFont([nWinNum], cFontFace, nHeight, nWidth, nWeight, nQUality,;
|
||||
* lItalic, lUnderline, lStrikeout
|
||||
*
|
||||
**this will initialize font for ALL comboboxes in window nWinNum
|
||||
**(including ones created later on)
|
||||
* this will initialize font for ALL comboboxes in window nWinNum
|
||||
* (including ones created later on)
|
||||
*
|
||||
**TODO: ? should nHeight be ignored, and always forced to use standard char height?
|
||||
* TODO: ? should nHeight be ignored, and always forced to use standard char height?
|
||||
*/
|
||||
HB_FUNC( WVW_CBSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
|
||||
BOOL retval = TRUE;
|
||||
BOOL retval = TRUE;
|
||||
|
||||
pData->s_lfCB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfCB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfCB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfCB.lfEscapement = 0;
|
||||
pData->s_lfCB.lfOrientation = 0;
|
||||
pData->s_lfCB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfCB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfCB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfCB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfCB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfCB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfCB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfCB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfCB.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfCB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfCB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfCB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfCB.lfEscapement = 0;
|
||||
pData->s_lfCB.lfOrientation = 0;
|
||||
pData->s_lfCB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfCB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfCB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfCB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfCB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfCB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfCB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfCB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfCB.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfCB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfCB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfCB.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfCB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfCB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfCB.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfCB.lfFaceName, hb_parcx( 2 ) );
|
||||
@@ -871,24 +871,24 @@ HB_FUNC( WVW_CBSETFONT )
|
||||
|
||||
}
|
||||
|
||||
/*WVW_CBsetIndex( [nWinNum], nCBid, nIndex )
|
||||
*set current selection of combobox nCBid in window nWinNum to nIndex
|
||||
*(nIndex is 0 based)
|
||||
*returns .t. if successful.
|
||||
/* WVW_CBsetIndex( [nWinNum], nCBid, nIndex )
|
||||
* set current selection of combobox nCBid in window nWinNum to nIndex
|
||||
* (nIndex is 0 based)
|
||||
* returns .t. if successful.
|
||||
*
|
||||
**NOTE: the better name to this function should be WVW_CBsetCurSel()
|
||||
* NOTE: the better name to this function should be WVW_CBsetCurSel()
|
||||
* but that name is already used.
|
||||
* (WVW_CBsetcursel() and WVW_CBaddstring() is NOT related to other
|
||||
* WVW_CB* functions)
|
||||
*/
|
||||
HB_FUNC( WVW_CBSETINDEX )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
int iIndex = hb_parni( 3 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
BOOL retval;
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
int iIndex = hb_parni( 3 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
BOOL retval;
|
||||
|
||||
if( pcd == NULL || iIndex < 0 )
|
||||
{
|
||||
@@ -904,12 +904,12 @@ HB_FUNC( WVW_CBSETINDEX )
|
||||
hb_retl( retval );
|
||||
}
|
||||
|
||||
/*WVW_CBgetIndex( [nWinNum], nCBid )
|
||||
*get current selection of combobox nCBid in window nWinNum
|
||||
*return nIndex (0 based)
|
||||
*returns CB_ERR (-1) if none selected
|
||||
/* WVW_CBgetIndex( [nWinNum], nCBid )
|
||||
* get current selection of combobox nCBid in window nWinNum
|
||||
* return nIndex (0 based)
|
||||
* returns CB_ERR (-1) if none selected
|
||||
*
|
||||
**NOTE: the better name to this function should be WVW_CBgetCurSel()
|
||||
* NOTE: the better name to this function should be WVW_CBgetCurSel()
|
||||
* but that name is potentially misleading to WVW_CBsetCursel
|
||||
* which is not our family of WVW_CB* functions
|
||||
* (WVW_CBsetcursel() and WVW_CBaddstring() is NOT related to other
|
||||
@@ -917,11 +917,11 @@ HB_FUNC( WVW_CBSETINDEX )
|
||||
*/
|
||||
HB_FUNC( WVW_CBGETINDEX )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int retval;
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int retval;
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -937,20 +937,20 @@ HB_FUNC( WVW_CBGETINDEX )
|
||||
hb_retni( retval );
|
||||
}
|
||||
|
||||
/*WVW_CBfindString( [nWinNum], nCBid, cString )
|
||||
*find index of cString in combobox nCBid in window nWinNum
|
||||
*returns index of cString (0 based)
|
||||
*returns CB_ERR (-1) if string not found
|
||||
/* WVW_CBfindString( [nWinNum], nCBid, cString )
|
||||
* find index of cString in combobox nCBid in window nWinNum
|
||||
* returns index of cString (0 based)
|
||||
* returns CB_ERR (-1) if string not found
|
||||
*
|
||||
**NOTE:case insensitive
|
||||
* NOTE:case insensitive
|
||||
*/
|
||||
HB_FUNC( WVW_CBFINDSTRING )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int retval;
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int retval;
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -973,12 +973,12 @@ HB_FUNC( WVW_CBFINDSTRING )
|
||||
*/
|
||||
HB_FUNC( WVW_CBGETCURTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int iCurSel, iTextLen;
|
||||
LPTSTR lptstr = NULL;
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
int iCurSel, iTextLen;
|
||||
LPTSTR lptstr = NULL;
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -1025,11 +1025,11 @@ HB_FUNC( WVW_CBGETCURTEXT )
|
||||
*/
|
||||
HB_FUNC( WVW_CBISDROPPED )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
BOOL bDropped;
|
||||
UINT uiCBid = hb_parni( 2 );
|
||||
CONTROL_DATA * pcd = GetControlData( usWinNum, WVW_CONTROL_COMBOBOX, NULL, uiCBid );
|
||||
BOOL bDropped;
|
||||
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -1047,4 +1047,3 @@ HB_FUNC( WVW_CBISDROPPED )
|
||||
|
||||
|
||||
/* COMBOBOX ends (experimental) */
|
||||
|
||||
|
||||
@@ -88,12 +88,12 @@
|
||||
*/
|
||||
HB_FUNC( WVW_SBCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent;
|
||||
HWND hWndSB;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent;
|
||||
HWND hWndSB;
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
|
||||
if( ! ( pWindowData->hStatusBar == NULL ) )
|
||||
{
|
||||
@@ -101,11 +101,11 @@ HB_FUNC( WVW_SBCREATE )
|
||||
return;
|
||||
}
|
||||
|
||||
hWndParent = pWindowData->hWnd;
|
||||
hWndSB = CreateStatusWindow( WS_CHILD | WS_VISIBLE | WS_BORDER | SBT_TOOLTIPS,
|
||||
NULL,
|
||||
hWndParent,
|
||||
WVW_ID_BASE_STATUSBAR + usWinNum );
|
||||
hWndParent = pWindowData->hWnd;
|
||||
hWndSB = CreateStatusWindow( WS_CHILD | WS_VISIBLE | WS_BORDER | SBT_TOOLTIPS,
|
||||
NULL,
|
||||
hWndParent,
|
||||
WVW_ID_BASE_STATUSBAR + usWinNum );
|
||||
if( hWndSB )
|
||||
{
|
||||
|
||||
@@ -137,8 +137,8 @@ HB_FUNC( WVW_SBCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_SBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
if( ! ( pWindowData->hStatusBar == NULL ) )
|
||||
{
|
||||
@@ -156,31 +156,31 @@ HB_FUNC( WVW_SBDESTROY )
|
||||
}
|
||||
}
|
||||
|
||||
/*WVW_SBaddPart(nWinNum, cMaxText, nWidth, nStyle, lResetParts, [cIcon , cToolTip])
|
||||
*ps.
|
||||
*lResetParts==.t. :: remove all previously created parts
|
||||
*nStyle: 0 (default), 0x0200 (SBT_POPOUT), 0x0100 (SBT_NOBORDERS)
|
||||
*nWidth: expected width in pixels
|
||||
*NOTE: if cMaxText is passed, nWidth is ignored. width of cMaxText will be used instead
|
||||
*NOTE: the leftmost part will eventually have width of remaining spaces
|
||||
*NOTE: cIcon and cToolTip does not work currently
|
||||
/* WVW_SBaddPart(nWinNum, cMaxText, nWidth, nStyle, lResetParts, [cIcon , cToolTip])
|
||||
* ps.
|
||||
* lResetParts==.t. :: remove all previously created parts
|
||||
* nStyle: 0 (default), 0x0200 (SBT_POPOUT), 0x0100 (SBT_NOBORDERS)
|
||||
* nWidth: expected width in pixels
|
||||
* NOTE: if cMaxText is passed, nWidth is ignored. width of cMaxText will be used instead
|
||||
* NOTE: the leftmost part will eventually have width of remaining spaces
|
||||
* NOTE: cIcon and cToolTip does not work currently
|
||||
*
|
||||
**returns number of parts
|
||||
**returns 0 if failed
|
||||
* returns number of parts
|
||||
* returns 0 if failed
|
||||
*/
|
||||
HB_FUNC( WVW_SBADDPART )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndSB;
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
int numOfParts;
|
||||
int n;
|
||||
RECT rSB = { 0 };
|
||||
WORD displayFlags;
|
||||
HICON hIcon;
|
||||
BOOL lResetParts;
|
||||
USHORT usWidth;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndSB;
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
int numOfParts;
|
||||
int n;
|
||||
RECT rSB = { 0 };
|
||||
WORD displayFlags;
|
||||
HICON hIcon;
|
||||
BOOL lResetParts;
|
||||
USHORT usWidth;
|
||||
|
||||
hWndSB = pWindowData->hStatusBar;
|
||||
if( hWndSB == NULL )
|
||||
@@ -189,14 +189,14 @@ HB_FUNC( WVW_SBADDPART )
|
||||
return;
|
||||
}
|
||||
|
||||
displayFlags = HB_ISNIL( 4 ) ? 0 : ( WORD ) hb_parnl( 4 );
|
||||
lResetParts = ! HB_ISNIL( 5 ) && hb_parl( 5 );
|
||||
usWidth = HB_ISNIL( 3 ) || hb_parni( 3 ) <= 0 ? 5 * WVW_SPACE_BETWEEN_PARTS : ( USHORT ) hb_parni( 3 );
|
||||
displayFlags = HB_ISNIL( 4 ) ? 0 : ( WORD ) hb_parnl( 4 );
|
||||
lResetParts = ! HB_ISNIL( 5 ) && hb_parl( 5 );
|
||||
usWidth = HB_ISNIL( 3 ) || hb_parni( 3 ) <= 0 ? 5 * WVW_SPACE_BETWEEN_PARTS : ( USHORT ) hb_parni( 3 );
|
||||
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
HDC hDCSB = GetDC( hWndSB );
|
||||
SIZE size = { 0 };
|
||||
HDC hDCSB = GetDC( hWndSB );
|
||||
SIZE size = { 0 };
|
||||
|
||||
HFONT hFont = ( HFONT ) SendMessage( hWndSB, WM_GETFONT, ( WPARAM ) 0, ( LPARAM ) 0 );
|
||||
HFONT hOldFont = ( HFONT ) SelectObject( hDCSB, hFont );
|
||||
@@ -237,8 +237,8 @@ HB_FUNC( WVW_SBADDPART )
|
||||
|
||||
if( ! HB_ISNIL( 6 ) )
|
||||
{
|
||||
int cy = rSB.bottom - rSB.top - 4;
|
||||
int cx = cy;
|
||||
int cy = rSB.bottom - rSB.top - 4;
|
||||
int cx = cy;
|
||||
|
||||
hIcon = ( HICON ) LoadImage( 0, hb_parcx( 6 ), IMAGE_ICON, cx, cy, LR_LOADFROMFILE | LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT | LR_DEFAULTSIZE );
|
||||
|
||||
@@ -271,14 +271,14 @@ HB_FUNC( WVW_SBADDPART )
|
||||
*/
|
||||
HB_FUNC( WVW_SBREFRESH )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndSB;
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
int numOfParts;
|
||||
int n;
|
||||
int iDiff;
|
||||
RECT rSB = { 0 };
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndSB;
|
||||
int ptArray[ WVW_MAX_STATUS_PARTS ];
|
||||
int numOfParts;
|
||||
int n;
|
||||
int iDiff;
|
||||
RECT rSB = { 0 };
|
||||
|
||||
hWndSB = pWindowData->hStatusBar;
|
||||
if( hWndSB == NULL )
|
||||
@@ -312,9 +312,9 @@ HB_FUNC( WVW_SBREFRESH )
|
||||
*/
|
||||
HB_FUNC( WVW_SBSETTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iPart = HB_ISNIL( 2 ) ? 1 : hb_parni( 2 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iPart = HB_ISNIL( 2 ) ? 1 : hb_parni( 2 );
|
||||
|
||||
if( ! HB_ISNIL( 4 ) )
|
||||
{
|
||||
@@ -347,10 +347,10 @@ HB_FUNC( WVW_SBSETTEXT )
|
||||
*/
|
||||
HB_FUNC( WVW_SBGETTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iPart = HB_ISNIL( 2 ) ? 1 : hb_parni( 2 );
|
||||
char cString[ 1024 ] = "";
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iPart = HB_ISNIL( 2 ) ? 1 : hb_parni( 2 );
|
||||
char cString[ 1024 ] = "";
|
||||
|
||||
SendMessage( pWindowData->hStatusBar, SB_GETTEXT, ( WPARAM ) iPart, ( LPARAM ) cString );
|
||||
hb_retc( cString );
|
||||
@@ -361,9 +361,9 @@ HB_FUNC( WVW_SBGETTEXT )
|
||||
*/
|
||||
HB_FUNC( WVW_SBGETPARTS )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int numOfParts = ( int ) SendMessage( pWindowData->hStatusBar, SB_GETPARTS, WVW_MAX_STATUS_PARTS, 0 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int numOfParts = ( int ) SendMessage( pWindowData->hStatusBar, SB_GETPARTS, WVW_MAX_STATUS_PARTS, 0 );
|
||||
|
||||
hb_retni( numOfParts );
|
||||
}
|
||||
@@ -374,25 +374,25 @@ HB_FUNC( WVW_SBGETPARTS )
|
||||
*/
|
||||
HB_FUNC( WVW_SBSETFONT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
WVW_DATA * pData = hb_getWvwData();
|
||||
|
||||
BOOL retval = TRUE;
|
||||
BOOL retval = TRUE;
|
||||
|
||||
|
||||
pData->s_lfSB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfSB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfSB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfSB.lfEscapement = 0;
|
||||
pData->s_lfSB.lfOrientation = 0;
|
||||
pData->s_lfSB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfSB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfSB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfSB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfSB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfSB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfSB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfSB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfSB.lfCharSet = DEFAULT_CHARSET;
|
||||
pData->s_lfSB.lfHeight = HB_ISNIL( 3 ) ? pWindowData->fontHeight - 2 : hb_parnl( 3 );
|
||||
pData->s_lfSB.lfWidth = HB_ISNIL( 4 ) ? pData->s_lfSB.lfWidth : hb_parni( 4 );
|
||||
pData->s_lfSB.lfEscapement = 0;
|
||||
pData->s_lfSB.lfOrientation = 0;
|
||||
pData->s_lfSB.lfWeight = HB_ISNIL( 5 ) ? pData->s_lfSB.lfWeight : hb_parni( 5 );
|
||||
pData->s_lfSB.lfItalic = HB_ISNIL( 7 ) ? pData->s_lfSB.lfItalic : ( BYTE ) hb_parl( 7 );
|
||||
pData->s_lfSB.lfUnderline = HB_ISNIL( 8 ) ? pData->s_lfSB.lfUnderline : ( BYTE ) hb_parl( 8 );
|
||||
pData->s_lfSB.lfStrikeOut = HB_ISNIL( 9 ) ? pData->s_lfSB.lfStrikeOut : ( BYTE ) hb_parl( 9 );
|
||||
pData->s_lfSB.lfCharSet = DEFAULT_CHARSET;
|
||||
|
||||
pData->s_lfSB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfSB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfSB.lfPitchAndFamily = FF_DONTCARE;
|
||||
pData->s_lfSB.lfQuality = HB_ISNIL( 6 ) ? pData->s_lfSB.lfQuality : ( BYTE ) hb_parni( 6 );
|
||||
pData->s_lfSB.lfPitchAndFamily = FF_DONTCARE;
|
||||
if( HB_ISCHAR( 2 ) )
|
||||
{
|
||||
strcpy( pData->s_lfSB.lfFaceName, hb_parcx( 2 ) );
|
||||
@@ -427,14 +427,14 @@ HB_FUNC( WVW_SBSETFONT )
|
||||
* horiz: defaults to one character height
|
||||
* verti: defaults to one character _height_ too (!)
|
||||
* use aOffset to adjust the dimension
|
||||
**aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* aOffset: array {y1,x1,y2,x2} of offsets to corner pixels, to adjust
|
||||
* dimension of scroll bar.
|
||||
* defaults for vertical scroll bar: {0,+3,0,0}
|
||||
* defaults for horiz scroll bar: {+3-linespacing,0,0,0}
|
||||
* NOTES: these defaults are meant to make room for other common
|
||||
* GUI elements like raised/recessed lines.
|
||||
*
|
||||
**bBlock: codeblock to execute on every WM_VSCROLL/WM_HSCROLL event.
|
||||
* bBlock: codeblock to execute on every WM_VSCROLL/WM_HSCROLL event.
|
||||
* This codeblock will be evaluated with these parameters:
|
||||
* nWinNum: window number
|
||||
* nXBid : scrollbar id
|
||||
@@ -450,40 +450,40 @@ HB_FUNC( WVW_SBSETFONT )
|
||||
* SB_THUMBTRACK 5: scroll thumb is being dragged at position nXBpos
|
||||
* SB_ENDSCROLL 8
|
||||
*
|
||||
**returns control id of newly created scroll bar of windows nWinNum
|
||||
**returns 0 if failed
|
||||
* returns control id of newly created scroll bar of windows nWinNum
|
||||
* returns 0 if failed
|
||||
*
|
||||
**example:
|
||||
**WVW_XBcreate( , 1, 10, 70, 12)
|
||||
* example:
|
||||
* WVW_XBcreate( , 1, 10, 70, 12)
|
||||
* :: creates Vertical scrollbar on current window at (10,70) with length 12
|
||||
* dimensions using default ones.
|
||||
* buttons/parts behaviour using default ones.
|
||||
*
|
||||
**WVW_XBcreate( , 1, 10, 70, 12, {0, +5, 0, +5} )
|
||||
* WVW_XBcreate( , 1, 10, 70, 12, {0, +5, 0, +5} )
|
||||
* :: creates Vertical scrollbar on current window at (10,70) with length 12
|
||||
* left and right coordinate is shifted 5 pixels to the right.
|
||||
* buttons/parts behaviour using default ones.
|
||||
*
|
||||
**NOTES:
|
||||
**ScrollRange is always 0 - 100.
|
||||
**Initial ScrollPos is 0
|
||||
* NOTES:
|
||||
* ScrollRange is always 0 - 100.
|
||||
* Initial ScrollPos is 0
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_XBCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndXB;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
int iStyle = ( int ) ( ! HB_ISNUM( 2 ) ? -1 : hb_parni( 2 ) );
|
||||
UINT uiXBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 3 ),
|
||||
usLeft = ( USHORT ) hb_parni( 4 ),
|
||||
usBottom,
|
||||
usRight;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndXB;
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
int iOffTop, iOffLeft, iOffBottom, iOffRight;
|
||||
int iStyle = ( int ) ( ! HB_ISNUM( 2 ) ? -1 : hb_parni( 2 ) );
|
||||
UINT uiXBid;
|
||||
USHORT usTop = ( USHORT ) hb_parni( 3 ),
|
||||
usLeft = ( USHORT ) hb_parni( 4 ),
|
||||
usBottom,
|
||||
usRight;
|
||||
|
||||
if( iStyle < SBS_HORZ || iStyle > SBS_VERT || ! HB_ISBLOCK( 6 ) )
|
||||
{
|
||||
@@ -493,23 +493,23 @@ HB_FUNC( WVW_XBCREATE )
|
||||
|
||||
if( iStyle == SBS_VERT )
|
||||
{
|
||||
usBottom = usTop + ( USHORT ) hb_parni( 5 ) - 1;
|
||||
usRight = usLeft;
|
||||
usBottom = usTop + ( USHORT ) hb_parni( 5 ) - 1;
|
||||
usRight = usLeft;
|
||||
|
||||
iOffTop = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 2 ) : +3;
|
||||
iOffBottom = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 4 ) : 0;
|
||||
iOffTop = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 1 ) : 0;
|
||||
iOffLeft = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 2 ) : +3;
|
||||
iOffBottom = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 4 ) : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
usRight = usLeft + ( USHORT ) hb_parni( 5 ) - 1;
|
||||
usBottom = usTop;
|
||||
usRight = usLeft + ( USHORT ) hb_parni( 5 ) - 1;
|
||||
usBottom = usTop;
|
||||
|
||||
iOffTop = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 1 ) : +3 - pWindowData->byLineSpacing;
|
||||
iOffLeft = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 4 ) : 0;
|
||||
iOffTop = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 1 ) : +3 - pWindowData->byLineSpacing;
|
||||
iOffLeft = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 2 ) : 0;
|
||||
iOffBottom = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 3 ) : 0;
|
||||
iOffRight = ! HB_ISNIL( 7 ) ? hb_parvni( 7, 4 ) : 0;
|
||||
}
|
||||
|
||||
if( hb_gt_wvw_GetMainCoordMode() )
|
||||
@@ -521,19 +521,19 @@ HB_FUNC( WVW_XBCREATE )
|
||||
iTop = xy.y + iOffTop;
|
||||
iLeft = xy.x + iOffLeft;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
xy.y -= pWindowData->byLineSpacing;
|
||||
|
||||
if( iStyle == SBS_VERT )
|
||||
{
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = iLeft + pWindowData->PTEXTSIZE.y - 1 + iOffRight;
|
||||
iBottom = xy.y - 1 + iOffBottom;
|
||||
iRight = iLeft + pWindowData->PTEXTSIZE.y - 1 + iOffRight;
|
||||
}
|
||||
else
|
||||
{
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
iBottom = iTop + pWindowData->PTEXTSIZE.y - 1 + iOffBottom;
|
||||
iRight = xy.x - 1 + iOffRight;
|
||||
iBottom = iTop + pWindowData->PTEXTSIZE.y - 1 + iOffBottom;
|
||||
}
|
||||
|
||||
uiXBid = LastControlId( usWinNum, WVW_CONTROL_SCROLLBAR );
|
||||
@@ -564,14 +564,14 @@ HB_FUNC( WVW_XBCREATE )
|
||||
if( hWndXB )
|
||||
{
|
||||
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
RECT rXB = { 0 }, rOffXB = { 0 };
|
||||
|
||||
WNDPROC OldProc;
|
||||
WNDPROC OldProc;
|
||||
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
rXB.top = usTop; rXB.left = usLeft;
|
||||
rXB.bottom = usBottom; rXB.right = usRight;
|
||||
rOffXB.top = iOffTop; rOffXB.left = iOffLeft;
|
||||
rOffXB.bottom = iOffBottom; rOffXB.right = iOffRight;
|
||||
|
||||
SetScrollRange( hWndXB, SB_CTL, 0, 99, FALSE );
|
||||
SetScrollPos( hWndXB, SB_CTL, 0, TRUE );
|
||||
@@ -597,7 +597,7 @@ HB_FUNC( WVW_XBCREATE )
|
||||
*/
|
||||
HB_FUNC( WVW_XBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
CONTROL_DATA * pcd = pWindowData->pcdCtrlList;
|
||||
@@ -610,8 +610,8 @@ HB_FUNC( WVW_XBDESTROY )
|
||||
break;
|
||||
}
|
||||
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
pcdPrev = pcd;
|
||||
pcd = pcd->pNext;
|
||||
}
|
||||
if( pcd == NULL )
|
||||
{
|
||||
@@ -647,18 +647,18 @@ HB_FUNC( WVW_XBDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_XBUPDATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
int iPos = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
int iPage = ( int ) ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) );
|
||||
int iMin = ( int ) ( HB_ISNIL( 5 ) ? 0 : hb_parni( 5 ) );
|
||||
int iMax = ( int ) ( HB_ISNIL( 6 ) ? 0 : hb_parni( 6 ) );
|
||||
SCROLLINFO si;
|
||||
int iRetval;
|
||||
UINT fMask = SIF_DISABLENOSCROLL;
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
int iPos = ( int ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
int iPage = ( int ) ( HB_ISNIL( 4 ) ? 0 : hb_parni( 4 ) );
|
||||
int iMin = ( int ) ( HB_ISNIL( 5 ) ? 0 : hb_parni( 5 ) );
|
||||
int iMax = ( int ) ( HB_ISNIL( 6 ) ? 0 : hb_parni( 6 ) );
|
||||
SCROLLINFO si;
|
||||
int iRetval;
|
||||
UINT fMask = SIF_DISABLENOSCROLL;
|
||||
|
||||
if( uiXBid == 0 || hWndXB == NULL || iPage < 0 )
|
||||
{
|
||||
@@ -679,16 +679,16 @@ HB_FUNC( WVW_XBUPDATE )
|
||||
fMask = fMask | SIF_RANGE;
|
||||
}
|
||||
|
||||
si.cbSize = sizeof( si );
|
||||
si.fMask = fMask;
|
||||
si.nMin = iMin;
|
||||
si.nMax = iMax;
|
||||
si.nPage = ( UINT ) iPage;
|
||||
si.nPos = iPos;
|
||||
iRetval = SetScrollInfo( hWndXB,
|
||||
SB_CTL,
|
||||
( LPCSCROLLINFO ) &si,
|
||||
TRUE );
|
||||
si.cbSize = sizeof( si );
|
||||
si.fMask = fMask;
|
||||
si.nMin = iMin;
|
||||
si.nMax = iMax;
|
||||
si.nPage = ( UINT ) iPage;
|
||||
si.nPos = iPos;
|
||||
iRetval = SetScrollInfo( hWndXB,
|
||||
SB_CTL,
|
||||
( LPCSCROLLINFO ) &si,
|
||||
TRUE );
|
||||
|
||||
hb_retni( iRetval );
|
||||
}
|
||||
@@ -699,13 +699,13 @@ HB_FUNC( WVW_XBUPDATE )
|
||||
*/
|
||||
HB_FUNC( WVW_XBINFO )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
PHB_ITEM aInfo;
|
||||
SCROLLINFO si;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
PHB_ITEM aInfo;
|
||||
SCROLLINFO si;
|
||||
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
|
||||
if( uiXBid == 0 || hWndXB == NULL )
|
||||
{
|
||||
@@ -716,8 +716,8 @@ HB_FUNC( WVW_XBINFO )
|
||||
return;
|
||||
}
|
||||
|
||||
si.cbSize = sizeof( si );
|
||||
si.fMask = SIF_ALL;
|
||||
si.cbSize = sizeof( si );
|
||||
si.fMask = SIF_ALL;
|
||||
|
||||
if( ! GetScrollInfo( hWndXB, SB_CTL, &si ) )
|
||||
{
|
||||
@@ -738,22 +738,22 @@ HB_FUNC( WVW_XBINFO )
|
||||
hb_itemReturnRelease( aInfo );
|
||||
}
|
||||
|
||||
/*WVW_XBenable( [nWinNum], nXBid, nFlags )
|
||||
*enable/disable scrollbar nXBid in window nWinNum (default to topmost window)
|
||||
*nFlags: ESB_ENABLE_BOTH 0: enable both arrows
|
||||
/* WVW_XBenable( [nWinNum], nXBid, nFlags )
|
||||
* enable/disable scrollbar nXBid in window nWinNum (default to topmost window)
|
||||
* nFlags: ESB_ENABLE_BOTH 0: enable both arrows
|
||||
* ESB_DISABLE_LEFT/ESB_DISABLE_UP 1: disable left/up arrow
|
||||
* ESB_DISABLE_RIGHT/ESB_DISABLE_DOWN 2: disable right/down arrow
|
||||
* ESB_DISABLE_BOTH 3: disable both arrow
|
||||
**returns .t. if successful
|
||||
* returns .t. if successful
|
||||
*/
|
||||
HB_FUNC( WVW_XBENABLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
UINT uiFlags = ( UINT ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = uiXBid == 0 ? NULL : FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
UINT uiFlags = ( UINT ) ( HB_ISNIL( 3 ) ? 0 : hb_parni( 3 ) );
|
||||
byte bStyle;
|
||||
HWND hWndXB = uiXBid == 0 ? NULL : FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
|
||||
if( uiXBid == 0 || hWndXB == NULL || uiFlags > ESB_DISABLE_BOTH )
|
||||
{
|
||||
@@ -764,20 +764,20 @@ HB_FUNC( WVW_XBENABLE )
|
||||
hb_retl( EnableScrollBar( hWndXB, SB_CTL, uiFlags ) );
|
||||
}
|
||||
|
||||
/*WVW_XBshow( [nWinNum], nXBid, lShow )
|
||||
*show/hide scrollbar nXBid in window nWinNum (default to topmost window)
|
||||
*nXBid is the handle of the scrolbar
|
||||
*lShow: .T. shows the scrolbar (default)
|
||||
/* WVW_XBshow( [nWinNum], nXBid, lShow )
|
||||
* show/hide scrollbar nXBid in window nWinNum (default to topmost window)
|
||||
* nXBid is the handle of the scrolbar
|
||||
* lShow: .T. shows the scrolbar (default)
|
||||
* .F. hides the scrolbar
|
||||
**returns .t. if successful
|
||||
* returns .t. if successful
|
||||
*/
|
||||
HB_FUNC( WVW_XBSHOW )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
BOOL bShow = ( BOOL ) ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : TRUE );
|
||||
byte bStyle;
|
||||
HWND hWndXB = uiXBid == 0 ? NULL : FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
UINT uiXBid = ( UINT ) ( HB_ISNIL( 2 ) ? 0 : hb_parni( 2 ) );
|
||||
BOOL bShow = ( BOOL ) ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : TRUE );
|
||||
byte bStyle;
|
||||
HWND hWndXB = uiXBid == 0 ? NULL : FindControlHandle( usWinNum, WVW_CONTROL_SCROLLBAR, uiXBid, &bStyle );
|
||||
|
||||
if( uiXBid == 0 || hWndXB == NULL )
|
||||
{
|
||||
@@ -790,4 +790,3 @@ HB_FUNC( WVW_XBSHOW )
|
||||
|
||||
|
||||
/* SCROLLBAR ends */
|
||||
|
||||
|
||||
@@ -83,22 +83,22 @@
|
||||
*nStyle: toolbar style, defaults to TBSTYLE_FLAT | TBSTYLE_TOOLTIPS
|
||||
*nSystemBitmap: 0:none, 1:small, 2:large (defaults: 1)
|
||||
* small=16x16 large=24x24
|
||||
**nImageWidth/Height are in effect only if nSystemBitmap==0
|
||||
* nImageWidth/Height are in effect only if nSystemBitmap==0
|
||||
*/
|
||||
HB_FUNC( WVW_TBCREATE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndTB;
|
||||
int iMaxTextRows = ( int ) ( HB_ISNIL( 2 ) ? 0 : ( hb_parl( 2 ) ? 1 : 0 ) );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndParent = pWindowData->hWnd;
|
||||
HWND hWndTB;
|
||||
int iMaxTextRows = ( int ) ( HB_ISNIL( 2 ) ? 0 : ( hb_parl( 2 ) ? 1 : 0 ) );
|
||||
// DWORD dwStyle = (DWORD) ( HB_ISNIL( 3 ) ? TBSTYLE_FLAT | TBSTYLE_TOOLTIPS : hb_parni( 3 ) );
|
||||
DWORD dwStyle = ( DWORD ) ( HB_ISNIL( 3 ) ? TBSTYLE_ALTDRAG | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | TBSTYLE_TRANSPARENT | TBSTYLE_WRAPABLE : hb_parnl( 3 ) );
|
||||
DWORD dwStyle = ( DWORD ) ( HB_ISNIL( 3 ) ? TBSTYLE_ALTDRAG | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS | TBSTYLE_TRANSPARENT | TBSTYLE_WRAPABLE : hb_parnl( 3 ) );
|
||||
|
||||
int iSystemBitmap = ( int ) ( HB_ISNIL( 4 ) ? 1 : hb_parni( 4 ) );
|
||||
int iImageWidth = ( int ) ( iSystemBitmap == 0 && HB_ISNUM( 5 ) ? hb_parni( 5 ) : -1 );
|
||||
int iImageHeight = ( int ) ( iSystemBitmap == 0 && HB_ISNUM( 6 ) ? hb_parni( 6 ) : -1 );
|
||||
TBADDBITMAP tbab = { 0 };
|
||||
int iSystemBitmap = ( int ) ( HB_ISNIL( 4 ) ? 1 : hb_parni( 4 ) );
|
||||
int iImageWidth = ( int ) ( iSystemBitmap == 0 && HB_ISNUM( 5 ) ? hb_parni( 5 ) : -1 );
|
||||
int iImageHeight = ( int ) ( iSystemBitmap == 0 && HB_ISNUM( 6 ) ? hb_parni( 6 ) : -1 );
|
||||
TBADDBITMAP tbab = { 0 };
|
||||
|
||||
InitCommonControls();
|
||||
|
||||
@@ -128,13 +128,13 @@ HB_FUNC( WVW_TBCREATE )
|
||||
switch( iSystemBitmap )
|
||||
{
|
||||
case 1:
|
||||
iImageHeight = 16;
|
||||
iImageHeight = 16;
|
||||
break;
|
||||
case 2:
|
||||
iImageHeight = 24;
|
||||
iImageHeight = 24;
|
||||
break;
|
||||
default:
|
||||
iImageHeight = iImageWidth;
|
||||
iImageHeight = iImageWidth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -165,15 +165,15 @@ HB_FUNC( WVW_TBCREATE )
|
||||
|
||||
if( iSystemBitmap > 0 )
|
||||
{
|
||||
tbab.hInst = HINST_COMMCTRL;
|
||||
tbab.hInst = HINST_COMMCTRL;
|
||||
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_STD_SMALL_COLOR : IDB_STD_LARGE_COLOR;
|
||||
pWindowData->iStartStdBitmap = SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 0, ( WPARAM ) &tbab );
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_STD_SMALL_COLOR : IDB_STD_LARGE_COLOR;
|
||||
pWindowData->iStartStdBitmap = SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 0, ( WPARAM ) &tbab );
|
||||
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_VIEW_SMALL_COLOR : IDB_VIEW_LARGE_COLOR;
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_VIEW_SMALL_COLOR : IDB_VIEW_LARGE_COLOR;
|
||||
pWindowData->iStartViewBitmap = SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 0, ( WPARAM ) &tbab );
|
||||
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_HIST_SMALL_COLOR : IDB_HIST_LARGE_COLOR;
|
||||
tbab.nID = iSystemBitmap == 1 ? IDB_HIST_SMALL_COLOR : IDB_HIST_LARGE_COLOR;
|
||||
pWindowData->iStartHistBitmap = SendMessage( hWndTB, TB_ADDBITMAP, ( WPARAM ) 0, ( WPARAM ) &tbab );
|
||||
}
|
||||
else
|
||||
@@ -183,8 +183,8 @@ HB_FUNC( WVW_TBCREATE )
|
||||
pWindowData->iStartHistBitmap = 0;
|
||||
}
|
||||
|
||||
pWindowData->iTBImgWidth = iImageWidth;
|
||||
pWindowData->iTBImgHeight = iImageHeight;
|
||||
pWindowData->iTBImgWidth = iImageWidth;
|
||||
pWindowData->iTBImgHeight = iImageHeight;
|
||||
|
||||
SendMessage( hWndTB, TB_SETMAXTEXTROWS, ( WPARAM ) iMaxTextRows, ( LPARAM ) 0 );
|
||||
|
||||
@@ -207,39 +207,39 @@ HB_FUNC( WVW_TBCREATE )
|
||||
|
||||
/*WVW_TBAddButton([nWinNum], nCommand, xBitmap, cLabel, nBitmapType,;
|
||||
* lMap3Dcolors, lDropdown)
|
||||
**adds one button on the right of existing buttons
|
||||
**xBitmap:
|
||||
**nBitmap is resource id. or use cBitmap as bitmap file name.
|
||||
**(bitmap from resources cannot have > 256 colors)
|
||||
* adds one button on the right of existing buttons
|
||||
* xBitmap:
|
||||
* nBitmap is resource id. or use cBitmap as bitmap file name.
|
||||
* (bitmap from resources cannot have > 256 colors)
|
||||
*
|
||||
**cLabel: if lDisplayText, it will be displayed below the bitmap
|
||||
* otherwise it will be used as tooltip
|
||||
**nBitmapType: 0:custom, 1:system std bitmap, 2:system view bitmap, 3:system hist bitmap
|
||||
**lMap3Dcolors: defaults to .f.
|
||||
* (meaningfull for custom bitmap only)
|
||||
* if .t. the following color mapping will be performed:
|
||||
* RGB(192,192,192) --> COLOR_3DFACE ("transparent")
|
||||
* RGB(128,128,128) --> COLOR_3DSHADOW
|
||||
* RGB(223,223,223) --> COLOR_3DLIGHT
|
||||
* This might be desirable to have transparent effect.
|
||||
* LIMITATION: this will work on 256 colored bitmaps only
|
||||
* cLabel: if lDisplayText, it will be displayed below the bitmap
|
||||
* otherwise it will be used as tooltip
|
||||
* nBitmapType: 0:custom, 1:system std bitmap, 2:system view bitmap, 3:system hist bitmap
|
||||
* lMap3Dcolors: defaults to .f.
|
||||
* (meaningfull for custom bitmap only)
|
||||
* if .t. the following color mapping will be performed:
|
||||
* RGB(192,192,192) --> COLOR_3DFACE ("transparent")
|
||||
* RGB(128,128,128) --> COLOR_3DSHADOW
|
||||
* RGB(223,223,223) --> COLOR_3DLIGHT
|
||||
* This might be desirable to have transparent effect.
|
||||
* LIMITATION: this will work on 256 colored bitmaps only
|
||||
*/
|
||||
|
||||
HB_FUNC( WVW_TBADDBUTTON )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iCommand = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iCommand = HB_ISNIL( 2 ) ? 0 : hb_parni( 2 );
|
||||
|
||||
char * szBitmap = HB_ISCHAR( 3 ) ? ( char * ) hb_parcx( 3 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 3 ) ? ( UINT ) hb_parni( 3 ) : 0;
|
||||
char * szBitmap = HB_ISCHAR( 3 ) ? ( char * ) hb_parcx( 3 ) : NULL;
|
||||
UINT uiBitmap = HB_ISNUM( 3 ) ? ( UINT ) hb_parni( 3 ) : 0;
|
||||
|
||||
char * szLabel = HB_ISNIL( 4 ) ? ( char * ) "" : ( char * ) hb_parcx( 4 );
|
||||
int iBitmapType = HB_ISNIL( 5 ) ? 0 : ( int ) hb_parni( 5 );
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 6 ) ? hb_parl( 6 ) : FALSE;
|
||||
BOOL bDropdown = HB_ISLOG( 7 ) ? hb_parl( 7 ) : FALSE;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
char * szLabel = HB_ISNIL( 4 ) ? ( char * ) "" : ( char * ) hb_parcx( 4 );
|
||||
int iBitmapType = HB_ISNIL( 5 ) ? 0 : ( int ) hb_parni( 5 );
|
||||
BOOL bMap3Dcolors = HB_ISLOG( 6 ) ? hb_parl( 6 ) : FALSE;
|
||||
BOOL bDropdown = HB_ISLOG( 7 ) ? hb_parl( 7 ) : FALSE;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
|
||||
hWndTB = pWindowData->hToolBar;
|
||||
if( hWndTB == NULL )
|
||||
@@ -302,9 +302,9 @@ HB_FUNC( WVW_TBADDBUTTON )
|
||||
*/
|
||||
HB_FUNC( WVW_TBBUTTONCOUNT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB;
|
||||
|
||||
hWndTB = pWindowData->hToolBar;
|
||||
if( hWndTB == NULL )
|
||||
@@ -323,11 +323,11 @@ HB_FUNC( WVW_TBBUTTONCOUNT )
|
||||
*/
|
||||
HB_FUNC( WVW_TBDELBUTTON )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
|
||||
hWndTB = pWindowData->hToolBar;
|
||||
if( hWndTB == NULL || iButton < 0 )
|
||||
@@ -359,15 +359,15 @@ HB_FUNC( WVW_TBDELBUTTON )
|
||||
*/
|
||||
HB_FUNC( WVW_TBGETBUTTONRECT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
HWND hWndTB;
|
||||
RECT rc;
|
||||
RECT rcRect = { 0 };
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
HWND hWndTB;
|
||||
RECT rc;
|
||||
RECT rcRect = { 0 };
|
||||
|
||||
PHB_ITEM aXY = hb_itemNew( NULL );
|
||||
PHB_ITEM temp;
|
||||
PHB_ITEM aXY = hb_itemNew( NULL );
|
||||
PHB_ITEM temp;
|
||||
|
||||
hWndTB = pWindowData->hToolBar;
|
||||
if( hWndTB == NULL || iButton < 0 || ! SendMessage( hWndTB, TB_GETRECT, ( WPARAM ) iButton, ( LPARAM ) &rc ) )
|
||||
@@ -401,13 +401,13 @@ HB_FUNC( WVW_TBGETBUTTONRECT )
|
||||
*/
|
||||
HB_FUNC( WVW_TBENABLEBUTTON )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
BOOL bEnable = HB_ISLOG( 3 ) ? hb_parl( 3 ) : TRUE;
|
||||
int iCommand;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iButton = HB_ISNUM( 2 ) ? hb_parni( 2 ) : -1;
|
||||
BOOL bEnable = HB_ISLOG( 3 ) ? hb_parl( 3 ) : TRUE;
|
||||
int iCommand;
|
||||
HWND hWndTB;
|
||||
USHORT usOldHeight;
|
||||
|
||||
hWndTB = pWindowData->hToolBar;
|
||||
if( hWndTB == NULL || iButton < 0 )
|
||||
@@ -446,8 +446,8 @@ HB_FUNC( WVW_TBENABLEBUTTON )
|
||||
*/
|
||||
HB_FUNC( WVW_TBDESTROY )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
if( ! ( pWindowData->hToolBar == NULL ) )
|
||||
{
|
||||
@@ -465,11 +465,11 @@ HB_FUNC( WVW_TBDESTROY )
|
||||
*/
|
||||
HB_FUNC( WVW_TBINDEX2CMD )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB = pWindowData->hToolBar;
|
||||
int iIndex = hb_parni( 2 );
|
||||
int iCmd = IndexToCommand( hWndTB, iIndex );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB = pWindowData->hToolBar;
|
||||
int iIndex = hb_parni( 2 );
|
||||
int iCmd = IndexToCommand( hWndTB, iIndex );
|
||||
|
||||
hb_retni( ( int ) ( iCmd > 0 ? iCmd : -1 ) );
|
||||
}
|
||||
@@ -480,10 +480,10 @@ HB_FUNC( WVW_TBINDEX2CMD )
|
||||
*/
|
||||
HB_FUNC( WVW_TBCMD2INDEX )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB = pWindowData->hToolBar;
|
||||
int iCmd = hb_parni( 2 );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
HWND hWndTB = pWindowData->hToolBar;
|
||||
int iCmd = hb_parni( 2 );
|
||||
|
||||
hb_retni( CommandToIndex( hWndTB, iCmd ) );
|
||||
}
|
||||
@@ -505,10 +505,10 @@ HB_FUNC( WVW_TBCMD2INDEX )
|
||||
/*WVW_SetToolTopActive([nWinNum], [lToggle]) */
|
||||
HB_FUNC( WVW_SETTOOLTIPACTIVE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
BOOL bActive = pWindowData->bToolTipActive;
|
||||
BOOL bActive = pWindowData->bToolTipActive;
|
||||
|
||||
if( ! HB_ISNIL( 2 ) )
|
||||
{
|
||||
@@ -530,17 +530,17 @@ HB_FUNC( WVW_SETTOOLTIPACTIVE )
|
||||
/* */
|
||||
HB_FUNC( WVW_SETTOOLTIP )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
TOOLINFO ti = { 0 };
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
TOOLINFO ti = { 0 };
|
||||
POINT xy = { 0 };
|
||||
int iTop, iLeft, iBottom, iRight;
|
||||
|
||||
USHORT usTop = hb_parni( 2 ),
|
||||
usLeft = hb_parni( 3 ),
|
||||
usBottom = hb_parni( 4 ),
|
||||
usRight = hb_parni( 5 );
|
||||
USHORT usTop = hb_parni( 2 ),
|
||||
usLeft = hb_parni( 3 ),
|
||||
usBottom = hb_parni( 4 ),
|
||||
usRight = hb_parni( 5 );
|
||||
|
||||
if( ! pWindowData->bToolTipActive )
|
||||
{
|
||||
@@ -552,19 +552,19 @@ HB_FUNC( WVW_SETTOOLTIP )
|
||||
hb_wvw_HBFUNCPrologue( usWinNum, &usTop, &usLeft, &usBottom, &usRight );
|
||||
}
|
||||
|
||||
ti.cbSize = sizeof( TOOLINFO );
|
||||
ti.hwnd = pWindowData->hWnd;
|
||||
ti.uId = WVW_ID_BASE_TOOLTIP + usWinNum;
|
||||
ti.cbSize = sizeof( TOOLINFO );
|
||||
ti.hwnd = pWindowData->hWnd;
|
||||
ti.uId = WVW_ID_BASE_TOOLTIP + usWinNum;
|
||||
|
||||
if( SendMessage( pWindowData->hWndTT, TTM_GETTOOLINFO, 0, ( LPARAM ) &ti ) )
|
||||
{
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y;
|
||||
iLeft = xy.x;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usLeft, usTop );
|
||||
iTop = xy.y;
|
||||
iLeft = xy.x;
|
||||
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
iBottom = xy.y - 1;
|
||||
iRight = xy.x - 1;
|
||||
xy = hb_gt_wvwGetXYFromColRow( pWindowData, usRight + 1, usBottom + 1 );
|
||||
iBottom = xy.y - 1;
|
||||
iRight = xy.x - 1;
|
||||
|
||||
ti.lpszText = hb_parc( 6 );
|
||||
ti.rect.left = iLeft;
|
||||
@@ -580,13 +580,13 @@ HB_FUNC( WVW_SETTOOLTIP )
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPTEXT )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
TOOLINFO ti;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
TOOLINFO ti;
|
||||
|
||||
ti.cbSize = sizeof( TOOLINFO );
|
||||
ti.hwnd = pWindowData->hWnd;
|
||||
ti.uId = 100000;
|
||||
ti.cbSize = sizeof( TOOLINFO );
|
||||
ti.hwnd = pWindowData->hWnd;
|
||||
ti.uId = 100000;
|
||||
|
||||
if( SendMessage( pWindowData->hWndTT, TTM_GETTOOLINFO, 0, ( LPARAM ) &ti ) )
|
||||
{
|
||||
@@ -599,24 +599,24 @@ HB_FUNC( WVW_SETTOOLTIPTEXT )
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPMARGIN )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
RECT rc = { 0 };
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
RECT rc = { 0 };
|
||||
|
||||
rc.left = hb_parni( 3 );
|
||||
rc.top = hb_parni( 2 );
|
||||
rc.right = hb_parni( 5 );
|
||||
rc.bottom = hb_parni( 4 );
|
||||
rc.left = hb_parni( 3 );
|
||||
rc.top = hb_parni( 2 );
|
||||
rc.right = hb_parni( 5 );
|
||||
rc.bottom = hb_parni( 4 );
|
||||
|
||||
SendMessage( pWindowData->hWndTT, TTM_SETMARGIN, 0, ( LPARAM ) &rc );
|
||||
}
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPWIDTH )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
int iTipWidth = SendMessage( pWindowData->hWndTT, TTM_GETMAXTIPWIDTH, 0, 0 );
|
||||
int iTipWidth = SendMessage( pWindowData->hWndTT, TTM_GETMAXTIPWIDTH, 0, 0 );
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
{
|
||||
@@ -630,10 +630,10 @@ HB_FUNC( WVW_SETTOOLTIPWIDTH )
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPBKCOLOR )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
COLORREF cr = SendMessage( pWindowData->hWndTT, TTM_GETTIPBKCOLOR, 0, 0 );
|
||||
COLORREF cr = SendMessage( pWindowData->hWndTT, TTM_GETTIPBKCOLOR, 0, 0 );
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
{
|
||||
@@ -646,10 +646,10 @@ HB_FUNC( WVW_SETTOOLTIPBKCOLOR )
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPTEXTCOLOR )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
COLORREF cr = SendMessage( pWindowData->hWndTT, TTM_GETTIPTEXTCOLOR, 0, 0 );
|
||||
COLORREF cr = SendMessage( pWindowData->hWndTT, TTM_GETTIPTEXTCOLOR, 0, 0 );
|
||||
|
||||
if( HB_ISNUM( 2 ) )
|
||||
{
|
||||
@@ -662,9 +662,9 @@ HB_FUNC( WVW_SETTOOLTIPTEXTCOLOR )
|
||||
|
||||
HB_FUNC( WVW_SETTOOLTIPTITLE )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iIcon;
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
int iIcon;
|
||||
|
||||
if( ! HB_ISNIL( 3 ) )
|
||||
{
|
||||
@@ -681,8 +681,8 @@ HB_FUNC( WVW_SETTOOLTIPTITLE )
|
||||
|
||||
HB_FUNC( WVW_GETTOOLTIPWIDTH )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
hb_retni( SendMessage( pWindowData->hWndTT, TTM_GETMAXTIPWIDTH, 0, 0 ) );
|
||||
}
|
||||
@@ -691,8 +691,8 @@ HB_FUNC( WVW_GETTOOLTIPWIDTH )
|
||||
|
||||
HB_FUNC( WVW_GETTOOLTIPBKCOLOR )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
hb_retnl( ( COLORREF ) SendMessage( pWindowData->hWndTT, TTM_GETTIPBKCOLOR, 0, 0 ) );
|
||||
}
|
||||
@@ -701,8 +701,8 @@ HB_FUNC( WVW_GETTOOLTIPBKCOLOR )
|
||||
|
||||
HB_FUNC( WVW_GETTOOLTIPTEXTCOLOR )
|
||||
{
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
UINT usWinNum = WVW_WHICH_WINDOW;
|
||||
WIN_DATA * pWindowData = hb_gt_wvw_GetWindowsData( usWinNum );
|
||||
|
||||
hb_retnl( ( COLORREF ) SendMessage( pWindowData->hWndTT, TTM_GETTIPTEXTCOLOR, 0, 0 ) );
|
||||
}
|
||||
|
||||
@@ -47,8 +47,8 @@ HB_FUNC( LIBUSB_SET_DEBUG )
|
||||
/* Returns a list of USB devcices attached to your system. */
|
||||
HB_FUNC( LIBUSB_GET_DEVICE_LIST )
|
||||
{
|
||||
libusb_device ** devicelist;
|
||||
ssize_t count;
|
||||
libusb_device ** devicelist;
|
||||
ssize_t count;
|
||||
|
||||
count = libusb_get_device_list( ( libusb_context * ) hb_parptr( 1 ), &devicelist );
|
||||
|
||||
@@ -66,11 +66,11 @@ HB_FUNC( LIBUSB_FREE_DEVICE_LIST )
|
||||
/* Gets the number of the bus that a device is attached to. */
|
||||
HB_FUNC( LIBUSB_GET_BUS_NUMBER )
|
||||
{
|
||||
uint8_t busnumber;
|
||||
libusb_device ** devicelist;
|
||||
uint8_t busnumber;
|
||||
libusb_device ** devicelist;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
busnumber = libusb_get_bus_number( devicelist[ hb_parni( 2 ) ] );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
busnumber = libusb_get_bus_number( devicelist[ hb_parni( 2 ) ] );
|
||||
|
||||
hb_retni( busnumber );
|
||||
}
|
||||
@@ -78,11 +78,11 @@ HB_FUNC( LIBUSB_GET_BUS_NUMBER )
|
||||
/* Gets the address on the bus that a device is attached to. */
|
||||
HB_FUNC( LIBUSB_GET_DEVICE_ADDRESS )
|
||||
{
|
||||
uint8_t deviceaddress;
|
||||
libusb_device ** devicelist;
|
||||
uint8_t deviceaddress;
|
||||
libusb_device ** devicelist;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
deviceaddress = libusb_get_device_address( devicelist[ hb_parni( 2 ) ] );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
deviceaddress = libusb_get_device_address( devicelist[ hb_parni( 2 ) ] );
|
||||
|
||||
hb_retni( deviceaddress );
|
||||
}
|
||||
@@ -105,11 +105,11 @@ HB_FUNC( LIBUSB_GET_DEVICE_SPEED )
|
||||
/* Gets the maximum packet size for a particular endpoint in the active device configuration. */
|
||||
HB_FUNC( LIBUSB_GET_MAX_PACKET_SIZE )
|
||||
{
|
||||
int maxpacketsize;
|
||||
libusb_device ** devicelist;
|
||||
int maxpacketsize;
|
||||
libusb_device ** devicelist;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
maxpacketsize = libusb_get_max_packet_size( devicelist[ hb_parni( 2 ) ], ( unsigned char ) hb_parni( 3 ) );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
maxpacketsize = libusb_get_max_packet_size( devicelist[ hb_parni( 2 ) ], ( unsigned char ) hb_parni( 3 ) );
|
||||
|
||||
hb_retni( maxpacketsize );
|
||||
}
|
||||
@@ -117,11 +117,11 @@ HB_FUNC( LIBUSB_GET_MAX_PACKET_SIZE )
|
||||
/* Increments the reference count of a device. */
|
||||
HB_FUNC( LIBUSB_REF_DEVICE )
|
||||
{
|
||||
libusb_device * device;
|
||||
libusb_device ** devicelist;
|
||||
libusb_device * device;
|
||||
libusb_device ** devicelist;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
device = libusb_ref_device( devicelist[ hb_parni( 2 ) ] );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
device = libusb_ref_device( devicelist[ hb_parni( 2 ) ] );
|
||||
|
||||
HB_SYMBOL_UNUSED( device );
|
||||
}
|
||||
@@ -138,12 +138,12 @@ HB_FUNC( LIBUSB_UNREF_DEVICE )
|
||||
/* Open a device and obtain a device handle */
|
||||
HB_FUNC( LIBUSB_OPEN )
|
||||
{
|
||||
int success;
|
||||
libusb_device_handle * handle;
|
||||
libusb_device ** devicelist;
|
||||
int success;
|
||||
libusb_device_handle * handle;
|
||||
libusb_device ** devicelist;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
success = libusb_open( devicelist[ hb_parni( 2 ) ], &handle );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
success = libusb_open( devicelist[ hb_parni( 2 ) ], &handle );
|
||||
|
||||
hb_storptr( success == 0 ? handle : NULL, 3 );
|
||||
|
||||
@@ -182,8 +182,8 @@ HB_FUNC( LIBUSB_GET_CONFIGURATION )
|
||||
int configuration;
|
||||
int success;
|
||||
|
||||
configuration = 0;
|
||||
success = libusb_get_configuration( ( libusb_device_handle * ) hb_parptr( 1 ), &configuration );
|
||||
configuration = 0;
|
||||
success = libusb_get_configuration( ( libusb_device_handle * ) hb_parptr( 1 ), &configuration );
|
||||
|
||||
hb_storni( success == 0 ? configuration : 0, 2 );
|
||||
|
||||
@@ -282,12 +282,12 @@ HB_FUNC( LIBUSB_ATTACH_KERNEL_DRIVER )
|
||||
/* Get the USB descriptor for a given device. */
|
||||
HB_FUNC( LIBUSB_GET_DEVICE_DESCRIPTOR )
|
||||
{
|
||||
struct libusb_device_descriptor desc;
|
||||
libusb_device ** devicelist;
|
||||
int success;
|
||||
struct libusb_device_descriptor desc;
|
||||
libusb_device ** devicelist;
|
||||
int success;
|
||||
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
success = libusb_get_device_descriptor( devicelist[ hb_parni( 2 ) ], &desc );
|
||||
devicelist = ( libusb_device ** ) hb_parptr( 1 );
|
||||
success = libusb_get_device_descriptor( devicelist[ hb_parni( 2 ) ], &desc );
|
||||
|
||||
hb_storptr( &desc, 3 );
|
||||
hb_storni( desc.idVendor, 4 );
|
||||
@@ -302,9 +302,9 @@ HB_FUNC( LIBUSB_GET_DEVICE_DESCRIPTOR )
|
||||
/* Perform a USB bulk transfer. */
|
||||
HB_FUNC( LIBUSB_BULK_TRANSFER )
|
||||
{
|
||||
int success;
|
||||
unsigned char data[ 512 ];
|
||||
int transferred;
|
||||
int success;
|
||||
unsigned char data[ 512 ];
|
||||
int transferred;
|
||||
|
||||
success = libusb_bulk_transfer( ( libusb_device_handle * ) hb_parptr( 1 ), ( unsigned char ) hb_parni( 2 ), data, sizeof( data ), &transferred, hb_parni( 3 ) );
|
||||
|
||||
@@ -317,9 +317,9 @@ HB_FUNC( LIBUSB_BULK_TRANSFER )
|
||||
/* Perform a USB interrupt transfer. */
|
||||
HB_FUNC( LIBUSB_INTERRUPT_TRANSFER )
|
||||
{
|
||||
int success;
|
||||
unsigned char data[ 512 ];
|
||||
int transferred;
|
||||
int success;
|
||||
unsigned char data[ 512 ];
|
||||
int transferred;
|
||||
|
||||
success = libusb_interrupt_transfer( ( libusb_device_handle * ) hb_parptr( 1 ), ( unsigned char ) hb_parni( 2 ), data, sizeof( data ), &transferred, hb_parni( 3 ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user