mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 19:52:56 +00:00
[EXPLORER-NEW]
* Use a struct like the comment suggested. May not fix anything, but it's one FIXME less in ReactOS. svn path=/branches/shell-experiments/; revision=63623
This commit is contained in:
parent
fe526a2a66
commit
8b3b02a2ca
1 changed files with 26 additions and 5 deletions
|
@ -44,6 +44,13 @@ typedef struct _SYS_PAGER_DATA
|
||||||
INT VisibleButtonCount;
|
INT VisibleButtonCount;
|
||||||
} SYS_PAGER_WND_DATA, *PSYS_PAGER_WND_DATA;
|
} SYS_PAGER_WND_DATA, *PSYS_PAGER_WND_DATA;
|
||||||
|
|
||||||
|
// Data comes from shell32/systray.cpp -> TrayNotifyCDS_Dummy
|
||||||
|
typedef struct _SYS_PAGER_COPY_DATA
|
||||||
|
{
|
||||||
|
DWORD cookie;
|
||||||
|
DWORD notify_code;
|
||||||
|
NOTIFYICONDATA nicon_data;
|
||||||
|
} SYS_PAGER_COPY_DATA, *PSYS_PAGER_COPY_DATA;
|
||||||
|
|
||||||
static PNOTIFY_ITEM
|
static PNOTIFY_ITEM
|
||||||
SysPagerWnd_CreateNotifyItemData(IN OUT PSYS_PAGER_WND_DATA This)
|
SysPagerWnd_CreateNotifyItemData(IN OUT PSYS_PAGER_WND_DATA This)
|
||||||
|
@ -418,7 +425,7 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
||||||
PCOPYDATASTRUCT cpData = (PCOPYDATASTRUCT)lParam;
|
PCOPYDATASTRUCT cpData = (PCOPYDATASTRUCT)lParam;
|
||||||
if (cpData->dwData == 1)
|
if (cpData->dwData == 1)
|
||||||
{
|
{
|
||||||
DWORD trayCommand;
|
SYS_PAGER_COPY_DATA data;
|
||||||
NOTIFYICONDATA *iconData;
|
NOTIFYICONDATA *iconData;
|
||||||
HWND parentHWND;
|
HWND parentHWND;
|
||||||
RECT windowRect;
|
RECT windowRect;
|
||||||
|
@ -426,15 +433,21 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
||||||
parentHWND = GetParent(parentHWND);
|
parentHWND = GetParent(parentHWND);
|
||||||
GetClientRect(parentHWND, &windowRect);
|
GetClientRect(parentHWND, &windowRect);
|
||||||
|
|
||||||
/* FIXME: ever heard of "struct"? */
|
ZeroMemory(&data, sizeof(data));
|
||||||
trayCommand = *(DWORD *) (((BYTE *)cpData->lpData) + 4);
|
CopyMemory(
|
||||||
iconData = (NOTIFYICONDATA *) (((BYTE *)cpData->lpData) + 8);
|
&data,
|
||||||
|
(PSYS_PAGER_COPY_DATA) cpData->lpData,
|
||||||
|
cpData->dwData);
|
||||||
|
iconData = &data.nicon_data;
|
||||||
|
|
||||||
switch (trayCommand)
|
switch (data.notify_code)
|
||||||
{
|
{
|
||||||
case NIM_ADD:
|
case NIM_ADD:
|
||||||
{
|
{
|
||||||
PPNOTIFY_ITEM NotifyPointer;
|
PPNOTIFY_ITEM NotifyPointer;
|
||||||
|
|
||||||
|
DbgPrint("NotifyMessage received with NIM_ADD\n");
|
||||||
|
|
||||||
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
|
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
|
||||||
iconData);
|
iconData);
|
||||||
if (!NotifyPointer)
|
if (!NotifyPointer)
|
||||||
|
@ -446,6 +459,9 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
||||||
case NIM_MODIFY:
|
case NIM_MODIFY:
|
||||||
{
|
{
|
||||||
PPNOTIFY_ITEM NotifyPointer;
|
PPNOTIFY_ITEM NotifyPointer;
|
||||||
|
|
||||||
|
DbgPrint("NotifyMessage received with NIM_MODIFY\n");
|
||||||
|
|
||||||
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
|
NotifyPointer = SysPagerWnd_FindPPNotifyItemByIconData(This,
|
||||||
iconData);
|
iconData);
|
||||||
if (!NotifyPointer)
|
if (!NotifyPointer)
|
||||||
|
@ -460,9 +476,14 @@ SysPagerWnd_NotifyMsg(IN HWND hwnd,
|
||||||
}
|
}
|
||||||
case NIM_DELETE:
|
case NIM_DELETE:
|
||||||
{
|
{
|
||||||
|
DbgPrint("NotifyMessage received with NIM_DELETE\n");
|
||||||
|
|
||||||
SysPagerWnd_RemoveButton(This, iconData);
|
SysPagerWnd_RemoveButton(This, iconData);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
DbgPrint("NotifyMessage received with unknown code %d.\n", data.notify_code);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
SendMessage(parentHWND,
|
SendMessage(parentHWND,
|
||||||
WM_SIZE,
|
WM_SIZE,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue