diff --git a/ChangeLog.txt b/ChangeLog.txt index 0a49ec3cdd..a5518eeb29 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 diff --git a/contrib/gtwvg/gtwvg.h b/contrib/gtwvg/gtwvg.h index b37fd6b8e5..7bbde60abe 100644 --- a/contrib/gtwvg/gtwvg.h +++ b/contrib/gtwvg/gtwvg.h @@ -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 ); diff --git a/contrib/gtwvg/wvgcore.c b/contrib/gtwvg/wvgcore.c index 4ae6e77d38..9cb6987711 100644 --- a/contrib/gtwvg/wvgcore.c +++ b/contrib/gtwvg/wvgcore.c @@ -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(); @@ -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(); diff --git a/contrib/gtwvg/wvgutils.c b/contrib/gtwvg/wvgutils.c index c00fa1e541..4c99bd4652 100644 --- a/contrib/gtwvg/wvgutils.c +++ b/contrib/gtwvg/wvgutils.c @@ -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; @@ -889,7 +889,7 @@ 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: @@ -897,7 +897,7 @@ HB_FUNC( WVT_CREATEDIALOGDYNAMIC ) hDlg = CreateDialogIndirect( ( HINSTANCE ) wvg_hInstance(), ( LPDLGTEMPLATE ) hb_parc( 1 ), hb_parl( 2 ) ? _s->hWnd : NULL, - ( DLGPROC ) hb_wvt_gtDlgProcMLess ); + hb_wvt_gtDlgProcMLess ); break; } } @@ -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 ); } @@ -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; @@ -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; } diff --git a/contrib/gtwvg/wvgwing.c b/contrib/gtwvg/wvgwing.c index 4bfa09fea9..1734b81b3a 100644 --- a/contrib/gtwvg/wvgwing.c +++ b/contrib/gtwvg/wvgwing.c @@ -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; @@ -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; diff --git a/contrib/hbwin/wapi_winuser_dlg.c b/contrib/hbwin/wapi_winuser_dlg.c index ef24f0e174..838777942b 100644 --- a/contrib/hbwin/wapi_winuser_dlg.c +++ b/contrib/hbwin/wapi_winuser_dlg.c @@ -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; @@ -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 */ );