Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Menu located in the right side Collapse All
Subject Author Date
Izack Lesher Oct 16, 2006 - 1:31 PM

I compiled the dialog sample ProfUIS_Controls and the menu is located in the right side. This happens also in my own dialog based application after adding menu according to the Help.
How can I position the menu in the left side?

Thanks

I. Lesher

Suhai Gyorgy Oct 17, 2006 - 2:20 AM

If I understand right, you have your menu located horizontally on upper side of your dialog, but the menuitems are located on the right side of the menu instead of the left side. I think that can be caused by the language your system uses (Just a guess). For me menuitems in ProfUIS_Controls sample are located on the left side.

Whatever might cause it, you can try to force it to the left side programatically. Check out the LanguageSwitcher sample. In that you can find method called CMainFrame::OnUseLayoutLtr(), which switches to "Left-to-Right" layout. Maybe that’s what you need to use. Although that sample is using SDI, but I guess calls it that method can be just as well used in dialog-based application.

void CMainFrame::OnUseLayoutLtr() 
{
DWORD dwLangLayout = g_ResourceManager->GetLangLayout();
	if( dwLangLayout == DWORD(-1) )
		dwLangLayout = LAYOUT_LTR;
	if( (dwLangLayout&LAYOUT_RTL) == 0 )
		return;
	g_ResourceManager->SetLangLayout( LAYOUT_LTR );
	ModifyStyleEx( WS_EX_LAYOUTRTL, 0, SWP_FRAMECHANGED );
	m_wndStatusBar.ModifyStyleEx( WS_EX_LAYOUTRTL, 0, SWP_FRAMECHANGED );
	RecalcLayout();
	RedrawWindow(
		NULL,
		NULL,
		RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_ALLCHILDREN
		);
	CExtControlBar::stat_RecalcBarMetrics( this );
	CExtControlBar::stat_RedrawFloatingFrames( this );
}