* Cursor fixes on Windows OS 4.x-dev

Tue, 18 May 2021 18:05:32 +0200

author
yakup beyoglu
date
Tue, 18 May 2021 18:05:32 +0200
branch
4.x-dev
changeset 1682
c84d224c7608
parent 1681
8ab453216da3
child 1683
6be449e62668

* Cursor fixes on Windows OS

Source/Gorgon/UI/TooltipManager.h file | annotate | diff | comparison | revisions
Source/Gorgon/WindowManager/DWM/Window.cpp file | annotate | diff | comparison | revisions
Testing/Source/Manual/Window.cpp file | annotate | diff | comparison | revisions
--- a/Source/Gorgon/UI/TooltipManager.h	Mon May 17 23:58:56 2021 +0300
+++ b/Source/Gorgon/UI/TooltipManager.h	Tue May 18 18:05:32 2021 +0200
@@ -55,6 +55,10 @@
         
         /// Tooltip manager requires a widget container to work.
         TooltipManager(WidgetContainer &container);
+
+        TooltipManager(TooltipManager&&) = default;
+
+        TooltipManager(const TooltipManager&) = delete;
         
         /// Destructor
         ~TooltipManager();
--- a/Source/Gorgon/WindowManager/DWM/Window.cpp	Mon May 17 23:58:56 2021 +0300
+++ b/Source/Gorgon/WindowManager/DWM/Window.cpp	Tue May 18 18:05:32 2021 +0200
@@ -550,7 +550,7 @@
     
     void SetPointer(Window &wind, Graphics::PointerType type) { 
         HINSTANCE instance=GetModuleHandle(NULL);
-        LPCSTR cursor;
+        LPCWSTR cursor;
         
         switch(type) {
         case Graphics::PointerType::Wait:
@@ -612,7 +612,7 @@
             break;
         }
         
-        LoadCursorW(instance, cursor);
+        auto c = LoadCursorW(NULL, cursor);
         SetCursor(c);
     }
     
--- a/Testing/Source/Manual/Window.cpp	Mon May 17 23:58:56 2021 +0300
+++ b/Testing/Source/Manual/Window.cpp	Tue May 18 18:05:32 2021 +0200
@@ -53,19 +53,19 @@
 	Graphics::Layer l;
 	wind.Add(l);
 
-	Graphics::Bitmap img;
+	/*Graphics::Bitmap img;
 	if(!img.Import("test.png")) {
         std::cout<<"Test.png is not found"<<std::endl;
         exit(0);
     }
 
-    img.Prepare();
+    img.Prepare();*/
 
-	Graphics::Bitmap icon;
-	icon.Import("icon.png");
+	//Graphics::Bitmap icon;
+	//icon.Import("icon.png");
 
-	WM::Icon ico(icon.GetData());
-	wind.SetIcon(ico);
+	//WM::Icon ico(icon.GetData());
+	//wind.SetIcon(ico);
     
     Graphics::Bitmap cursor1({16,16}, Graphics::ColorMode::RGBA);
     cursor1.ForAllPixels([&](int x, int y) {
@@ -176,8 +176,8 @@
 	for(int i=0; i<4; i++)
 		img2.DrawStretched(l, 25+16+i*32, 0, 16, 400, {1.f, 1.f, 1.f, .3f});
 		
-	for(int i=0; i<10; i++)
-		img.Draw(l, 150, 150);
+	//for(int i=0; i<10; i++)
+		//img.Draw(l, 150, 150);
 	
 	//img.Draw(l, 50, 50, {.2f, .2f, .8f, 1.f});
     

mercurial