Self-made mouse-shape over buttons ?? 
Author Message
 Self-made mouse-shape over buttons ??

Hello,

Some times ago, I posted a question where I explained, that in my program
my self-made cursor doesn't work when passing over self-made buttons,
windows-buttons (OK, Cancel, ...) and radiobuttons in my windows (build
with the TPW-Workshop). Every time, when I make a little movement over a
button, the self-made shape of my mousepointer changes into the
windows-arrow. Otherwise, in the othere places of the windows, there are
no problems with the self-made pointer.
Programmers answered me (thanks again!) to look for WM_SetCursor, but
even with this hint I can't get it right. :-(
Some information about my program, one part, where I create a window
(EndWindow) that has the problem with buttons as described above:
Type
  TApp = object(TApplication)
    procedure InitInstance; virtual;
    procedure InitMainWindow; virtual;
  end;

  PMyMainWindow = ^TMyMainWindow;
  TMyMainWindow = object(TWindow)
    ...
    procedure WMSetCursor(var Message: TMessage); virtual wm_first +  
wm_SetCursor;
  end;

  PEndWindow = ^TEndWindow;
  TEndWindow = object(TDialog)
  {This window is similar to the window you get when closing your
Windows, it  gives also the text 'This will close...' + 2 buttons
(Yes/No)}
  {On these buttons I can't see my own cursor}
    ...
    procedure WMSetCursor(var Bericht: TMessage); virtual wm_first +
wm_SetCursor;
  end;

   ...
procedure TMyMainWindow.WMSetCursor(var Message: TMessage);
    ...
    begin
      SetCursor(LoadCursor(hInstance, 'CURSOR2'));
      CaseA := True;
    end
  else SetCursor(LoadCursor(hInstance, 'CURSOR1'));
  end;
  {Here, in the main window I build some hypertext, this changement works
perfectly}

   ...
procedure TEndWindow.WMSetCursor(var Message: TMessage);
begin
  SetCursor(LoadCursor(hInstance, 'CURSOR1'));
end;

What did I wrong, and what is the solution?
       Thanks in advance!



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. self-made cursor above windows-button?

2. Self-made cursors over self-made buttons (The Real Mission Impossible!) ??

3. Mouse Button and Color of mouse

4. mouse cursor shape in bp7

5. Self-Made Programs

6. Programming a self-made cursor on a windows-button?

7. Programming a self-made cursor above a windows-button?

8. Making Buttons Disabled.

9. Making the TColumn.ButtonStyle button appear on entering the column cell

10. Making a button in Acrobat Reader 3.0 with Delphi

11. Mouse Button Handler - CODE

12. Right mouse button in DBGrid

 

 
Powered by phpBB® Forum Software