mirror of
https://github.com/reactos/reactos.git
synced 2024-07-23 20:58:16 +00:00
[EXPLORER_NEW]
- Fix some formatting and GetWindowLong[Ptr] confusion svn path=/trunk/; revision=58013
This commit is contained in:
parent
33e087ed1a
commit
ce123b9acc
|
@ -41,17 +41,17 @@ SetWindowStyle(IN HWND hWnd,
|
|||
|
||||
ASSERT((~dwStyleMask & dwStyle) == 0);
|
||||
|
||||
PrevStyle = GetWindowLongPtr(hWnd,
|
||||
GWL_STYLE);
|
||||
PrevStyle = GetWindowLong(hWnd,
|
||||
GWL_STYLE);
|
||||
if (PrevStyle != 0 &&
|
||||
(PrevStyle & dwStyleMask) != dwStyle)
|
||||
{
|
||||
Style = PrevStyle & ~dwStyleMask;
|
||||
Style |= dwStyle;
|
||||
|
||||
PrevStyle = SetWindowLongPtr(hWnd,
|
||||
GWL_STYLE,
|
||||
Style);
|
||||
PrevStyle = SetWindowLong(hWnd,
|
||||
GWL_STYLE,
|
||||
Style);
|
||||
}
|
||||
|
||||
return PrevStyle;
|
||||
|
@ -66,17 +66,17 @@ SetWindowExStyle(IN HWND hWnd,
|
|||
|
||||
ASSERT((~dwStyleMask & dwStyle) == 0);
|
||||
|
||||
PrevStyle = GetWindowLongPtr(hWnd,
|
||||
GWL_EXSTYLE);
|
||||
PrevStyle = GetWindowLong(hWnd,
|
||||
GWL_EXSTYLE);
|
||||
if (PrevStyle != 0 &&
|
||||
(PrevStyle & dwStyleMask) != dwStyle)
|
||||
{
|
||||
Style = PrevStyle & ~dwStyleMask;
|
||||
Style |= dwStyle;
|
||||
|
||||
PrevStyle = SetWindowLongPtr(hWnd,
|
||||
GWL_EXSTYLE,
|
||||
Style);
|
||||
PrevStyle = SetWindowLong(hWnd,
|
||||
GWL_EXSTYLE,
|
||||
Style);
|
||||
}
|
||||
|
||||
return PrevStyle;
|
||||
|
@ -291,11 +291,11 @@ GetVersionInfoString(IN TCHAR *szFileName,
|
|||
BOOL bRet = FALSE;
|
||||
unsigned int i;
|
||||
|
||||
dwLen = GetFileVersionInfoSize(szFileName,&dwHandle);
|
||||
dwLen = GetFileVersionInfoSize(szFileName, &dwHandle);
|
||||
|
||||
if (dwLen > 0)
|
||||
{
|
||||
lpData = HeapAlloc(hProcessHeap,0,dwLen);
|
||||
lpData = HeapAlloc(hProcessHeap, 0, dwLen);
|
||||
|
||||
if (lpData != NULL)
|
||||
{
|
||||
|
@ -324,14 +324,15 @@ GetVersionInfoString(IN TCHAR *szFileName,
|
|||
sizeof(szSubBlock) / sizeof(szSubBlock[0]),
|
||||
TEXT("\\StringFileInfo\\%04X%04X\\%s"),
|
||||
lpTranslate[i].wLanguage,
|
||||
lpTranslate[i].wCodePage,szVersionInfo);
|
||||
lpTranslate[i].wCodePage,
|
||||
szVersionInfo);
|
||||
|
||||
if (VerQueryValue(lpData,
|
||||
szSubBlock,
|
||||
(LPVOID *)&lpszLocalBuf,
|
||||
&cbLen) != 0)
|
||||
{
|
||||
wcsncpy(szBuffer,lpszLocalBuf,cbBufLen);
|
||||
wcsncpy(szBuffer, lpszLocalBuf, cbBufLen);
|
||||
|
||||
bRet = TRUE;
|
||||
break;
|
||||
|
@ -339,7 +340,7 @@ GetVersionInfoString(IN TCHAR *szFileName,
|
|||
}
|
||||
}
|
||||
}
|
||||
HeapFree(hProcessHeap,0,lpData);
|
||||
HeapFree(hProcessHeap, 0, lpData);
|
||||
lpData = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ BEGIN
|
|||
MENUITEM "&Undo", ID_SHELL_CMD_UNDO_ACTION
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Задачен управител", ID_SHELL_CMD_OPEN_TASKMGR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "&Заключване на задачната лента", ID_LOCKTASKBAR
|
||||
MENUITEM "С&войства", ID_SHELL_CMD_PROPERTIES
|
||||
END
|
||||
|
|
|
@ -431,7 +431,9 @@ TaskSwitchWnd_UpdateTaskItemButton(IN OUT PTASK_SWITCH_WND This,
|
|||
TaskItem);
|
||||
|
||||
icon = TaskSwitchWnd_GetWndIcon(TaskItem->hWnd);
|
||||
TaskItem->IconIndex = ImageList_ReplaceIcon(This->TaskIcons,TaskItem->IconIndex,icon);
|
||||
TaskItem->IconIndex = ImageList_ReplaceIcon(This->TaskIcons,
|
||||
TaskItem->IconIndex,
|
||||
icon);
|
||||
tbbi.iImage = TaskItem->IconIndex;
|
||||
|
||||
if (!SendMessage(This->hWndToolbar,
|
||||
|
@ -452,9 +454,9 @@ TaskSwitchWnd_RemoveIcon(IN OUT PTASK_SWITCH_WND This,
|
|||
IN PTASK_ITEM TaskItem)
|
||||
{
|
||||
TBBUTTONINFO tbbi;
|
||||
PTASK_ITEM currentTaskItem,LastItem;
|
||||
PTASK_ITEM currentTaskItem, LastItem;
|
||||
|
||||
if (TaskItem->IconIndex==-1)
|
||||
if (TaskItem->IconIndex == -1)
|
||||
return;
|
||||
|
||||
tbbi.cbSize = sizeof(tbbi);
|
||||
|
@ -1377,8 +1379,8 @@ TaskSwitchWnd_EnumWindowsProc(IN HWND hWnd,
|
|||
/* Don't list popup windows and also no tool windows */
|
||||
if (GetWindow(hWnd,
|
||||
GW_OWNER) == NULL &&
|
||||
!(GetWindowLongPtr(hWnd,
|
||||
GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
|
||||
!(GetWindowLong(hWnd,
|
||||
GWL_EXSTYLE) & WS_EX_TOOLWINDOW))
|
||||
{
|
||||
TaskSwitchWnd_AddTask(This,
|
||||
hWnd);
|
||||
|
@ -2126,7 +2128,7 @@ ForwardContextMenuMsg:
|
|||
|
||||
#if DUMP_TASKS != 0
|
||||
case WM_TIMER:
|
||||
switch(wParam)
|
||||
switch (wParam)
|
||||
{
|
||||
case 1:
|
||||
TaskSwitchWnd_DumpTasks(This);
|
||||
|
|
|
@ -187,7 +187,7 @@ SysPagerWnd_AddButton(IN OUT PSYS_PAGER_WND_DATA This,
|
|||
tbBtn.dwData = notifyItem->Index;
|
||||
|
||||
tbBtn.iString = (INT_PTR)text;
|
||||
tbBtn.idCommand=notifyItem->Index;
|
||||
tbBtn.idCommand = notifyItem->Index;
|
||||
|
||||
if (iconData->uFlags & NIF_MESSAGE)
|
||||
{
|
||||
|
@ -237,7 +237,7 @@ SysPagerWnd_RemoveButton(IN OUT PSYS_PAGER_WND_DATA This,
|
|||
{
|
||||
PNOTIFY_ITEM deleteItem;
|
||||
PNOTIFY_ITEM updateItem;
|
||||
deleteItem=*NotifyPointer;
|
||||
deleteItem = *NotifyPointer;
|
||||
|
||||
|
||||
SendMessage(This->hWndToolbar,
|
||||
|
@ -245,7 +245,7 @@ SysPagerWnd_RemoveButton(IN OUT PSYS_PAGER_WND_DATA This,
|
|||
deleteItem->Index,
|
||||
0);
|
||||
|
||||
*NotifyPointer=updateItem=deleteItem->next;
|
||||
*NotifyPointer = updateItem = deleteItem->next;
|
||||
|
||||
if (!(deleteItem->iconData.dwState & NIS_HIDDEN))
|
||||
This->VisibleButtonCount--;
|
||||
|
@ -382,13 +382,10 @@ SysPagerWnd_Create(IN OUT PSYS_PAGER_WND_DATA This)
|
|||
SendMessage(This->hWndToolbar, TB_SETIMAGELIST, 0, (LPARAM)This->SysIcons);
|
||||
|
||||
BtnSize.cx = BtnSize.cy = 18;
|
||||
//BtnSize.cx = GetSystemMetrics(SM_CXMINIMIZED);
|
||||
//This->ButtonSize.cy = BtnSize.cy = GetSystemMetrics(SM_CYSIZE) + (2 * GetSystemMetrics(SM_CYEDGE));
|
||||
SendMessage(This->hWndToolbar,
|
||||
TB_SETBUTTONSIZE,
|
||||
0,
|
||||
MAKELONG(BtnSize.cx, BtnSize.cy));
|
||||
/*SysPagerWnd_AddButton(This);*/
|
||||
|
||||
SetWindowSubclass(This->hWndToolbar,
|
||||
SysPagerWnd_ToolbarSubclassedProc,
|
||||
|
@ -427,6 +424,7 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
|||
parentHWND = GetParent(parentHWND);
|
||||
GetClientRect(parentHWND, &windowRect);
|
||||
|
||||
/* FIXME: ever heard of "struct"? */
|
||||
trayCommand = *(DWORD *) (((BYTE *)cpData->lpData) + 4);
|
||||
iconData = (NOTIFYICONDATA *) (((BYTE *)cpData->lpData) + 8);
|
||||
|
||||
|
@ -448,7 +446,7 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
|||
PPNOTIFY_ITEM NotifyPointer;
|
||||
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
|
||||
iconData);
|
||||
if(!NotifyPointer)
|
||||
if (!NotifyPointer)
|
||||
{
|
||||
SysPagerWnd_AddButton(This, iconData);
|
||||
}
|
||||
|
@ -697,10 +695,10 @@ static const struct
|
|||
BOOL IsTime;
|
||||
DWORD dwFormatFlags;
|
||||
LPCTSTR lpFormat;
|
||||
}ClockWndFormats[]= {
|
||||
{TRUE, 0, NULL},
|
||||
{FALSE, 0, TEXT("dddd")},
|
||||
{FALSE, DATE_SHORTDATE, NULL}
|
||||
} ClockWndFormats[] = {
|
||||
{ TRUE, 0, NULL },
|
||||
{ FALSE, 0, TEXT("dddd") },
|
||||
{ FALSE, DATE_SHORTDATE, NULL }
|
||||
};
|
||||
|
||||
HRESULT RegGetDWord(HKEY hKey, LPCTSTR szValueName, DWORD * lpdwResult)
|
||||
|
@ -997,7 +995,7 @@ TrayClockWnd_UpdateWnd(IN OUT PTRAY_CLOCK_WND_DATA This)
|
|||
|
||||
nmh.hwndFrom = This->hWnd;
|
||||
nmh.idFrom = GetWindowLongPtr(This->hWnd,
|
||||
GWL_ID);
|
||||
GWLP_ID);
|
||||
nmh.code = NTNWM_REALIGN;
|
||||
|
||||
SendMessage(This->hWndNotify,
|
||||
|
@ -1491,9 +1489,9 @@ TrayNotifyWnd_UpdateTheme(IN OUT PTRAY_NOTIFY_WND_DATA This)
|
|||
|
||||
if (This->TrayTheme)
|
||||
{
|
||||
style = GetWindowLongPtr(This->hWnd, GWL_EXSTYLE);
|
||||
style = GetWindowLong(This->hWnd, GWL_EXSTYLE);
|
||||
style = style & ~WS_EX_STATICEDGE;
|
||||
SetWindowLongPtr(This->hWnd, GWL_EXSTYLE, style);
|
||||
SetWindowLong(This->hWnd, GWL_EXSTYLE, style);
|
||||
|
||||
GetThemeMargins(This->TrayTheme,
|
||||
NULL,
|
||||
|
@ -1505,9 +1503,9 @@ TrayNotifyWnd_UpdateTheme(IN OUT PTRAY_NOTIFY_WND_DATA This)
|
|||
}
|
||||
else
|
||||
{
|
||||
style = GetWindowLongPtr(This->hWnd, GWL_EXSTYLE);
|
||||
style = GetWindowLong(This->hWnd, GWL_EXSTYLE);
|
||||
style = style | WS_EX_STATICEDGE;
|
||||
SetWindowLongPtr(This->hWnd, GWL_EXSTYLE, style);
|
||||
SetWindowLong(This->hWnd, GWL_EXSTYLE, style);
|
||||
|
||||
This->ContentMargin.cxLeftWidth = 0;
|
||||
This->ContentMargin.cxRightWidth = 0;
|
||||
|
|
|
@ -142,7 +142,7 @@ TaskbarPageProc(HWND hwndDlg,
|
|||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_TASKBARPROP_LOCK:
|
||||
case IDC_TASKBARPROP_HIDE:
|
||||
|
@ -163,7 +163,7 @@ TaskbarPageProc(HWND hwndDlg,
|
|||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
|
||||
switch(pnmh->code)
|
||||
switch (pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
break;
|
||||
|
@ -259,7 +259,7 @@ StartMenuPageProc(HWND hwndDlg,
|
|||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
|
||||
switch(pnmh->code)
|
||||
switch (pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
break;
|
||||
|
@ -294,7 +294,7 @@ NotificationPageProc(HWND hwndDlg,
|
|||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
|
||||
switch(pnmh->code)
|
||||
switch (pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
break;
|
||||
|
@ -329,7 +329,7 @@ ToolbarsPageProc(HWND hwndDlg,
|
|||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
|
||||
switch(pnmh->code)
|
||||
switch (pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
break;
|
||||
|
|
|
@ -372,11 +372,11 @@ ITrayWindowImpl_GetMinimumWindowSize(IN OUT ITrayWindowImpl *This,
|
|||
RECT rcMin = {0};
|
||||
|
||||
AdjustWindowRectEx(&rcMin,
|
||||
GetWindowLongPtr(This->hWnd,
|
||||
GWL_STYLE),
|
||||
GetWindowLong(This->hWnd,
|
||||
GWL_STYLE),
|
||||
FALSE,
|
||||
GetWindowLongPtr(This->hWnd,
|
||||
GWL_EXSTYLE));
|
||||
GetWindowLong(This->hWnd,
|
||||
GWL_EXSTYLE));
|
||||
|
||||
*pRect = rcMin;
|
||||
}
|
||||
|
@ -655,7 +655,7 @@ ITrayWindowImpl_ResizeWorkArea(IN OUT ITrayWindowImpl *This)
|
|||
RECT rcTray,rcWorkArea;
|
||||
|
||||
/* If monitor has changed then fix the previous monitors work area */
|
||||
if(This->PreviousMonitor!=This->Monitor)
|
||||
if (This->PreviousMonitor != This->Monitor)
|
||||
{
|
||||
ITrayWindowImpl_GetScreenRect(This,
|
||||
This->PreviousMonitor,
|
||||
|
@ -671,25 +671,25 @@ ITrayWindowImpl_ResizeWorkArea(IN OUT ITrayWindowImpl *This)
|
|||
ITrayWindowImpl_GetScreenRect(This,
|
||||
This->Monitor,
|
||||
&rcWorkArea);
|
||||
This->PreviousMonitor=This->Monitor;
|
||||
This->PreviousMonitor = This->Monitor;
|
||||
|
||||
/* If AutoHide is false then change the workarea to exclude the area that
|
||||
the taskbar covers. */
|
||||
if(!This->AutoHide)
|
||||
if (!This->AutoHide)
|
||||
{
|
||||
switch(This->Position)
|
||||
switch (This->Position)
|
||||
{
|
||||
case ABE_TOP:
|
||||
rcWorkArea.top=rcTray.bottom;
|
||||
rcWorkArea.top = rcTray.bottom;
|
||||
break;
|
||||
case ABE_LEFT:
|
||||
rcWorkArea.left=rcTray.right;
|
||||
rcWorkArea.left = rcTray.right;
|
||||
break;
|
||||
case ABE_RIGHT:
|
||||
rcWorkArea.right=rcTray.left;
|
||||
rcWorkArea.right = rcTray.left;
|
||||
break;
|
||||
case ABE_BOTTOM:
|
||||
rcWorkArea.bottom=rcTray.top;
|
||||
rcWorkArea.bottom = rcTray.top;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1978,7 +1978,7 @@ ITrayWindowImpl_DrawSizer(IN ITrayWindowImpl *This,
|
|||
|
||||
static DWORD WINAPI
|
||||
RunFileDlgThread(IN OUT PVOID pParam)
|
||||
{
|
||||
{
|
||||
ITrayWindowImpl *This = pParam;
|
||||
HANDLE hShell32;
|
||||
RUNFILEDLG RunFileDlg;
|
||||
|
@ -2007,7 +2007,7 @@ RunFileDlgThread(IN OUT PVOID pParam)
|
|||
|
||||
DestroyWindow(hwnd);
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static LRESULT CALLBACK
|
||||
|
@ -2519,7 +2519,7 @@ HandleTrayContextMenu:
|
|||
lParam,
|
||||
&Ret)))
|
||||
{
|
||||
switch(LOWORD(wParam))
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
/* FIXME: Handle these commands as well */
|
||||
case IDM_TASKBARANDSTARTMENU:
|
||||
|
|
Loading…
Reference in a new issue