Intellimouse Support

Is there any Freeware Compoment for IntelliMouse Support ?
or can someone write the code how to support IntelliMouse
on All my Forms ?

Thanx
LVL 2
k6__Asked:
Who is Participating?
 
BoRiSCommented:
K6___

I recieved this not so long ago, it shows how to trap the mousewheel message in windows 9x and send a mesage is NT for the mouse
    wheel...this should shed so light...

     
                  unit Unit1;
                   
                  interface
                   
                  uses
                    Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
                  StdCtrls, ComCtrls;
                   
                  type
                    (*
                    WM_MOUSEWHEEL
                    fwKeys = LOWORD(wParam); // key flags
                    zDelta = (short) HIWORD(wParam); // wheel rotation
                    xPos = (short) LOWORD(lParam); // horizontal position of pointer
                    yPos = (short) HIWORD(lParam); // vertical position of pointer
                   
                    fwKeys: Value of the low-order word of wParam. Indicates whether
                            various virtual keys are down. This parameter can be any
                            combination of the following values:
                                MK_CONTROL Set if the CTRL key is down.
                                MK_LBUTTON Set if the left mouse button is down.
                                MK_MBUTTON Set if the middle mouse button is down.
                                MK_RBUTTON Set if the right mouse button is down.
                                MK_SHIFT Set if the SHIFT key is down.
                    *)
                    TWMMouseWheelNT = record
                      msg: Cardinal; // msg
                      fwKeys: smallint;
                      rotation: smallint; // wParam
                      mousepos: TSmallPoint; // lParam
                      result: longint;
                    end;
                   
                    TWMMouseWheel95 = record
                      msg: Cardinal; // msg
                      rotation: integer; // wParam
                      mousepos: TSmallPoint; // lParam
                      result: longint;
                    end;
                   
                    TForm1 = class(TForm)
                      Button1: TButton;
                      Memo1: TRichEdit;
                      procedure FormCreate(Sender: TObject);
                      procedure Button1Click(Sender: TObject);
                    private
                      { Private declarations }
                      FWheelMsg: Cardinal;
                    protected
                      { Protected declarations }
                      procedure wheelMove(numScroll: integer);
                    public
                      { Public declarations }
                      procedure WndProc(var Message: TMessage); override;
                      procedure WMMouseWheel(var Msg: TWMMouseWheelNT);
                                message WM_MOUSEWHEEL;
                    end;
                   
                  var
                    Form1: TForm1;
                   
                  implementation
                   
                  {$R *.DFM}
                   
                  procedure TForm1.FormCreate(Sender: TObject);
                  begin
                    Memo1.Lines.LoadFromFile('C:\WINDOWS\WIN.INI');
                   
                    // line below only is meaningfull under Windows 95
                    FWheelMsg := RegisterWindowMessage('MSWHEEL_ROLLMSG');
                  end;
                   
                  procedure TForm1.wheelMove(numScroll: integer);
                  var
                    i: integer;
                  begin
                    if (numScroll > 0) then
                      for i := 0 to numScroll do
                        SendMessage(Memo1.Handle, WM_VSCROLL, SB_LINEUP, 0)
                    else
                      for i := 0 downto numScroll do
                        SendMessage(Memo1.Handle, WM_VSCROLL, SB_LINEDOWN, 0);
                  end;
                   
                  procedure TForm1.WndProc(var Message: TMessage);
                  begin
                    // called only under Windows 95
                    inherited WndProc(Message);
                    if (TMessage(Message).Msg = FWheelMsg) then
                      wheelMove( TWMMouseWheel95(Message).Rotation div WHEEL_DELTA );
                  end;
                   
                  procedure TForm1.WMMouseWheel(var Msg: TWMMouseWheelNT);
                  begin
                    // called only under NT 4
                    wheelMove( msg.Rotation div WHEEL_DELTA );
                  end;
                   
                  procedure TForm1.Button1Click(Sender: TObject);
                  begin
                    Close;
                  end;
                   
                  end.

Thank you to Peter Below for this...

this is how to add the functionallity in windows 9x and NT read the comments in the code for more info, if you are using delphi 4 then there are the OnMouseWheel, OnMouseWheelDown, OnMouseWheelUp....

Later
BoRiS
0
 
k6__Author Commented:
Edited text of question
0
 
rwilson032697Commented:
If you want components looks at these:

http://ourworld.compuserve.com/homepages/S_Page/wheelms.zip
http://ftp/d20free/mswheel.zip (on DSP)

If you are using D4 then use the OnMouseWheel, OnMouseWheelUp and  OnMouseWheelDown events.

If you are not using D4 then you will need to handle the wm_mousewheel message.

Cheers,

Raymond.

0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
k6__Author Commented:
i need freeware components or sample .. i don't have money to
pay them =(

Thanx
0
 
viktornetCommented:
What's an intelli mouse anyway???

Viktor
0
 
rwilson032697Commented:
The second one is free:

http://ftp/d20free/mswheel.zip (on DSP)

Cheers,

Raymond.

Viktor: An Intellimouse is made by Microsoft and has a little wheel in between the two mouse button so you can move the scrollbar.
0
 
viktornetCommented:
Oh, my mother's computer has got one of those since she bought the computer about 5 weeks ago. I'm still using Win95 and my old 133MHz computer....
0
 
k6__Author Commented:
ermh sorry again =) .. i want the source not just the DCU's only.

0
 
rwilson032697Commented:
Are you using D4?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.