diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-23 17:41:17 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-23 17:41:17 +0000 |
commit | b098799c15568ac46d96739682adb2fc24231b08 (patch) | |
tree | 2662faa51e0a4695b7434100c0979a0c7d491806 /plugins/TabSRMM/src/chat | |
parent | 2230909271bc66ea6d7efe6adcca7e22f5ef901f (diff) |
Ctrl+Z works again
git-svn-id: http://svn.miranda-ng.org/main/trunk@4167 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/chat')
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 51b11840fa..0184c0e36f 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -539,25 +539,19 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc) static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- MESSAGESUBDATA *dat;
- SESSION_INFO* Parentsi;
- struct TWindowData *mwdat;
HWND hwndParent = GetParent(hwnd);
+ TWindowData *mwdat = (struct TWindowData *)GetWindowLongPtr(hwndParent, GWLP_USERDATA);
+ SESSION_INFO *Parentsi = (SESSION_INFO *)mwdat->si;
- mwdat = (struct TWindowData *)GetWindowLongPtr(hwndParent, GWLP_USERDATA);
- Parentsi = (SESSION_INFO *)mwdat->si;
-
- dat = (MESSAGESUBDATA *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MESSAGESUBDATA *dat = (MESSAGESUBDATA *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (mwdat->fkeyProcessed && (msg == WM_KEYUP)) {
GetKeyboardState(mwdat->kstate);
- if (mwdat->kstate[VK_CONTROL] & 0x80 || mwdat->kstate[VK_SHIFT] & 0x80)
- return 0;
- else {
+ if ( !(mwdat->kstate[VK_CONTROL] & 0x80) && !(mwdat->kstate[VK_SHIFT] & 0x80))
mwdat->fkeyProcessed = false;
- return 0;
- }
+ return 0;
}
+
switch (msg) {
case WM_NCCALCSIZE:
return CSkin::NcCalcRichEditFrame(hwnd, mwdat, ID_EXTBKINPUTAREA, msg, wParam, lParam, MessageSubclassProc);
@@ -573,7 +567,6 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, case WM_CONTEXTMENU:
{
MODULEINFO* mi = MM_FindModule(Parentsi->pszModule);
- HMENU hMenu, hSubMenu;
CHARRANGE sel, all = { 0, -1};
int iSelection;
int iPrivateBG = M->GetByte(mwdat->hContact, "private_bg", 0);
@@ -582,8 +575,8 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, int idFrom = IDC_CHAT_MESSAGE;
GetCursorPos(&pt);
- hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
- hSubMenu = GetSubMenu(hMenu, 2);
+ HMENU hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_CONTEXT));
+ HMENU hSubMenu = GetSubMenu(hMenu, 2);
RemoveMenu(hSubMenu, 9, MF_BYPOSITION);
RemoveMenu(hSubMenu, 8, MF_BYPOSITION);
RemoveMenu(hSubMenu, 4, MF_BYPOSITION);
|