mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Fixed AnchorX/Y issue (caused by ef1cf223)
				
					
				
			http://rainmeter.net/forum/viewtopic.php?f=14&t=16798
This commit is contained in:
		| @@ -2818,18 +2818,19 @@ void MeterWindow::UpdateWindow(int alpha, bool reset, bool canvasBeginDrawCalled | ||||
| 	} | ||||
|  | ||||
| 	BLENDFUNCTION blendPixelFunction = {AC_SRC_OVER, 0, alpha, AC_SRC_ALPHA}; | ||||
| 	POINT ptWindowScreenPosition = {m_ScreenX, m_ScreenY}; | ||||
| 	POINT ptSrc = {0, 0}; | ||||
| 	SIZE szWindow = {m_Canvas->GetW(), m_Canvas->GetH()}; | ||||
|  | ||||
| 	if (!canvasBeginDrawCalled) m_Canvas->BeginDraw(); | ||||
|  | ||||
| 	HDC dcMemory = m_Canvas->GetDC(); | ||||
| 	if (!UpdateLayeredWindow(m_Window, nullptr, nullptr, &szWindow, dcMemory, &ptSrc, 0, &blendPixelFunction, ULW_ALPHA)) | ||||
| 	if (!UpdateLayeredWindow(m_Window, nullptr, &ptWindowScreenPosition, &szWindow, dcMemory, &ptSrc, 0, &blendPixelFunction, ULW_ALPHA)) | ||||
| 	{ | ||||
| 		// Retry after resetting WS_EX_LAYERED flag. | ||||
| 		RemoveWindowExStyle(WS_EX_LAYERED); | ||||
| 		AddWindowExStyle(WS_EX_LAYERED); | ||||
| 		UpdateLayeredWindow(m_Window, nullptr, nullptr, &szWindow, dcMemory, &ptSrc, 0, &blendPixelFunction, ULW_ALPHA); | ||||
| 		UpdateLayeredWindow(m_Window, nullptr, &ptWindowScreenPosition, &szWindow, dcMemory, &ptSrc, 0, &blendPixelFunction, ULW_ALPHA); | ||||
| 	} | ||||
| 	m_Canvas->ReleaseDC(dcMemory); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 spx
					spx