Horizontal Mouse Wheel Event

Win32 Programming


  • 1. Mnemonic for disable item calls OnCancel
    Hey there, I've got a simple MFC dialog-based app I'm working on, and it seems that if I type the mnemonic for an item that has been disabled, my OnCancel() function gets called and I can't figure out why. Any ideas? Matthew Kane XXXX@XXXXX.COM
  • 2. Text on a Dialog Box
    Hi, I would like to put some nice text on a dialog box which is mixed with bold and normal weight, and I might like to add some color to a couple of words. It's a read-only informational block of text. How would I go about doing this? Thanks, Kevin
  • 3. Making the Edit of TreeView multi-lined
    Hi, sounds easy, but it's very complicated... I want to have a custom drawn TreeView with multiline items. The drawing of the tree works perfect but when the EditBox to edit the items text (TVN_BEGINLABELEDIT you know) is created it is - of course - singlelined. Now I wanted to make it multiline and therefore I tried to use ModifyStyle but it didn't succeed. The next approach was to create a CBT-Hook to hook the creation of the Edit and "smuggle" the ES_MULTILINE-Style into the windowstyle but strangely this also didn't succeed. Do you have any suggestions? the CBT-Hook is definitely called (I verified this with TRACE and Spy++). Here's the HookProc-Code (hTree is the HWND of the tree): LRESULT CALLBACK HookCreateWindow (int nCode, WPARAM wParam, LPARAM lParam) { if (nCode == HCBT_CREATEWND) { CBT_CREATEWND* pCWnd = (CBT_CREATEWND*) lParam; if (pCWnd->lpcs->hwndParent == hTree) { pCWnd->lpcs->style |= ES_MULTILINE; TRACE("\nEdit_created. HWND: 0x%x", (HWND) wParam); } } return CallNextHookEx(g_hHook, nCode, wParam, lParam); } Thanks for your answers!
  • 4. Win32 splitter control
    Erik Wiggins a crit: > I'm tring to make a splitter control for an application that is entirly API no MFC. I've got the control to drawl on the screen right. I can capture and release the mouse to track the mouses location on the screen while the user is holding down the left button. Only problem I'm having is moving the splitter it's self. I've been tring to use SetWindowPos to move the window but I get strange resault to say the least. Anyone no a way to move this window around? There are many samples in MSDN. (EnumDesk.cpp, UsbView.c (DDK), old KB 85633, ...)
  • 5. WM_CAPTURECHANGED, why is hwndNewCapture==0?
    Hi, According to the documentation, if a WM_CAPTURECHANGED message is sent to WinProc, lParam is supposed to contain the window that receives the new focus. I've subclassed SysListView32Wnd and I've noticed that if a user tries dragging a rectangle on the desktop, WM_CAPTURECHANGED is sent with lParam==0 so I have no idea who is taking the focus. Furthermore, although Spy++ shows that the window continues to receive WM_MOUSEMOVE messages my WinProc never sees any of them. I've seen many other people post messages where hwndNewCapture was 0 for them to but this isn't documented anywhere. Any idea what is going on? Thanks, Gili

Horizontal Mouse Wheel Event

Postby Jon Berry » Wed, 03 Jun 2009 03:38:57 GMT

Has anyone been able to call mouseEvent to simulate a horizontal scroll 

Whenever I try this nothing seems to happen although vertical works fine.

I'm using this contstant:  MOUSEEVENTF_HWHEEL = 0x1000 

Re: Horizontal Mouse Wheel Event

Postby Remy Lebeau » Wed, 03 Jun 2009 04:30:39 GMT

Are you running on Vista or later?  MOUSEEVENTF_HWHEEL is not supported on 
pre-Vista OS versions.

Remy Lebeau (TeamB) 

Re: Horizontal Mouse Wheel Event

Postby Jon Berry » Wed, 03 Jun 2009 05:32:45 GMT

I tried it using Windows 7.

FYI, I am invoking the mouseEvent from C#

Is it required to have a mouse attached that supports horizontal scrolling?

Return to Win32 Programming


Who is online

Users browsing this forum: No registered users and 90 guest