Skip to content

Commit

Permalink
2023-11-11 19:42 UTC+0100 Phil Krylov (phil a t krylov.eu)
Browse files Browse the repository at this point in the history
  * contrib/gtwvg/gtwvg.h
  * contrib/gtwvg/wvgcore.c
  * contrib/gtwvg/wvgutils.c
  * contrib/gtwvg/wvgwing.c
  * contrib/hbwin/wapi_winuser_dlg.c
    ! Minor 64-bit Win32 API fixes.
  • Loading branch information
tuffnatty committed Nov 11, 2023
1 parent 2ed5940 commit bf13b6f
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
8 changes: 8 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */

2023-11-11 20:05 UTC+0100 Phil Krylov (phil a t krylov.eu)
* contrib/gtwvg/gtwvg.h
* contrib/gtwvg/wvgcore.c
* contrib/gtwvg/wvgutils.c
* contrib/gtwvg/wvgwing.c
* contrib/hbwin/wapi_winuser_dlg.c
! Minor 64-bit Win32 API fixes.

2023-11-11 19:42 UTC+0100 Phil Krylov (phil a t krylov.eu)
* config/win/mingw.mk
* utils/hbmk2/hbmk2.prg
Expand Down
4 changes: 2 additions & 2 deletions contrib/gtwvg/gtwvg.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ extern HB_EXPORT void hb_wvt_PutStringAttrib( int top, int left, int bo

extern HB_EXPORT LPWORD lpwAlign( LPWORD lpIn );
extern HB_EXPORT int nCopyAnsiToWideChar( LPWORD lpWCStr, LPCSTR lpAnsiIn );
extern HB_EXPORT BOOL CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );
extern HB_EXPORT BOOL CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );
extern HB_EXPORT INT_PTR CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );
extern HB_EXPORT INT_PTR CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam );

extern HB_EXPORT void hb_wvt_wvtCore( void );
extern HB_EXPORT void hb_wvt_wvtUtils( void );
Expand Down
4 changes: 2 additions & 2 deletions contrib/gtwvg/wvgcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ POINT hb_wvt_gtGetXYFromColRow( int col, int row )
* Modeless Dialogs Implementation
*/

BOOL CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
INT_PTR CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();

Expand Down Expand Up @@ -391,7 +391,7 @@ BOOL CALLBACK hb_wvt_gtDlgProcMLess( HWND hDlg, UINT message, WPARAM wParam, LPA
return lReturn;
}

BOOL CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
INT_PTR CALLBACK hb_wvt_gtDlgProcModal( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
PHB_GTWVT _s = hb_wvt_gtGetWVT();

Expand Down
12 changes: 6 additions & 6 deletions contrib/gtwvg/wvgutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ HB_FUNC( WVT_CREATEDIALOGDYNAMIC )
hDlg = CreateDialog( ( HINSTANCE ) wvg_hInstance(),
HB_PARSTR( 1, &hTemplate, NULL ),
hb_parl( 2 ) ? _s->hWnd : NULL,
( DLGPROC ) hb_wvt_gtDlgProcMLess );
hb_wvt_gtDlgProcMLess );
hb_strfree( hTemplate );
}
break;
Expand All @@ -889,15 +889,15 @@ HB_FUNC( WVT_CREATEDIALOGDYNAMIC )
hDlg = CreateDialog( ( HINSTANCE ) wvg_hInstance(),
MAKEINTRESOURCE( ( WORD ) hb_parni( 1 ) ),
hb_parl( 2 ) ? _s->hWnd : NULL,
( DLGPROC ) hb_wvt_gtDlgProcMLess );
hb_wvt_gtDlgProcMLess );
break;

case 2:
/* argument 1 is already unicode compliant, so no conversion */
hDlg = CreateDialogIndirect( ( HINSTANCE ) wvg_hInstance(),
( LPDLGTEMPLATE ) hb_parc( 1 ),
hb_parl( 2 ) ? _s->hWnd : NULL,
( DLGPROC ) hb_wvt_gtDlgProcMLess );
hb_wvt_gtDlgProcMLess );
break;
}
}
Expand Down Expand Up @@ -990,7 +990,7 @@ HB_FUNC( WVT_CREATEDIALOGMODAL )
iResult = DialogBoxParam( ( HINSTANCE ) wvg_hInstance(),
HB_PARSTR( 1, &hTemplate, NULL ),
hParent,
( DLGPROC ) hb_wvt_gtDlgProcModal,
hb_wvt_gtDlgProcModal,
( LPARAM ) ( DWORD ) iIndex + 1 );
hb_strfree( hTemplate );
}
Expand All @@ -1000,7 +1000,7 @@ HB_FUNC( WVT_CREATEDIALOGMODAL )
iResult = DialogBoxParam( ( HINSTANCE ) wvg_hInstance(),
MAKEINTRESOURCE( ( WORD ) hb_parni( 1 ) ),
hParent,
( DLGPROC ) hb_wvt_gtDlgProcModal,
hb_wvt_gtDlgProcModal,
( LPARAM ) ( DWORD ) iIndex + 1 );
break;

Expand All @@ -1009,7 +1009,7 @@ HB_FUNC( WVT_CREATEDIALOGMODAL )
iResult = DialogBoxIndirectParam( ( HINSTANCE ) wvg_hInstance(),
( LPDLGTEMPLATE ) hb_parc( 1 ),
hParent,
( DLGPROC ) hb_wvt_gtDlgProcModal,
hb_wvt_gtDlgProcModal,
( LPARAM ) ( DWORD ) iIndex + 1 );
break;
}
Expand Down
4 changes: 2 additions & 2 deletions contrib/gtwvg/wvgwing.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ PHB_ITEM wvg_logfontTOarray( LPLOGFONT lf, HB_BOOL bEmpty )

/* An Alternative to WndProc Callbacks */

BOOL CALLBACK WvgDialogProcChooseFont( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
UINT_PTR CALLBACK WvgDialogProcChooseFont( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
HB_BOOL bret = HB_FALSE;
HB_BOOL binit = HB_FALSE;
Expand Down Expand Up @@ -862,7 +862,7 @@ HB_FUNC( WVG_CHOOSEFONT )
cf.rgbColors = RGB( 0, 0, 0 );

cf.lCustData = ( HB_PTRUINT ) hb_param( 2, HB_IT_BLOCK );
cf.lpfnHook = ( LPCFHOOKPROC ) WvgDialogProcChooseFont;
cf.lpfnHook = WvgDialogProcChooseFont;

cf.lpTemplateName = ( LPTSTR ) NULL;
cf.hInstance = ( HINSTANCE ) NULL;
Expand Down
4 changes: 2 additions & 2 deletions contrib/hbwin/wapi_winuser_dlg.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

/* Application-defined callback used with the CreateDialog and DialogBox... It
processes messages sent to a modal or modeless dialog box. */
static BOOL CALLBACK wapi_DialogFuncProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
static INT_PTR CALLBACK wapi_DialogFuncProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam )
{
PHB_SYMB pSymbol;

Expand Down Expand Up @@ -94,7 +94,7 @@ HB_FUNC( WAPI_DIALOGBOXPARAM )
hbwapi_par_raw_HINSTANCE( 1 ), /* hInstance */
( LPCTSTR ) MAKEINTRESOURCE( hbwapi_par_INT( 2 ) ), /* lpTemplate */
hbwapi_par_raw_HWND( 3 ), /* hWndParent */
( DLGPROC ) wapi_DialogFuncProc, /* lpDialogFunc */
wapi_DialogFuncProc, /* lpDialogFunc */
( LPARAM ) hb_itemGetSymbol( hb_param( 4, HB_IT_SYMBOL ) ) /* dwInitParam */
);

Expand Down

0 comments on commit bf13b6f

Please sign in to comment.