WpfAppBar icon indicating copy to clipboard operation
WpfAppBar copied to clipboard

Check if the system approves ABMsg.ABM_NEW

Open Clijsters opened this issue 8 years ago • 7 comments

In AppBarFunctions.cs:137 you are assigning the return value of ABM_NEW to ret but not using it anywhere in the code: var ret = Interop.SHAppBarMessage((int)Interop.ABMsg.ABM_NEW, ref abd);

Consider using ret info.IsRegistered to determine whether the registration succeeded and if not, omit ABSetPos() (Which then would overlay other windows / bars)


The return value of SHAppBarMessage(ABM_NEW, ref pData) is described in MSDN - ABM_NEW message:

Return value Returns TRUE if successful, or FALSE if an error occurs or if the appbar is already registered.

Clijsters avatar Apr 28 '16 14:04 Clijsters

Is there a test case that would show what the issue is so that when fixed, it can be verified as fixed?

PhilipRieck avatar May 02 '16 15:05 PhilipRieck

Windows server core-Installation and XP Embedded return false. Also a Rectangle which isn't in the workingArea returns false, but not in all cases.

Clijsters avatar May 04 '16 19:05 Clijsters

I would suggest to combine this as an enhancement with multi screen support because with multiple screens, the WorkingArea isn't a Rectangle in every case (two displays with different resolution) and it happens more often that the system doesn't approve a SHAppBarMessage

Clijsters avatar May 04 '16 19:05 Clijsters