📄 shnotify.cod
字号:
; 307 : }
; 308 : break;
001a0 ea000258 b |$L44402|
001a4 |$L44416|
001a4 e3a04001 mov r4, #1
001a8 |$L44717|
; 286 : {
; 287 : case IDOK:
; 288 : DestroyWindow(hWnd);
001a8 e1a00008 mov r0, r8
001ac eb000000 bl DestroyWindow
; 289 : PostQuitMessage(1);
001b0 e3a00001 mov r0, #1
001b4 eb000000 bl PostQuitMessage
; 290 : return TRUE;
001b8 e59d04d0 ldr r0, [sp, #0x4D0]
001bc eb000000 bl __security_check_cookie
001c0 ea000253 b |$L44399|
001c4 |$L44439|
; 345 :
; 346 : case IDC_OEM_REMOVEALL:
; 347 : {
; 348 : SHNotificationRemove(&CLSID_SHNAPI_OemNotif1,8001);
001c4 e59f4974 ldr r4, [pc, #0x974]
001c8 e3a01d7d mov r1, #0x7D, 26
001cc e3811001 orr r1, r1, #1
001d0 e2840030 add r0, r4, #0x30
001d4 eb000000 bl SHNotificationRemove
; 349 : SHNotificationRemove(&CLSID_SHNAPI_OemNotif2,8002);
001d8 e3a01d7d mov r1, #0x7D, 26
001dc e3811002 orr r1, r1, #2
001e0 e2840020 add r0, r4, #0x20
001e4 eb000000 bl SHNotificationRemove
; 350 : SHNotificationRemove(&CLSID_SHNAPI_OemNotif3,8003);
001e8 e3a01d7d mov r1, #0x7D, 26
001ec e3811003 orr r1, r1, #3
001f0 e2840010 add r0, r4, #0x10
001f4 eb000000 bl SHNotificationRemove
; 351 : }
; 352 : break;
001f8 ea000242 b |$L44402|
001fc |$L44716|
; 280 : }
; 281 : break;
; 282 :
; 283 : case WM_COMMAND:
; 284 : {
; 285 : switch( LOWORD(wParam) )
001fc e3530069 cmp r3, #0x69
00200 0a0000d2 beq |$L44440|
00204 e353006a cmp r3, #0x6A
00208 0a0000a8 beq |$L44451|
0020c e353006b cmp r3, #0x6B
00210 0a000057 beq |$L44460|
00214 e353006c cmp r3, #0x6C
00218 1a00023a bne |$L44402|
; 499 :
; 500 : //////////////////////////////////////////////////////////////////////////////////////////////////
; 501 : // Examples of using creating and updating Notifications using SHNotificationAdd, Update & Remove
; 502 :
; 503 : // Notification with a menu
; 504 : case IDC_NOTIF_MENU:
; 505 : {
; 506 : SHNOTIFICATIONDATA shnd = {0};
0021c e3a02054 mov r2, #0x54
00220 e3a01000 mov r1, #0
00224 e28d004c add r0, sp, #0x4C
00228 eb000000 bl memset
; 507 : shnd.cbStruct = sizeof(shnd);
; 508 : shnd.dwID = 1;
; 509 : shnd.clsid = CLSID_SHNAPI_MenuNotif;
0022c e59f390c ldr r3, [pc, #0x90C]
; 510 : shnd.npPriority = SHNP_PERSISTENT;
; 511 : shnd.csDuration = 5000; //Hide after 5 seconds
; 512 : shnd.pszTitle = TEXT("Notification With Menu");
; 513 : shnd.pszHTML = (LPCTSTR)LoadString(g_hInstance, IDS_NOTIF_MENU, NULL, 0);
00230 e59f78f4 ldr r7, [pc, #0x8F4]
00234 e59f6938 ldr r6, [pc, #0x938]
00238 e5932000 ldr r2, [r3]
0023c e593e004 ldr lr, [r3, #4]
00240 e5934008 ldr r4, [r3, #8]
00244 e593300c ldr r3, [r3, #0xC]
00248 e5970000 ldr r0, [r7]
0024c e3a05d4e mov r5, #0x4E, 26
00250 e3a01e13 mov r1, #0x13, 28
00254 e58d306c str r3, [sp, #0x6C]
00258 e3855008 orr r5, r5, #8
0025c e3a09058 mov r9, #0x58
00260 e3a0a001 mov r10, #1
00264 e3a0be1b mov r11, #0x1B, 28
00268 e58d2060 str r2, [sp, #0x60]
0026c e3a03000 mov r3, #0
00270 e3811001 orr r1, r1, #1
00274 e3a02000 mov r2, #0
00278 e58de064 str lr, [sp, #0x64]
0027c e58d4068 str r4, [sp, #0x68]
00280 e58d9048 str r9, [sp, #0x48]
00284 e58da04c str r10, [sp, #0x4C]
00288 e58db050 str r11, [sp, #0x50]
0028c e58d5054 str r5, [sp, #0x54]
00290 e58d6078 str r6, [sp, #0x78]
00294 eb000000 bl LoadStringW
00298 e1a03000 mov r3, r0
; 514 : shnd.hicon = Load16by16Icon(IDI_NOTIF);
0029c e3a000cb mov r0, #0xCB
002a0 e58d3074 str r3, [sp, #0x74]
002a4 eb000000 bl |?Load16by16Icon@@YAPAUHICON__@@I@Z|
002a8 e1a03000 mov r3, r0
; 515 : shnd.grfFlags = SHNF_HASMENU;
; 516 : shnd.hwndSink = hWnd;
; 517 : shnd.skm.hMenu = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_NOTIF_MENU));
002ac e5970000 ldr r0, [r7]
002b0 e3a01e32 mov r1, #0x32, 28
002b4 e3a02040 mov r2, #0x40
002b8 e3811002 orr r1, r1, #2
002bc e58d3058 str r3, [sp, #0x58]
002c0 e58d205c str r2, [sp, #0x5C]
002c4 e58d8070 str r8, [sp, #0x70]
002c8 eb000000 bl LoadMenuW
002cc e1a03000 mov r3, r0
; 518 : shnd.skm.cskc = 5;
002d0 e3a02005 mov r2, #5
; 519 : shnd.skm.prgskc = (SOFTKEYCMD *)LocalAlloc(LMEM_FIXED, shnd.skm.cskc*sizeof(SOFTKEYCMD));
002d4 e3a00000 mov r0, #0
002d8 e3a01028 mov r1, #0x28
002dc e58d3080 str r3, [sp, #0x80]
002e0 e58d2088 str r2, [sp, #0x88]
002e4 eb000000 bl LocalAlloc
002e8 e3500000 cmp r0, #0
002ec e58d0084 str r0, [sp, #0x84]
; 520 : if (NULL != shnd.skm.prgskc)
002f0 0a000204 beq |$L44402|
; 521 : {
; 522 : shnd.skm.prgskc[0].wpCmd = IDC_NOTIF_CMD_DISMISS;
002f4 e3a03095 mov r3, #0x95
002f8 e5803000 str r3, [r0]
; 523 : shnd.skm.prgskc[0].grfFlags = NOTIF_SOFTKEY_FLAGS_DISMISS;
002fc e59d3084 ldr r3, [sp, #0x84]
00300 e3a02000 mov r2, #0
; 524 : shnd.skm.prgskc[1].wpCmd = IDC_NOTIF_CMD_HIDESWITCH;
00304 e3a01096 mov r1, #0x96
00308 e5832004 str r2, [r3, #4]
0030c e59d3084 ldr r3, [sp, #0x84]
; 525 : shnd.skm.prgskc[1].grfFlags = NOTIF_SOFTKEY_FLAGS_HIDE;
00310 e3a0e001 mov lr, #1
; 526 : shnd.skm.prgskc[2].wpCmd = IDC_NOTIF_CMD_STAYOPEN;
00314 e3a04097 mov r4, #0x97
00318 e5831008 str r1, [r3, #8]
0031c e59d3084 ldr r3, [sp, #0x84]
; 527 : shnd.skm.prgskc[2].grfFlags = NOTIF_SOFTKEY_FLAGS_STAYOPEN;
00320 e3a02002 mov r2, #2
; 528 : shnd.skm.prgskc[3].wpCmd = IDC_NOTIF_CMD_HIDE;
00324 e3a01098 mov r1, #0x98
00328 e583e00c str lr, [r3, #0xC]
0032c e59d3084 ldr r3, [sp, #0x84]
; 529 : shnd.skm.prgskc[3].grfFlags = NOTIF_SOFTKEY_FLAGS_HIDE;
; 530 : shnd.skm.prgskc[4].wpCmd = IDC_NOTIF_CMD_OPENSWITCH;
00330 e3a05099 mov r5, #0x99
; 531 : shnd.skm.prgskc[4].grfFlags = NOTIF_SOFTKEY_FLAGS_STAYOPEN;
; 532 :
; 533 : SHNotificationAdd(&shnd);
00334 e28d0048 add r0, sp, #0x48
00338 e5834010 str r4, [r3, #0x10]
0033c e59d3084 ldr r3, [sp, #0x84]
00340 e5832014 str r2, [r3, #0x14]
00344 e59d3084 ldr r3, [sp, #0x84]
00348 e5831018 str r1, [r3, #0x18]
0034c e59d3084 ldr r3, [sp, #0x84]
00350 e583e01c str lr, [r3, #0x1C]
00354 e59d3084 ldr r3, [sp, #0x84]
00358 e5835020 str r5, [r3, #0x20]
0035c e59d3084 ldr r3, [sp, #0x84]
00360 e5832024 str r2, [r3, #0x24]
00364 eb000000 bl SHNotificationAdd
00368 |$L44745|
; 534 :
; 535 : LocalFree(shnd.skm.prgskc);
00368 e59d0084 ldr r0, [sp, #0x84]
0036c eb000000 bl LocalFree
; 536 : }
; 537 : }
; 538 : break;
00370 ea0001e4 b |$L44402|
00374 |$L44460|
; 447 :
; 448 : // Timed Bubble - autodismisses after a given time interval.
; 449 : case IDC_TIMED_BUBBLE:
; 450 : {
; 451 : RECT rc = {0};
00374 e3a03000 mov r3, #0
00378 e58d3010 str r3, [sp, #0x10]
0037c e3a03000 mov r3, #0
; 452 : SH_BOXEX shboxex = {0};
00380 e3a0e000 mov lr, #0
00384 e3a02084 mov r2, #0x84
00388 e3a01000 mov r1, #0
0038c e28d004c add r0, sp, #0x4C
00390 e58d3014 str r3, [sp, #0x14]
00394 e58d3018 str r3, [sp, #0x18]
00398 e58d301c str r3, [sp, #0x1C]
0039c e58de048 str lr, [sp, #0x48]
003a0 eb000000 bl memset
; 453 : HWND hwnd;
; 454 : DWORD dwResult;
; 455 :
; 456 : if (ERROR_SUCCESS != SHGetNavBarItemRect(SHNBI_VOLUME,&rc))
003a4 e28d1010 add r1, sp, #0x10
003a8 e3a00002 mov r0, #2
003ac eb000000 bl SHGetNavBarItemRect
; 457 : {
; 458 : rc.right = 240;
; 459 : rc.bottom = 26;
; 460 : }
; 461 :
; 462 :
; 463 : shboxex.cbSize = sizeof(SH_BOXEX);
; 464 : shboxex.dwStyle = SHBEXF_CLOSE_LIKE_MENUS | SHBEXF_MODELESS | SHBEXF_SETFOREGROUND | SHBEXF_CLOSE_ON_ACTIVATION_LOSS | SHBEXF_TIMED;
; 465 : shboxex.nTimeOut = 5000;
; 466 : shboxex.info.bi.pt.x = (rc.left + rc.right) / 2;
; 467 : shboxex.info.bi.pt.y = rc.bottom;
; 468 : shboxex.info.bi.iXPos = SHBB_DEFAULT_BUBBLEPOS;
; 469 : shboxex.info.bi.iYPos = SHBB_DEFAULT_BUBBLEPOS;
; 470 : shboxex.info.bi.cxPos = SHBB_DEFAULT_BUBBLEWIDTH;
; 471 : shboxex.info.bi.cyPos = -1;
; 472 : shboxex.info.bi.dwAlign = SHBOX_TOPALIGN;
; 473 : shboxex.info.bi.dwOriginatingIcon = SHNBI_VOLUME;
; 474 :
; 475 :
; 476 : shboxex.pfnHook = SHBoxHookProc;
; 477 : shboxex.pvUser = NULL;
; 478 :
; 479 : shboxex.sbextype = sbextBubbleBox;
; 480 : shboxex.info.bi.pszContent = (LPCTSTR)TEXT("<html>This is a timed bubble that will dismiss after 5 seconds");
; 481 : shboxex.info.bi.dwFlags = SHBBIF_HTML;
; 482 : shb
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -