Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
fix ribbon tooltips
  • Loading branch information
T800G committed Jul 18, 2018
1 parent 54ca2e9 commit cdba391
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
20 changes: 17 additions & 3 deletions MsoScroll/MsoScroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,32 @@ LRESULT CALLBACK MouseHookProc(int nCode, WPARAM wMsg, LPARAM lParam)
//Word can also use "PageScroll" method
LPOLESTR pstrMethodName= HIWORD(GetKeyState(VK_MENU)) ? L"LargeScroll" : L"SmallScroll";//scroll by line/cell or by page

//send Alt key up,down,up to fix ribbon tooltips
INPUT ip[3] ;
ZeroMemory(ip, sizeof(ip));
ip[0].type = INPUT_KEYBOARD;
ip[0].ki.wScan = MapVirtualKey(VK_MENU, MAPVK_VK_TO_VSC);
ip[0].ki.dwFlags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
ip[1].type = INPUT_KEYBOARD;
ip[1].ki.wScan = MapVirtualKey(VK_MENU, MAPVK_VK_TO_VSC);
ip[1].ki.dwFlags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_SCANCODE;
ip[2].type = INPUT_KEYBOARD;
ip[2].ki.wScan = MapVirtualKey(VK_MENU, MAPVK_VK_TO_VSC);
ip[2].ki.dwFlags = KEYEVENTF_EXTENDEDKEY | KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
SendInput(3, ip, sizeof(INPUT));

VARIANT vt_, vt1;
vt_.vt = VT_I4;//VB Long type
vt1.vt = VT_I4;
vt_.lVal = 0;
vt1.lVal = 1;

if HIWORD(GetKeyState(VK_SHIFT)) //horizontal
//SendInput might interfere, so use GetAsyncKeyState instead of GetKeyState
if HIWORD(GetAsyncKeyState(VK_SHIFT)) //scroll horizontaly
{
if (zDelta < 0) AutoWrap(DISPATCH_METHOD, NULL, vtActiveWindow.pdispVal, pstrMethodName, 4, vt_, vt1, vt_, vt_); //Left, Right, Up, Down (reverse order!)
else AutoWrap(DISPATCH_METHOD, NULL, vtActiveWindow.pdispVal, pstrMethodName, 4, vt1, vt_, vt_, vt_);
}
else //vertical
else //scroll verticaly
{
//if (g_AppID) //Word
//{
Expand Down
10 changes: 5 additions & 5 deletions MsoScroll/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
//
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEVERSION 1,2,0,0
PRODUCTVERSION 1,2,0,0
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
Expand All @@ -31,9 +31,9 @@ VS_VERSION_INFO VERSIONINFO
#else
VALUE "FileDescription", "Office Scroll Add-In 32-bit\0"
#endif
VALUE "FileVersion", "1.0\0"
VALUE "ProductVersion", "1.0\0"
VALUE "LegalCopyright", "T800 Productions \251 2017\0"
VALUE "FileVersion", "1.2\0"
VALUE "ProductVersion", "1.2\0"
VALUE "LegalCopyright", "T800 Productions \251 2018\0"
VALUE "ProductName", "Office Scroll Add-In\0"
}
}
Expand Down

0 comments on commit cdba391

Please sign in to comment.