Skip to content

Commit 6b8709e

Browse files
committed
変数を入れる場所を間違っていた.
1 parent fd05f58 commit 6b8709e

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

reactive_dlg.cpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,21 @@ struct TrackLabel : SettingDlg {
487487
set_edit_selection_all(info->hwnd_label);
488488
return true;
489489
}
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+
}
490505
};
491506

492507
// Combo Box でのキー入力.
@@ -513,8 +528,6 @@ struct DropdownList : SettingDlg {
513528
}
514529
static uintptr_t hook_uid() { return SettingDlg::hook_uid() + 3; }
515530

516-
static inline constinit HCURSOR cursor = nullptr;
517-
518531
public:
519532
static void on_notify_open(HWND ctrl) {
520533
combo = ctrl;
@@ -524,17 +537,6 @@ struct DropdownList : SettingDlg {
524537
combo = nullptr;
525538
::RemoveWindowSubclass(exedit.fp->hwnd_parent, mainwindow_hook, hook_uid());
526539
}
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-
}
538540
};
539541

540542

@@ -1106,7 +1108,7 @@ LRESULT CALLBACK setting_dlg_hook(HWND hwnd, UINT message, WPARAM wparam, LPARAM
11061108

11071109
// if the track is found, change the cursor to hand.
11081110
if (TrackLabel::find_trackinfo(pt) != nullptr) {
1109-
::SetCursor(DropdownList::get_cursor());
1111+
::SetCursor(TrackLabel::get_cursor());
11101112
return TRUE;
11111113
}
11121114
}
@@ -1279,7 +1281,7 @@ BOOL func_WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, EditHan
12791281
// at this moment, the setting dialog and the timeline window are already destroyed.
12801282
TextBox::batch.discard(hwnd, PrvMsg::NotifyUpdate);
12811283
KeyboardHook::unhook();
1282-
DropdownList::free();
1284+
TrackLabel::free();
12831285

12841286
// message-only window を削除.必要ないかもしれないけど.
12851287
fp->hwnd = nullptr; ::DestroyWindow(hwnd);

0 commit comments

Comments
 (0)