NSE:在最小化和恢复窗口后,我得到'WM_WINDOWPOSCHANGING'而不是'WM_WINDOWPOSCHANGED'

时间:2015-06-17 07:39:38

标签: windows-8.1 shell-extensions taskbar window-messages window-position

如果我最小化 shell扩展文件夹,然后尝试通过单击任务栏来恢复它,我会收到错误提示音并且没有任何操作。

使用mRecorder.prepare(),我查看了尝试恢复该文件夹的事件,并获得了以下内容:

private void startRecording() {
    mRecorder = new MediaRecorder();
    mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
    mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    mRecorder.setOutputFile(mFileName);
    mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

    try {
        mRecorder.prepare();
    } catch (IOException e) {
        Log.e(LOG_TAG, "prepare() failed");
    }

    mRecorder.start();
}

对于常规窗口,我得到以下内容:

Microsoft Spy++

此问题仅在<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 上为我重现,而不是之前的任何版本。

<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 未被调用的原因是什么,Windows 8.1根本没有被调用?据我所知,它必须在操作完成后调用,也许这就是我的窗口无法恢复的原因,而且我收到了错误的哔声。

1 个答案:

答案 0 :(得分:0)

显然,问题出在我IExtractIconW.GetIconLocation的实施下的服务器通信。

解决问题的方法是记住哪些窗口在给定时间最小化,并让它们返回一些默认图标位置。