mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:22:58 +00:00
reform the code.
less warings and errors in vc svn path=/trunk/; revision=27757
This commit is contained in:
parent
f57c2b81f4
commit
7fd0ba2791
1 changed files with 25 additions and 22 deletions
|
@ -505,20 +505,20 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
PCLIPBOARDCHAINELEMENT w = NULL;
|
PCLIPBOARDCHAINELEMENT w = NULL;
|
||||||
|
PWINDOW_OBJECT removeWindow;
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
PWINDOW_OBJECT removeWindow = UserGetWindowObject(hWndRemove);
|
removeWindow = UserGetWindowObject(hWndRemove);
|
||||||
|
|
||||||
if (removeWindow)
|
if (removeWindow)
|
||||||
{
|
{
|
||||||
if ((ret = !!IntIsWindowInChain(removeWindow)))
|
if ((ret = !!IntIsWindowInChain(removeWindow)))
|
||||||
{
|
{
|
||||||
w = IntRemoveWindowFromChain(removeWindow);
|
w = IntRemoveWindowFromChain(removeWindow);
|
||||||
if (w)
|
if (w)
|
||||||
{
|
{
|
||||||
ExFreePool(w);
|
ExFreePool(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -526,9 +526,10 @@ NtUserChangeClipboardChain(HWND hWndRemove, HWND hWndNewNext)
|
||||||
{
|
{
|
||||||
// only send message to the first window in the chain,
|
// only send message to the first window in the chain,
|
||||||
// then they do the chain
|
// then they do the chain
|
||||||
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->hSelf);
|
|
||||||
/* WindowsChain->window may be NULL */
|
/* WindowsChain->window may be NULL */
|
||||||
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->hSelf;
|
LPARAM lparam = WindowsChain->window == NULL ? 0 : (LPARAM)WindowsChain->window->hSelf;
|
||||||
|
DPRINT1("Message: WM_CHANGECBCHAIN to %p", WindowsChain->window->hSelf);
|
||||||
co_IntSendMessage(WindowsChain->window->hSelf, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
|
co_IntSendMessage(WindowsChain->window->hSelf, WM_CHANGECBCHAIN, (WPARAM)hWndRemove, lparam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,7 +816,7 @@ NtUserGetClipboardViewer(VOID)
|
||||||
INT STDCALL
|
INT STDCALL
|
||||||
NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
|
NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats)
|
||||||
{
|
{
|
||||||
UINT i;
|
INT i;
|
||||||
UINT *priorityList;
|
UINT *priorityList;
|
||||||
INT ret = 0;
|
INT ret = 0;
|
||||||
|
|
||||||
|
@ -983,10 +984,11 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
|
||||||
INT ret;
|
INT ret;
|
||||||
BITMAP bm;
|
BITMAP bm;
|
||||||
BITMAPINFO bi;
|
BITMAPINFO bi;
|
||||||
|
BITMAPOBJ *BitmapObj;
|
||||||
|
|
||||||
hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE);
|
hdc = UserGetDCEx(NULL, NULL, DCX_USESTYLE);
|
||||||
|
|
||||||
BITMAPOBJ *BitmapObj;
|
|
||||||
BitmapObj = BITMAPOBJ_LockBitmap(hMem);
|
BitmapObj = BITMAPOBJ_LockBitmap(hMem);
|
||||||
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (LPSTR)&bm);
|
BITMAP_GetObject(BitmapObj, sizeof(BITMAP), (LPSTR)&bm);
|
||||||
if(BitmapObj)
|
if(BitmapObj)
|
||||||
|
@ -994,16 +996,16 @@ NtUserSetClipboardData(UINT uFormat, HANDLE hMem, DWORD size)
|
||||||
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
BITMAPOBJ_UnlockBitmap(BitmapObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||||
bi.bmiHeader.biWidth = bm.bmWidth;
|
bi.bmiHeader.biWidth = bm.bmWidth;
|
||||||
bi.bmiHeader.biHeight = bm.bmHeight;
|
bi.bmiHeader.biHeight = bm.bmHeight;
|
||||||
bi.bmiHeader.biPlanes = 1;
|
bi.bmiHeader.biPlanes = 1;
|
||||||
bi.bmiHeader.biBitCount = bm.bmPlanes * bm.bmBitsPixel;
|
bi.bmiHeader.biBitCount = bm.bmPlanes * bm.bmBitsPixel;
|
||||||
bi.bmiHeader.biCompression = BI_RGB;
|
bi.bmiHeader.biCompression = BI_RGB;
|
||||||
bi.bmiHeader.biSizeImage = 0;
|
bi.bmiHeader.biSizeImage = 0;
|
||||||
bi.bmiHeader.biXPelsPerMeter = 0;
|
bi.bmiHeader.biXPelsPerMeter = 0;
|
||||||
bi.bmiHeader.biYPelsPerMeter = 0;
|
bi.bmiHeader.biYPelsPerMeter = 0;
|
||||||
bi.bmiHeader.biClrUsed = 0;
|
bi.bmiHeader.biClrUsed = 0;
|
||||||
|
|
||||||
ret = NtGdiGetDIBits(hdc, hMem, 0, bm.bmHeight, NULL, &bi, DIB_RGB_COLORS);
|
ret = NtGdiGetDIBits(hdc, hMem, 0, bm.bmHeight, NULL, &bi, DIB_RGB_COLORS);
|
||||||
|
|
||||||
|
@ -1068,10 +1070,11 @@ NtUserSetClipboardViewer(HWND hWndNewViewer)
|
||||||
{
|
{
|
||||||
HWND ret = NULL;
|
HWND ret = NULL;
|
||||||
PCLIPBOARDCHAINELEMENT newWC = NULL;
|
PCLIPBOARDCHAINELEMENT newWC = NULL;
|
||||||
|
PWINDOW_OBJECT window;
|
||||||
|
|
||||||
UserEnterExclusive();
|
UserEnterExclusive();
|
||||||
|
|
||||||
PWINDOW_OBJECT window = UserGetWindowObject(hWndNewViewer);
|
window = UserGetWindowObject(hWndNewViewer);
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue