mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-01-11 18:41:14 +00:00
Implement SetWindowPos (#98)
This commit is contained in:
parent
4ada014dfd
commit
d58ce5e9a9
@ -16,7 +16,7 @@
|
|||||||
#define CALLBACK
|
#define CALLBACK
|
||||||
#define FAR
|
#define FAR
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
#define HWND_NOTOPMOST (HWND) - 2
|
#define HWND_NOTOPMOST -2
|
||||||
#define RGB(r, g, b) ((r) | ((g) << 8) | ((b) << 16))
|
#define RGB(r, g, b) ((r) | ((g) << 8) | ((b) << 16))
|
||||||
#define S_OK ((HRESULT) 0)
|
#define S_OK ((HRESULT) 0)
|
||||||
#define E_NOINTERFACE (0x80004002)
|
#define E_NOINTERFACE (0x80004002)
|
||||||
@ -147,10 +147,7 @@ struct IUnknown {
|
|||||||
int m_refCount;
|
int m_refCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline BOOL SetWindowPos(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
|
BOOL SetWindowPos(HWND hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags);
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline HDC WINAPI GetDC(HWND hWnd)
|
inline HDC WINAPI GetDC(HWND hWnd)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -24,6 +24,27 @@ HRESULT IUnknown::QueryInterface(const GUID& riid, void** ppvObject)
|
|||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL SetWindowPos(HWND hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
|
||||||
|
{
|
||||||
|
if (!hWnd) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(uFlags & SWP_NOACTIVATE)) {
|
||||||
|
SDL_RaiseWindow(hWnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(uFlags & SWP_NOSIZE)) {
|
||||||
|
SDL_SetWindowSize(hWnd, cx, cy);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(uFlags & SWP_NOMOVE)) {
|
||||||
|
SDL_SetWindowPosition(hWnd, X, Y);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
VOID WINAPI Sleep(DWORD dwMilliseconds)
|
VOID WINAPI Sleep(DWORD dwMilliseconds)
|
||||||
{
|
{
|
||||||
SDL_Delay(dwMilliseconds);
|
SDL_Delay(dwMilliseconds);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user