| 2383 |
|
|
| 2384 |
// Notify Icon 関連 |
// Notify Icon 関連 |
| 2385 |
static NOTIFYICONDATA notify_icon = {0}; |
static NOTIFYICONDATA notify_icon = {0}; |
| 2386 |
|
static int NotifyIconShowCount = 0; |
| 2387 |
|
|
| 2388 |
void FAR PASCAL CreateNotifyIcon(PComVar cv) |
void FAR PASCAL CreateNotifyIcon(PComVar cv) |
| 2389 |
{ |
{ |
| 2405 |
cv->NotifyIcon = ¬ify_icon; |
cv->NotifyIcon = ¬ify_icon; |
| 2406 |
|
|
| 2407 |
Shell_NotifyIcon(NIM_ADD, cv->NotifyIcon); |
Shell_NotifyIcon(NIM_ADD, cv->NotifyIcon); |
| 2408 |
|
|
| 2409 |
|
NotifyIconShowCount = 0; |
| 2410 |
} |
} |
| 2411 |
|
|
| 2412 |
return; |
return; |
| 2417 |
if (cv->NotifyIcon) { |
if (cv->NotifyIcon) { |
| 2418 |
Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon); |
Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon); |
| 2419 |
cv->NotifyIcon = NULL; |
cv->NotifyIcon = NULL; |
| 2420 |
|
NotifyIconShowCount = 0; |
| 2421 |
} |
} |
| 2422 |
|
|
| 2423 |
return; |
return; |
| 2433 |
cv->NotifyIcon->dwState = 0; |
cv->NotifyIcon->dwState = 0; |
| 2434 |
cv->NotifyIcon->dwStateMask = NIS_HIDDEN; |
cv->NotifyIcon->dwStateMask = NIS_HIDDEN; |
| 2435 |
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
| 2436 |
|
NotifyIconShowCount += 1; |
| 2437 |
|
|
| 2438 |
return; |
return; |
| 2439 |
} |
} |
| 2440 |
|
|
| 2441 |
void FAR PASCAL HideNotifyIcon(PComVar cv) |
void FAR PASCAL HideNotifyIcon(PComVar cv) |
| 2442 |
{ |
{ |
| 2443 |
if (cv->NotifyIcon) { |
if (NotifyIconShowCount > 1) { |
| 2444 |
cv->NotifyIcon->uFlags = NIF_STATE; |
NotifyIconShowCount -= 1; |
|
cv->NotifyIcon->dwState = NIS_HIDDEN; |
|
|
cv->NotifyIcon->dwStateMask = NIS_HIDDEN; |
|
|
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
|
| 2445 |
} |
} |
| 2446 |
|
else { |
| 2447 |
|
if (cv->NotifyIcon) { |
| 2448 |
|
cv->NotifyIcon->uFlags = NIF_STATE; |
| 2449 |
|
cv->NotifyIcon->dwState = NIS_HIDDEN; |
| 2450 |
|
cv->NotifyIcon->dwStateMask = NIS_HIDDEN; |
| 2451 |
|
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
| 2452 |
|
} |
| 2453 |
|
NotifyIconShowCount = 0; |
| 2454 |
|
} |
| 2455 |
|
|
| 2456 |
return; |
return; |
| 2457 |
} |
} |
| 2458 |
|
|
| 2492 |
|
|
| 2493 |
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
Shell_NotifyIcon(NIM_MODIFY, cv->NotifyIcon); |
| 2494 |
|
|
| 2495 |
|
NotifyIconShowCount += 1; |
| 2496 |
|
|
| 2497 |
return; |
return; |
| 2498 |
} |
} |
| 2499 |
|
|