Commit 69249675 authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

Fixed, added or implemented stubs:

- DrawMenuBarTemp(): corrected parameter count. - CallCPLEntry16(): stub. - SetSysColorsTemp(): fully implemented (hopefully) this undocumented function.
parent 3169072b
...@@ -3978,10 +3978,16 @@ BOOL WINAPI DrawMenuBar( HWND hWnd ) ...@@ -3978,10 +3978,16 @@ BOOL WINAPI DrawMenuBar( HWND hWnd )
/*********************************************************************** /***********************************************************************
* DrawMenuBarTemp (USER32.@) * DrawMenuBarTemp (USER32.@)
*
* UNDOCUMENTED !!
*
* called by W98SE desk.cpl Control Panel Applet
*
* Not 100% sure about the param names, but close.
*/ */
DWORD WINAPI DrawMenuBarTemp(DWORD p1, DWORD p2) DWORD WINAPI DrawMenuBarTemp(HWND someHWND, HDC someHDC, LPRECT someRECT, HMENU someHMENU, HFONT someFONT)
{ {
FIXME("(%08lx %08lx): stub\n", p1, p2); FIXME("(0x%08x, 0x%08x, %p, 0x%08x, 0x%08x): stub\n", someHWND, someHDC, someRECT, someHMENU, someFONT);
return 0; return 0;
} }
......
...@@ -377,10 +377,21 @@ HRESULT WINAPI Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWOR ...@@ -377,10 +377,21 @@ HRESULT WINAPI Control_FillCache_RunDLL(HWND hWnd, HANDLE hModule, DWORD w, DWOR
/************************************************************************* /*************************************************************************
* RunDLL_CallEntry16 [SHELL32.122] * RunDLL_CallEntry16 [SHELL32.122]
* the name is propably wrong * the name is probably wrong
*/ */
HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z) HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z)
{ {
FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",v,w,x,y,z); FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",v,w,x,y,z);
return 0; return 0;
} }
/*
* called by desk.cpl on "Advanced" with:
* hMod("DeskCp16.Dll"), pFunc("CplApplet"), 0, 1, 0xc, 0
*
*/
DWORD WINAPI CallCPLEntry16(HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6)
{
FIXME("(%04x, %p, %08lx, %08lx, %08lx, %08lx): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6);
return 0x0deadbee;
}
...@@ -171,7 +171,7 @@ debug_channels (exec pidl shell shlctrl) ...@@ -171,7 +171,7 @@ debug_channels (exec pidl shell shlctrl)
163 stdcall StrToOleStr (wstr str) StrToOleStrAW 163 stdcall StrToOleStr (wstr str) StrToOleStrAW
164 stdcall Win32DeleteFile(str) Win32DeleteFile 164 stdcall Win32DeleteFile(str) Win32DeleteFile
165 stdcall SHCreateDirectory(long long) SHCreateDirectory 165 stdcall SHCreateDirectory(long long) SHCreateDirectory
166 stub CallCPLEntry16 166 stdcall CallCPLEntry16(long long long long long long) CallCPLEntry16
167 stdcall SHAddFromPropSheetExtArray(long long long) SHAddFromPropSheetExtArray 167 stdcall SHAddFromPropSheetExtArray(long long long) SHAddFromPropSheetExtArray
168 stdcall SHCreatePropSheetExtArray(long str long) SHCreatePropSheetExtArray 168 stdcall SHCreatePropSheetExtArray(long str long) SHCreatePropSheetExtArray
169 stdcall SHDestroyPropSheetExtArray(long) SHDestroyPropSheetExtArray 169 stdcall SHDestroyPropSheetExtArray(long) SHDestroyPropSheetExtArray
......
...@@ -520,7 +520,7 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri ...@@ -520,7 +520,7 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
@ stdcall SetScrollRange(long long long long long) SetScrollRange @ stdcall SetScrollRange(long long long long long) SetScrollRange
@ stdcall SetShellWindow(long) SetShellWindow @ stdcall SetShellWindow(long) SetShellWindow
@ stdcall SetSysColors(long ptr ptr) SetSysColors @ stdcall SetSysColors(long ptr ptr) SetSysColors
@ stdcall SetSysColorsTemp(long ptr ptr) SetSysColorsTemp @ stdcall SetSysColorsTemp(ptr ptr long) SetSysColorsTemp
@ stdcall SetSystemCursor(long long) SetSystemCursor @ stdcall SetSystemCursor(long long) SetSystemCursor
@ stdcall SetSystemMenu(long long) SetSystemMenu @ stdcall SetSystemMenu(long long) SetSystemMenu
@ stdcall SetSystemTimer(long long long ptr) SetSystemTimer @ stdcall SetSystemTimer(long long long ptr) SetSystemTimer
...@@ -650,13 +650,14 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri ...@@ -650,13 +650,14 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
@ stdcall SetProcessDefaultLayout(long) SetProcessDefaultLayout @ stdcall SetProcessDefaultLayout(long) SetProcessDefaultLayout
@ stdcall RegisterDeviceNotificationA(long ptr long) RegisterDeviceNotificationA @ stdcall RegisterDeviceNotificationA(long ptr long) RegisterDeviceNotificationA
@ stub RegisterDeviceNotificationW @ stub RegisterDeviceNotificationW
@ stub TrackMouseEvent
@ stub UnregisterDeviceNotification @ stub UnregisterDeviceNotification
# win98/win2k # win98/win2k
@ stdcall AllowSetForegroundWindow (long) AllowSetForegroundWindow @ stdcall AllowSetForegroundWindow (long) AllowSetForegroundWindow
@ stdcall AnimateWindow(long long long) AnimateWindow @ stdcall AnimateWindow(long long long) AnimateWindow
@ stdcall GetAncestor(long long) GetAncestor @ stdcall GetAncestor(long long) GetAncestor
@ stdcall DrawMenuBarTemp(long long) DrawMenuBarTemp @ stdcall DrawMenuBarTemp(long long long long long) DrawMenuBarTemp
@ stdcall EnumDisplaySettingsExA(str long ptr long) EnumDisplaySettingsExA @ stdcall EnumDisplaySettingsExA(str long ptr long) EnumDisplaySettingsExA
@ stdcall EnumDisplaySettingsExW(wstr long ptr long) EnumDisplaySettingsExW @ stdcall EnumDisplaySettingsExW(wstr long ptr long) EnumDisplaySettingsExW
@ stdcall GetClipboardSequenceNumber () GetClipboardSequenceNumber @ stdcall GetClipboardSequenceNumber () GetClipboardSequenceNumber
......
...@@ -148,11 +148,11 @@ static void SYSCOLOR_SetColor( int index, COLORREF color ) ...@@ -148,11 +148,11 @@ static void SYSCOLOR_SetColor( int index, COLORREF color )
if (SysColorPens[index]) if (SysColorPens[index])
{ {
SYSCOLOR_MakeObjectSystem(SysColorBrushes[index], FALSE); SYSCOLOR_MakeObjectSystem(SysColorPens[index], FALSE);
DeleteObject( SysColorPens[index] ); DeleteObject( SysColorPens[index] );
} }
SysColorPens[index] = CreatePen( PS_SOLID, 1, color ); SysColorPens[index] = CreatePen( PS_SOLID, 1, color );
SYSCOLOR_MakeObjectSystem(SysColorBrushes[index], TRUE); SYSCOLOR_MakeObjectSystem(SysColorPens[index], TRUE);
} }
...@@ -275,11 +275,80 @@ BOOL WINAPI SetSysColors( INT nChanges, const INT *lpSysColor, ...@@ -275,11 +275,80 @@ BOOL WINAPI SetSysColors( INT nChanges, const INT *lpSysColor,
/************************************************************************* /*************************************************************************
* SetSysColorsTemp (USER32.@) * SetSysColorsTemp (USER32.@)
*
* UNDOCUMENTED !!
*
* Called by W98SE desk.cpl Control Panel Applet:
* handle = SetSysColorsTemp(ptr, ptr, nCount); ("set" call)
* result = SetSysColorsTemp(NULL, NULL, handle); ("restore" call)
*
* pPens is an array of COLORREF values, which seems to be used
* to indicate the color values to create new pens with.
*
* pBrushes is an array of solid brush handles (returned by a previous
* CreateSolidBrush), which seems to contain the brush handles to set
* for the system colors.
*
* n seems to be used for
* a) indicating the number of entries to operate on (length of pPens,
* pBrushes)
* b) passing the handle that points to the previously used color settings.
* I couldn't figure out in hell what kind of handle this is on
* Windows. I just use a heap handle instead. Shouldn't matter anyway.
*
* RETURNS
* heap handle of our own copy of the current syscolors in case of
* "set" call, i.e. pPens, pBrushes != NULL.
* TRUE (unconditionally !) in case of "restore" call,
* i.e. pPens, pBrushes == NULL.
* FALSE in case of either pPens != NULL and pBrushes == NULL
* or pPens == NULL and pBrushes != NULL.
*
* I'm not sure whether this implementation is 100% correct. [AM]
*/ */
BOOL WINAPI SetSysColorsTemp( int n, const int* p, const COLORREF* ptr) DWORD WINAPI SetSysColorsTemp( const COLORREF *pPens, const HBRUSH *pBrushes, DWORD n)
{ {
FIXME("(%d,%p,%p): stub!\n", n, p, ptr); int i;
return 0;
if (pPens && pBrushes) /* "set" call */
{
/* allocate our structure to remember old colors */
LPVOID pOldCol = HeapAlloc(GetProcessHeap(), 0, sizeof(DWORD)+n*sizeof(HPEN)+n*sizeof(HBRUSH));
LPVOID p = pOldCol;
*(DWORD *)p = n; p += sizeof(DWORD);
memcpy(p, SysColorPens, n*sizeof(HPEN)); p += n*sizeof(HPEN);
memcpy(p, SysColorBrushes, n*sizeof(HBRUSH)); p += n*sizeof(HBRUSH);
for (i=0; i < n; i++)
{
SysColorPens[i] = CreatePen( PS_SOLID, 1, pPens[i] );
SysColorBrushes[i] = pBrushes[i];
}
return (DWORD)pOldCol;
}
if ((!pPens) && (!pBrushes)) /* "restore" call */
{
LPVOID pOldCol = (LPVOID)n;
LPVOID p = pOldCol;
DWORD nCount = *(DWORD *)p;
p += sizeof(DWORD);
for (i=0; i < nCount; i++)
{
DeleteObject(SysColorPens[i]);
SysColorPens[i] = *(HPEN *)p; p += sizeof(HPEN);
}
for (i=0; i < nCount; i++)
{
SysColorBrushes[i] = *(HBRUSH *)p; p += sizeof(HBRUSH);
}
/* get rid of storage structure */
HeapFree(GetProcessHeap(), 0, pOldCol);
return TRUE;
}
return FALSE;
} }
/*********************************************************************** /***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment