If I minimize my shell extension folder, and then try to restore it via click in the taskbar, I get an error beep and nothing is done.
Using Microsoft Spy++
, I reviewed the events of attempting to restore the folder and got the following:
<00001> 0019013C S WM_WINDOWPOSCHANGING lpwp:021DEC48
<00002> 0019013C R WM_WINDOWPOSCHANGING
<00003> 0019013C S message:0x0422 [User-defined:WM_USER+34] wParam:00200001 lParam:00000000
<00004> 0019013C R message:0x0422 [User-defined:WM_USER+34] lResult:00000001
<00005> 0019013C P message:0xC18C [Registered:"CMBActivate"] wParam:00200001 lParam:00000000
While for a regular window, I get the following:
<00001> 00190114 S WM_WINDOWPOSCHANGING lpwp:0DFCE920
<00002> 00190114 R WM_WINDOWPOSCHANGING
<00003> 00190114 S message:0x0422 [User-defined:WM_USER+34] wParam:00200001 lParam:00000000
<00004> 00190114 R message:0x0422 [User-defined:WM_USER+34] lResult:00000001
<00005> 00190114 P message:0xC18C [Registered:"CMBActivate"] wParam:00200001 lParam:00000000
<00006> 00190114 S message:0x0425 [User-defined:WM_USER+37] wParam:00000000 lParam:00000033
<00007> 00190114 R message:0x0425 [User-defined:WM_USER+37] lResult:00000000
<00008> 00190114 S WM_WINDOWPOSCHANGING lpwp:0DFCE610
<00009> 00190114 R WM_WINDOWPOSCHANGING
<00010> 00190114 S WM_NCCALCSIZE fCalcValidRects:True lpncsp:0DFCE5B0
<00011> 00190114 R WM_NCCALCSIZE fuValidRect:0000 lpncsp:0DFCE6D4
<00012> 00190114 S WM_WINDOWPOSCHANGED lpwp:0DFCE610
<00013> 00190114 S WM_SIZE fwSizeType:SIZE_RESTORED nWidth:1034 nHeight:563
<00014> 00190114 R WM_SIZE
<00015> 00190114 R WM_WINDOWPOSCHANGED
The issue only reproduced for me on Windows 8.1
, and not on any release prior to that.
What could be the reason WM_WINDOWPOSCHANGING
is not called and that WM_WINDOWPOSCHANGED
is not called at all? As I understand, it must be called after the operation is completed, and perhaps that is the reason my window won't get restored, and I'm getting the error beep.
Apparently, the problem was with server communication under my implementation of
IExtractIconW.GetIconLocation
.The way to resolve it was to remember which windows are minimized at a given time and for them to return some default icon location.