mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	About/Manage: Fixed that dialog fails to open on first click/bang.
This commit is contained in:
		@@ -233,10 +233,8 @@ INT_PTR CDialogAbout::OnInitDialog(WPARAM wParam, LPARAM lParam)
 | 
				
			|||||||
		c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
 | 
							c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
 | 
				
			||||||
		GetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
							GetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	else
 | 
					
 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	SetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
						SetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return TRUE;
 | 
						return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -203,16 +203,6 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
 | 
				
			|||||||
	HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
 | 
						HICON hIcon = LoadIcon(Rainmeter->GetInstance(), MAKEINTRESOURCE(IDI_TRAY));
 | 
				
			||||||
	SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
 | 
						SendMessage(m_Window, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c_WindowPlacement.length == 0)
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
 | 
					 | 
				
			||||||
		GetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
		SetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
 | 
						HWND item = GetDlgItem(m_Window, IDC_MANAGE_TAB);
 | 
				
			||||||
	TCITEM tci = {0};
 | 
						TCITEM tci = {0};
 | 
				
			||||||
	tci.mask = TCIF_TEXT;
 | 
						tci.mask = TCIF_TEXT;
 | 
				
			||||||
@@ -241,6 +231,14 @@ INT_PTR CDialogManage::OnInitDialog(WPARAM wParam, LPARAM lParam)
 | 
				
			|||||||
	item = GetDlgItem(m_TabSkins->GetWindow(), IDC_MANAGESKINS_FILE_TEXT);
 | 
						item = GetDlgItem(m_TabSkins->GetWindow(), IDC_MANAGESKINS_FILE_TEXT);
 | 
				
			||||||
	SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0);
 | 
						SendMessage(item, WM_SETFONT, (WPARAM)m_FontBold, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (c_WindowPlacement.length == 0)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							c_WindowPlacement.length = sizeof(WINDOWPLACEMENT);
 | 
				
			||||||
 | 
							GetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						SetWindowPlacement(m_Window, &c_WindowPlacement);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return TRUE;
 | 
						return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user