summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/dlgboxsubclass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SmileyAdd/src/dlgboxsubclass.cpp')
-rw-r--r--plugins/SmileyAdd/src/dlgboxsubclass.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
index 9f8eab1afe..fff1cfee75 100644
--- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp
+++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp
@@ -149,12 +149,22 @@ static LRESULT CALLBACK MessageDlgSubclass(HWND hwnd, UINT uMsg, WPARAM wParam,
int SmileyButtonCreate(WPARAM, LPARAM)
{
+ // create a hotkey for the button first
+ HOTKEYDESC desc = {};
+ desc.pszName = "srmm_smileyadd";
+ desc.szSection.a = BB_HK_SECTION;
+ desc.szDescription.a = LPGEN("Smiley selector");
+ desc.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'E');
+ desc.lParam = LPARAM(g_hInst);
+ Hotkey_Register(&desc);
+
BBButton bbd = {};
bbd.pszModuleName = MODULENAME;
bbd.pwszTooltip = LPGENW("Show smiley selection window");
bbd.dwDefPos = 31;
bbd.hIcon = IcoLib_GetIconHandle("SmileyAdd_ButtonSmiley");
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON;
+ bbd.pszHotkey = desc.pszName;
Srmm_AddButton(&bbd);
return 0;
}