diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-10 09:24:48 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-07-10 09:24:48 +0000 |
commit | 2a6f15d4ec94a10de5e3aeaf29ac2156ca6616b2 (patch) | |
tree | d96965aeed90153b8103b17c9b31fcf80444b2eb /prototypes | |
parent | 83aba3ca53aee8a12c665e09531ecf187c1df94a (diff) | |
download | fpGUI-2a6f15d4ec94a10de5e3aeaf29ac2156ca6616b2.tar.xz |
* Fixed compilation errors under Windows. * Fixed the MouseEnter and MouseExit message handling.
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/fpgui2/examples/core/eventtest/eventtest.lpi | 7 | ||||
-rw-r--r-- | prototypes/fpgui2/source/core/gdi/gfx_gdi.pas | 23 |
2 files changed, 18 insertions, 12 deletions
diff --git a/prototypes/fpgui2/examples/core/eventtest/eventtest.lpi b/prototypes/fpgui2/examples/core/eventtest/eventtest.lpi index d2803979..f09daf7e 100644 --- a/prototypes/fpgui2/examples/core/eventtest/eventtest.lpi +++ b/prototypes/fpgui2/examples/core/eventtest/eventtest.lpi @@ -1,7 +1,7 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="/"/> + <PathDelim Value="\"/> <Version Value="5"/> <General> <Flags> @@ -9,7 +9,7 @@ </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value="./"/> + <IconPath Value=".\"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -23,7 +23,7 @@ <RunParams> <local> <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> + <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> </local> </RunParams> <RequiredPackages Count="1"> @@ -41,6 +41,7 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> + <PathDelim Value="\"/> <CodeGeneration> <Optimizations> <OptimizationLevel Value="0"/> diff --git a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas index 990d424c..165e77fd 100644 --- a/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas +++ b/prototypes/fpgui2/source/core/gdi/gfx_gdi.pas @@ -726,7 +726,8 @@ begin //finally //Event.Free; //end; - msgp. +// msgp.mouse.x := LoWord(lParam); +// msgp.mouse.y := HiWord(lParam); fpgSendMessage(nil, AWindow, FPGM_MOUSEENTER, msgp); Result := uMsg <> WM_MOUSEMOVE; end else @@ -734,12 +735,13 @@ begin pt.x := LoWord(lParam); pt.y := HiWord(lParam); if uMsg = WM_MOUSEWHEEL then - Windows.ScreenToClient(Handle, @pt); - if (pt.x < 0) or (pt.y < 0) or (pt.x >= ClientWidth) or - (pt.y >= ClientHeight) or CursorInDifferentWindow then + Windows.ScreenToClient(FWinHandle, @pt); + // we should change the Width and Height to ClientWidth, ClientHeight + if (pt.x < 0) or (pt.y < 0) or (pt.x >= Width) or + (pt.y >= Height) or CursorInDifferentWindow then FMouseInWindow := False; - if (not FHasMouseCapture) and (not FMouseInWindow) then + if {(not FHasMouseCapture) and} (not FMouseInWindow) then begin Windows.ReleaseCapture; //Event := TFEvent.Create; @@ -749,9 +751,12 @@ begin //finally //Event.Free; //end; - fpgSendMessage(nil, AWindow, FPGM_MOUSELEAVE, msgp); + msgp.mouse.x := LoWord(lParam); + msgp.mouse.y := HiWord(lParam); + fpgSendMessage(nil, AWindow, FPGM_MOUSEEXIT, msgp); Result := False; - end else + end + else Result := True; end; end; @@ -984,7 +989,7 @@ begin FClipRegion := CreateRectRgn(0, 0, 1, 1); FColor := clText1; - FLineStyle := PS_SOLID; + FLineStyle := lsSolid; FLineWidth := 0; FBackgroundColor := clBoxColor; end; @@ -1196,7 +1201,7 @@ begin tmpdc := CreateCompatibleDC(wapplication.display); SelectObject(tmpdc, TfpgImageImpl(img).BMPHandle); - if img.FIsTwoColor then + if TfpgImageImpl(img).FIsTwoColor then rop := PATCOPY //ROP_DSPDxax else rop := SRCCOPY; |