应用程序发送系统消息

// 通过向系统发送消息,可以完成一些系统任务。
HWND hWnd = ::FindWindow(_T("Shell_TrayWnd"), NULL);

if (hWnd != NULL)
{
        // 显示桌面
	::PostMessage(hWnd, WM_COMMAND, MAKELONG(407, 0), NULL);
}


具体的消息如下:

Serial.

Msg Number

Description Of The Message

1.

305

Displays the Start menu

2.

401

Displays Run Dialog

3.

402

Displays Logoff Dialog

4.

403

Command to cascade all toplevel windows

5.

404

Command to Tile Horizontally all top level windows

6.

405

Command to Tile Vertically all top level windows

7.

407

Shows the desktop. Do look at message number 419.

8.

408

Shows the Date and Time Dialog

9.

413

Shows taskbar properties

10.

415

Minimize all windows

11.

416

Maximize all windows. To see the effect of this command first do Minimize and then Maximize all.

12.

419

Well I am a bit confused about this message. This also shows the desktop. Maybe somebody can notice the difference.

13.

420

Shows task manager

14.

421

Opens Customize Taskbar Dialog

15.

424

Locks the taskbar

16.

503

Opens Help and Support Center Dialog

17.

505

Opens Control panel

18.

506

Shows the Shutdown computer dialog

19.

510

Displays the Printers and Faxes dialog

20.

41093

Displays Find Files Dialog

21.

41094

Displays Find Computers Dialog


参与评论 您还未登录,请先 登录 后发表或查看评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值