示例#1
0
void size_windows()
{
	if (!/*g_minimised*/IsIconic(g_main_window) && !ui_initialising)
	{		
		RECT rc_main_client;
		GetClientRect(g_main_window, &rc_main_client);
		
		HDWP dwp = BeginDeferWindowPos(7);
		if (dwp)
		{
			
			int status_height = 0;
			if (g_status) 
			{

				//uSendMessage(g_status, WM_SETREDRAW, FALSE, 0);
				uSendMessage(g_status,WM_SIZE,0,0);
				RECT rc_status;
				GetWindowRect(g_status, &rc_status);
				
				status_height += rc_status.bottom-rc_status.top;
				
				//dwp = DeferWindowPos(dwp, g_status, 0, 0, rc_main_client.bottom-status_height, rc_main_client.right-rc_main_client.left, status_height, SWP_NOZORDER|SWP_NOREDRAW);
				
			}
			if (g_status_pane.get_wnd()) 
			{
				int cy = g_status_pane.get_ideal_height();
				RedrawWindow(g_status_pane.get_wnd(), 0, 0, RDW_INVALIDATE);
				dwp = DeferWindowPos(dwp, g_status_pane.get_wnd(), 0, 0, rc_main_client.bottom-status_height-cy, rc_main_client.right-rc_main_client.left, cy, SWP_NOZORDER);
				status_height += cy;
			}
			int rebar_height=0;
			
			if (g_rebar) 
			{
				RECT rc_rebar;
				GetWindowRect(g_rebar, &rc_rebar);
				rebar_height = rc_rebar.bottom-rc_rebar.top;
			}
			if (g_layout_window.get_wnd())
				dwp = DeferWindowPos(dwp, g_layout_window.get_wnd(), 0, 0, rebar_height, rc_main_client.right-rc_main_client.left, rc_main_client.bottom-rc_main_client.top-rebar_height-status_height, SWP_NOZORDER);
			if (g_rebar) 
			{
				dwp = DeferWindowPos(dwp, g_rebar, 0, 0, 0, rc_main_client.right-rc_main_client.left, rebar_height, SWP_NOZORDER);
			}
			
			EndDeferWindowPos(dwp);

			if (g_status)
			{
				status_bar::set_part_sizes(status_bar::t_parts_none);
			}
			
			
		}
	}
}
示例#2
0
void make_ui()
{
	ui_initialising = true;
	
	RECT rc;
	GetWindowRect(g_main_window, &rc);
	
	g_layout_window.create(g_main_window);
	
	create_rebar();
	create_status();
	if (settings::show_status_pane) g_status_pane.create(g_main_window);
	
	g_layout_window.set_focus();
	ui_initialising = false;
}
示例#3
0
void make_ui()
{
	ui_initialising = true;
	
	RECT rc;
	GetWindowRect(g_main_window, &rc);
	
	long flags = 0;
	if (cfg_frame == 1) flags |= WS_EX_CLIENTEDGE;
	if (cfg_frame == 2) flags |= WS_EX_STATICEDGE;

	g_layout_window.create(g_main_window);
	
	create_rebar();
	create_status();
	if (settings::show_status_pane) g_status_pane.create(g_main_window);
	
	g_layout_window.set_focus();
	ui_initialising = false;
}