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;
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;
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)
{
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;
}
}
}
- HeapFree(hProcessHeap,0,lpData);
+ HeapFree(hProcessHeap, 0, lpData);
lpData = NULL;
}
}
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
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,
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);
/* 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);
#if DUMP_TASKS != 0
case WM_TIMER:
- switch(wParam)
+ switch (wParam)
{
case 1:
TaskSwitchWnd_DumpTasks(This);
tbBtn.dwData = notifyItem->Index;
tbBtn.iString = (INT_PTR)text;
- tbBtn.idCommand=notifyItem->Index;
+ tbBtn.idCommand = notifyItem->Index;
if (iconData->uFlags & NIF_MESSAGE)
{
{
PNOTIFY_ITEM deleteItem;
PNOTIFY_ITEM updateItem;
- deleteItem=*NotifyPointer;
+ deleteItem = *NotifyPointer;
SendMessage(This->hWndToolbar,
deleteItem->Index,
0);
- *NotifyPointer=updateItem=deleteItem->next;
+ *NotifyPointer = updateItem = deleteItem->next;
if (!(deleteItem->iconData.dwState & NIS_HIDDEN))
This->VisibleButtonCount--;
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,
parentHWND = GetParent(parentHWND);
GetClientRect(parentHWND, &windowRect);
+ /* FIXME: ever heard of "struct"? */
trayCommand = *(DWORD *) (((BYTE *)cpData->lpData) + 4);
iconData = (NOTIFYICONDATA *) (((BYTE *)cpData->lpData) + 8);
PPNOTIFY_ITEM NotifyPointer;
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
iconData);
- if(!NotifyPointer)
+ if (!NotifyPointer)
{
SysPagerWnd_AddButton(This, iconData);
}
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)
nmh.hwndFrom = This->hWnd;
nmh.idFrom = GetWindowLongPtr(This->hWnd,
- GWL_ID);
+ GWLP_ID);
nmh.code = NTNWM_REALIGN;
SendMessage(This->hWndNotify,
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,
}
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;
break;
case WM_COMMAND:
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDC_TASKBARPROP_LOCK:
case IDC_TASKBARPROP_HIDE:
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
{
LPNMHDR pnmh = (LPNMHDR)lParam;
- switch(pnmh->code)
+ switch (pnmh->code)
{
case PSN_SETACTIVE:
break;
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;
}
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,
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;
}
}
static DWORD WINAPI
RunFileDlgThread(IN OUT PVOID pParam)
-{
+{
ITrayWindowImpl *This = pParam;
HANDLE hShell32;
RUNFILEDLG RunFileDlg;
DestroyWindow(hwnd);
- return 0;
+ return 0;
}
static LRESULT CALLBACK
lParam,
&Ret)))
{
- switch(LOWORD(wParam))
+ switch (LOWORD(wParam))
{
/* FIXME: Handle these commands as well */
case IDM_TASKBARANDSTARTMENU: