extend qt platform plugin
Hello all,
is it possible to extend the platform plugin(instead of re-write most of them...)?
my project only needs some access to the native handle in windows.
Ive seen the source that the QWindowsNativeInterface has only implemented HWND and DC.
To my project i need some other Handles like Font and Cursor.
Thank you.
Re: extend qt platform plugin
Yes, that is possible.
Qt's source should be part of whatever download you used and it is available in a public git repository.
Cheers,
_
Re: extend qt platform plugin
There should be no need to extend the platform plugin. Once you have the HWND or HDC, you can use Windows API calls to get what you want:
Code:
HFONT hFont = (HFONT)( ::SendMessage( hWnd, WM_GETFONT, 0, 0 ) );
HGDIOBJ GetCurrentObject( HDC hdc, UINT uObjectType );
HCURSOR WINAPI GetCursor(void);
Re: extend qt platform plugin
Quote:
Originally Posted by
d_stranz
There should be no need to extend the platform plugin. Once you have the HWND or HDC, you can use Windows API calls to get what you want:
Code:
HFONT hFont = (HFONT)( ::SendMessage( hWnd, WM_GETFONT, 0, 0 ) );
HGDIOBJ GetCurrentObject( HDC hdc, UINT uObjectType );
HCURSOR WINAPI GetCursor(void);
:) Thx, this sounds good.