@@ -487,6 +487,21 @@ struct TrackLabel : SettingDlg {
487
487
set_edit_selection_all (info->hwnd_label );
488
488
return true ;
489
489
}
490
+
491
+ private:
492
+ static inline constinit HCURSOR cursor = nullptr ;
493
+
494
+ public:
495
+ static HCURSOR get_cursor ()
496
+ {
497
+ if (cursor == nullptr )
498
+ cursor = ::LoadCursorW (nullptr , reinterpret_cast <PCWSTR>(IDC_HAND));
499
+ return cursor;
500
+ }
501
+ static void free () {
502
+ // if (cursor != nullptr) ::DestroyCursor(cursor);
503
+ // cursor = nullptr;
504
+ }
490
505
};
491
506
492
507
// Combo Box でのキー入力.
@@ -513,8 +528,6 @@ struct DropdownList : SettingDlg {
513
528
}
514
529
static uintptr_t hook_uid () { return SettingDlg::hook_uid () + 3 ; }
515
530
516
- static inline constinit HCURSOR cursor = nullptr ;
517
-
518
531
public:
519
532
static void on_notify_open (HWND ctrl) {
520
533
combo = ctrl;
@@ -524,17 +537,6 @@ struct DropdownList : SettingDlg {
524
537
combo = nullptr ;
525
538
::RemoveWindowSubclass (exedit.fp->hwnd_parent, mainwindow_hook, hook_uid());
526
539
}
527
-
528
- static HCURSOR get_cursor ()
529
- {
530
- if (cursor == nullptr )
531
- cursor = ::LoadCursorW (nullptr , reinterpret_cast <PCWSTR>(IDC_HAND));
532
- return cursor;
533
- }
534
- static void free () {
535
- // if (cursor != nullptr) ::DestroyCursor(cursor);
536
- // cursor = nullptr;
537
- }
538
540
};
539
541
540
542
@@ -1106,7 +1108,7 @@ LRESULT CALLBACK setting_dlg_hook(HWND hwnd, UINT message, WPARAM wparam, LPARAM
1106
1108
1107
1109
// if the track is found, change the cursor to hand.
1108
1110
if (TrackLabel::find_trackinfo (pt) != nullptr ) {
1109
- ::SetCursor (DropdownList ::get_cursor());
1111
+ ::SetCursor (TrackLabel ::get_cursor());
1110
1112
return TRUE ;
1111
1113
}
1112
1114
}
@@ -1279,7 +1281,7 @@ BOOL func_WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, EditHan
1279
1281
// at this moment, the setting dialog and the timeline window are already destroyed.
1280
1282
TextBox::batch.discard (hwnd, PrvMsg::NotifyUpdate);
1281
1283
KeyboardHook::unhook ();
1282
- DropdownList ::free ();
1284
+ TrackLabel ::free ();
1283
1285
1284
1286
// message-only window を削除.必要ないかもしれないけど.
1285
1287
fp->hwnd = nullptr ; ::DestroyWindow (hwnd);
0 commit comments