Fix to use the correct definition of DwmDefWindowProc

This commit is contained in:
Ritchie Swann 2024-08-11 10:51:05 +01:00 committed by Rachael Alexanderson
parent 42c64e438f
commit d17bde151f
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0

View file

@ -34,14 +34,13 @@
BOOL DwmDefWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult )
{
typedef LRESULT(* dwmdwp)(HWND, UINT, WPARAM, LPARAM );
typedef LRESULT(* dwmdwp)(HWND, UINT, WPARAM, LPARAM, LRESULT* );
BOOL result(FALSE);
HMODULE module = LoadLibrary( _T( "dwmapi.dll" ) );
if( module ) {
dwmdwp proc = reinterpret_cast<dwmdwp>( GetProcAddress( module, "DwmDefWindowProc" ) );
if( proc ) {
*plResult = proc( hWnd, msg, wParam, lParam );
result = TRUE;
result = proc( hWnd, msg, wParam, lParam, plResult );
}
FreeLibrary(module);
}