|
|
|
|
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.
Subject |
Author |
Date |
|
Saroj Acharya
|
Dec 3, 2004 - 9:59 AM
|
Hi, I would like to detect if my Prof_UIS application has run for the first time. If so, would like to set the initial size and positions of the controlbar, toolbar and menus. I am told that I have to use DockControlBarInnerOuter, DockControlBarLTRB and SetInitDesiredSizeFloating. I have not been able to make use of these functions accurately. Would appreciate if you could guide me through this with a sample code. I call SetInitDesiredSizeFloating right after creating the controlbar, but it is not working. Besides, I don’t know if I have to create my own mechanism to detect the first-time application launch or there already is a way to find out from the registry entries cereated by Prof_UIS. Appreciate your help. Saroj
|
|
Technical Support
|
Dec 4, 2004 - 10:25 AM
|
Dear Saroj, If you need to detect whether your application starts for the first time with regard to the task of setting your control bars’ initial positions, then you have to do nothing because this feature is provided by Prof-UIS. All frame window-based sample applications (SDI, MDI, SDIDOCVIEW, MDIDOCVIEW, ProfStudio, BitmapEditior, FormEditor, DrawCli, StyleEditor, and etc.) distributed with Prof-UIS detect their first startup on any given computer. Please take a look at how the CExtControlBar::ProfileBarStateLoad static method is called in the CMainFrame::OnCreate method in the mentioned above applications. The CExtControlBar::ProfileBarStateLoad method is always called from inside the if( ! ) condition because it returns false if the layout of resizable control bars has never yet been saved to the system registry (i.e. the application runs for the first time and all control bars need to be docked to their initial positions). Please also note that the CExtControlBar::SetInitial...() methods must be called before invoking the Create method of the resizable control bars.
|
|