本文整理汇总了C++中CenterOnScreen函数的典型用法代码示例。如果您正苦于以下问题:C++ CenterOnScreen函数的具体用法?C++ CenterOnScreen怎么用?C++ CenterOnScreen使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CenterOnScreen函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BWindow
MainWindow::MainWindow()
: BWindow(BRect(0, 0, 1, 1), TR("Fonts"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE | B_AUTO_UPDATE_SIZE_LIMITS)
{
fDefaultsButton = new BButton("defaults", TR("Defaults"),
new BMessage(kMsgSetDefaults), B_WILL_DRAW);
fDefaultsButton->SetEnabled(false);
fRevertButton = new BButton("revert", TR("Revert"),
new BMessage(kMsgRevert), B_WILL_DRAW);
fRevertButton->SetEnabled(false);
// BTabView* tabView = new BTabView("tabview", B_WIDTH_FROM_LABEL);
BBox* box = new BBox(B_FANCY_BORDER, NULL);
fFontsView = new FontView();
// tabView->AddTab(fFontsView);
box->AddChild(fFontsView);
fFontsView->UpdateFonts();
SetLayout(new BGroupLayout(B_VERTICAL));
const float kInset = 10;
AddChild(BGroupLayoutBuilder(B_VERTICAL)
.Add(box)
// .Add(tabView)
.Add(BSpaceLayoutItem::CreateVerticalStrut(kInset))
.Add(BGroupLayoutBuilder(B_HORIZONTAL)
.Add(fDefaultsButton)
.Add(BSpaceLayoutItem::CreateHorizontalStrut(kInset))
.Add(fRevertButton)
.Add(BSpaceLayoutItem::CreateGlue())
)
.SetInsets(kInset, kInset, kInset, kInset)
);
if (fSettings.WindowCorner() == BPoint(-1, -1)) {
// center window on screen
CenterOnScreen();
} else {
MoveTo(fSettings.WindowCorner());
// make sure window is on screen
BScreen screen(this);
if (!screen.Frame().InsetByCopy(10, 10).Intersects(Frame()))
CenterOnScreen();
}
fRunner = new BMessageRunner(this, new BMessage(kMsgCheckFonts), 3000000);
// every 3 seconds
fDefaultsButton->SetEnabled(fFontsView->IsDefaultable());
}
示例2: BWindow
ScreenshotWindow::ScreenshotWindow(BWindow* parent, BRect frame)
:
BWindow(frame, B_TRANSLATE("Screenshot"),
B_FLOATING_WINDOW_LOOK, B_FLOATING_SUBSET_WINDOW_FEEL,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS),
fDownloadPending(false),
fWorkerThread(-1)
{
AddToSubset(parent);
fScreenshotView = new BitmapView("screenshot view");
fScreenshotView->SetExplicitMaxSize(
BSize(B_SIZE_UNLIMITED, B_SIZE_UNLIMITED));
BGroupView* groupView = new BGroupView(B_VERTICAL);
groupView->SetViewColor(0, 0, 0);
fScreenshotView->SetLowColor(0, 0, 0);
// Build layout
BLayoutBuilder::Group<>(this, B_VERTICAL)
.AddGroup(groupView)
.Add(fScreenshotView)
.SetInsets(B_USE_WINDOW_INSETS)
.End()
;
CenterOnScreen();
}
示例3: BWindow
PrefWindow::PrefWindow(const BMessenger &messenger)
: BWindow(BRect(0, 0, 375, 185), B_TRANSLATE("Terminal settings"),
B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
B_NOT_RESIZABLE|B_NOT_ZOOMABLE|B_AUTO_UPDATE_SIZE_LIMITS),
fPreviousPref(new PrefHandler(PrefHandler::Default())),
fSavePanel(NULL),
fDirty(false),
fTerminalMessenger(messenger)
{
BLayoutBuilder::Group<>(this, B_VERTICAL)
.AddGroup(B_VERTICAL)
.SetInsets(10, 10, 10, 10)
.Add(new AppearancePrefView(B_TRANSLATE("Appearance"),
fTerminalMessenger))
.AddGroup(B_HORIZONTAL)
.Add(fSaveAsFileButton = new BButton("savebutton",
B_TRANSLATE("Save to file" B_UTF8_ELLIPSIS),
new BMessage(MSG_SAVEAS_PRESSED), B_WILL_DRAW))
.AddGlue()
.Add(fRevertButton = new BButton("revertbutton",
B_TRANSLATE("Cancel"), new BMessage(MSG_REVERT_PRESSED),
B_WILL_DRAW))
.Add(fSaveButton = new BButton("okbutton", B_TRANSLATE("OK"),
new BMessage(MSG_SAVE_PRESSED), B_WILL_DRAW))
.End()
.End();
fSaveButton->MakeDefault(true);
AddShortcut('Q', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
AddShortcut('W', B_COMMAND_KEY, new BMessage(B_QUIT_REQUESTED));
CenterOnScreen();
Show();
}
示例4: BSize
void
ScreenshotWindow::_ResizeToFitAndCenter()
{
// Find out dimensions of the largest screenshot of this package
ScreenshotInfoList screenshotInfos;
if (fPackage.Get() != NULL)
screenshotInfos = fPackage->ScreenshotInfos();
int32 largestScreenshotWidth = 0;
int32 largestScreenshotHeight = 0;
const uint32 numScreenshots = fPackage->ScreenshotInfos().CountItems();
for (uint32 i = 0; i < numScreenshots; i++) {
const ScreenshotInfo& info = screenshotInfos.ItemAtFast(i);
if (info.Width() > largestScreenshotWidth)
largestScreenshotWidth = info.Width();
if (info.Height() > largestScreenshotHeight)
largestScreenshotHeight = info.Height();
}
fScreenshotView->SetExplicitMinSize(
BSize(largestScreenshotWidth, largestScreenshotHeight));
Layout(false);
// TODO: Limit window size to screen size (with a little margin),
// the image should then become scrollable.
float minWidth;
float minHeight;
GetSizeLimits(&minWidth, NULL, &minHeight, NULL);
ResizeTo(minWidth, minHeight);
CenterOnScreen();
}
示例5: DWindow
AsciiWindow::AsciiWindow(void)
:
DWindow(BRect(0.0f, 0.0f, kWindowWidth, kWindowHeight),
B_TRANSLATE("ASCII table"), B_TITLED_WINDOW, B_AUTO_UPDATE_SIZE_LIMITS),
fIsZoomed(false),
fLastFrame(Frame())
{
BListView* listView = new BListView("listView", B_MULTIPLE_SELECTION_LIST,
B_WILL_DRAW);
BScrollView* listScrollView = new BScrollView("scrollView", listView, 0,
false, true, B_NO_BORDER);
listView->SetFont(be_fixed_font);
listView->AddItem(new BStringItem(B_TRANSLATE(" Dec Hex Oct Code Description")));
listView->AddItem(new BStringItem(""));
for (int i = 0; i < 128; i++) {
char* row;
asprintf(&row, " %3d %2x %3o %3s %s", i, i, i,
sAsciiTable[i].code, sAsciiTable[i].description.String());
listView->AddItem(new BStringItem(row));
free(row);
}
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(listScrollView)
.SetInsets(-1)
.End();
CenterOnScreen();
}
示例6: Lock
void
MidiPlayerWindow::InitControls()
{
Lock();
showScope->SetValue(scopeEnabled ? B_CONTROL_ON : B_CONTROL_OFF);
scopeView->SetEnabled(scopeEnabled);
inputOff->SetMarked(true);
reverbNone->SetMarked(reverb == B_REVERB_NONE);
reverbCloset->SetMarked(reverb == B_REVERB_CLOSET);
reverbGarage->SetMarked(reverb == B_REVERB_GARAGE);
reverbIgor->SetMarked(reverb == B_REVERB_BALLROOM);
reverbCavern->SetMarked(reverb == B_REVERB_CAVERN);
reverbDungeon->SetMarked(reverb == B_REVERB_DUNGEON);
be_synth->SetReverb(reverb);
volumeSlider->SetValue(volume);
if (windowX != -1 && windowY != -1)
MoveTo(windowX, windowY);
else
CenterOnScreen();
Unlock();
}
示例7: BWindow
StatusWindow::StatusWindow(const char *text, BRect aRect)
: BWindow(aRect, B_TRANSLATE("BePDF status"),
B_MODAL_WINDOW ,
B_NOT_RESIZABLE|B_NOT_ZOOMABLE|B_NOT_CLOSABLE) {
BStringView *stringView = new BStringView("stringView", text);
mStatus = new BStatusBar("mStatus");
mStatus->SetMaxValue(1);
mTotal = -1;
mText = new BStringView("mText", "");
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(0)
.AddGlue()
.AddGroup(B_HORIZONTAL)
.AddGlue()
.Add(stringView)
.AddGlue()
.End()
.AddGlue()
.AddGroup(B_HORIZONTAL)
.Add(mText)
.AddGlue()
.End()
.Add(mStatus);
ResizeTo(500, 100);
CenterOnScreen();
Show();
}
示例8: wxWizard
CStartDialog::CStartDialog(const wxString &title) : wxWizard( NULL, wxID_ANY, title, wxNullBitmap )
{
std::vector<std::vector<wxString> > hitters, pitchers;
m_good = true;
// CDataImporter importer( "2012_DEMO_DB.8.xlsx" );
// importer.ReadData( hitters, pitchers );
SetIcon( wxICON( BaseballDraft ) );
m_db = new CDb();
m_db->OpenConnection( "draft.db" );
m_league = NULL;
if( !m_db->IsConnected() )
wxMessageBox( "Cannot establish connection to database" );
else
{
// m_db->InsertPlayers( hitters, pitchers );
m_db->GetLeagueList( m_leaguesList );
if( !m_leaguesList.empty() )
{
GetPageAreaSizer()->Add( CreateOrSelectLeagueWizard( this, m_leaguesList ) );
CenterOnScreen();
Bind( wxEVT_WIZARD_CANCEL, &CStartDialog::OnExit, this );
m_delete->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &CStartDialog::OnLeagueDelete, this );
m_new->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &CStartDialog::OnLeagueCreated, this );
m_edit->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &CStartDialog::OnLeagueCreated, this );
m_leagues->Bind( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, &CStartDialog::OnSelect, this );
}
else
{
m_good = false;
delete m_db;
}
}
}
示例9: BWindow
SettingsWindow::SettingsWindow(BRect frame, SettingsMessage* settings)
:
BWindow(frame, B_TRANSLATE("Settings"), B_TITLED_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL, B_AUTO_UPDATE_SIZE_LIMITS
| B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
fSettings(settings)
{
fApplyButton = new BButton(B_TRANSLATE("Apply"), new BMessage(MSG_APPLY));
fCancelButton = new BButton(B_TRANSLATE("Cancel"),
new BMessage(MSG_CANCEL));
fRevertButton = new BButton(B_TRANSLATE("Revert"),
new BMessage(MSG_REVERT));
fOpenFilePanel = NULL;
float spacing = be_control_look->DefaultItemSpacing();
BTabView* tabView = new BTabView("settings pages", B_WIDTH_FROM_LABEL);
tabView->SetBorder(B_NO_BORDER);
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
.Add(tabView)
.Add(new BSeparatorView(B_HORIZONTAL))
.AddGroup(B_HORIZONTAL)
.SetInsets(B_USE_WINDOW_SPACING, B_USE_DEFAULT_SPACING,
B_USE_WINDOW_SPACING, 0)
.Add(fRevertButton)
.AddGlue()
.Add(fCancelButton)
.Add(fApplyButton);
tabView->AddTab(_CreateGeneralPage(spacing));
tabView->AddTab(_CreateFontsPage(spacing));
tabView->AddTab(_CreateProxyPage(spacing));
_SetupFontSelectionView(fStandardFontView,
new BMessage(MSG_STANDARD_FONT_CHANGED));
_SetupFontSelectionView(fSerifFontView,
new BMessage(MSG_SERIF_FONT_CHANGED));
_SetupFontSelectionView(fSansSerifFontView,
new BMessage(MSG_SANS_SERIF_FONT_CHANGED));
_SetupFontSelectionView(fFixedFontView,
new BMessage(MSG_FIXED_FONT_CHANGED));
fApplyButton->MakeDefault(true);
if (!frame.IsValid())
CenterOnScreen();
// load settings from disk
_RevertSettings();
// apply to WebKit
_ApplySettings();
// Start hidden
Hide();
Show();
}
示例10: BWindow
ScreenSaverWindow::ScreenSaverWindow()
:
BWindow(BRect(50.0f, 50.0f, 50.0f + kWindowWidth, 50.0f + kWindowHeight),
B_TRANSLATE_SYSTEM_NAME("ScreenSaver"), B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
fSettings.Load();
fMinWidth = floorf(be_control_look->DefaultItemSpacing()
* (kWindowWidth / kDefaultItemSpacingAt12pt));
font_height fontHeight;
be_plain_font->GetHeight(&fontHeight);
float textHeight = ceilf(fontHeight.ascent + fontHeight.descent);
fMinHeight = ceilf(std::max(kWindowHeight, textHeight * 28));
// Create the password editing window
fPasswordWindow = new PasswordWindow(fSettings);
fPasswordWindow->Run();
// Create the tab view
fTabView = new TabView();
fTabView->SetBorder(B_NO_BORDER);
// Create the controls inside the tabs
fFadeView = new FadeView(B_TRANSLATE("General"), fSettings);
fModulesView = new ModulesView(B_TRANSLATE("Screensavers"), fSettings);
fTabView->AddTab(fFadeView);
fTabView->AddTab(fModulesView);
// Create the topmost background view
BView* topView = new BView("topView", B_WILL_DRAW);
topView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
topView->SetExplicitAlignment(BAlignment(B_ALIGN_USE_FULL_WIDTH,
B_ALIGN_USE_FULL_HEIGHT));
topView->SetExplicitMinSize(BSize(fMinWidth, fMinHeight));
BLayoutBuilder::Group<>(topView, B_VERTICAL)
.SetInsets(0, B_USE_DEFAULT_SPACING, 0, B_USE_WINDOW_SPACING)
.Add(fTabView)
.End();
SetLayout(new BGroupLayout(B_VERTICAL));
GetLayout()->AddView(topView);
fTabView->Select(fSettings.WindowTab());
if (fSettings.WindowFrame().left > 0 && fSettings.WindowFrame().top > 0)
MoveTo(fSettings.WindowFrame().left, fSettings.WindowFrame().top);
if (fSettings.WindowFrame().Width() > 0
&& fSettings.WindowFrame().Height() > 0) {
ResizeTo(fSettings.WindowFrame().Width(),
fSettings.WindowFrame().Height());
}
CenterOnScreen();
}
示例11: BWindow
// ResourceUsageWindow - Constructor
ResourceUsageWindow::ResourceUsageWindow(BRect frame, BList &list)
: BWindow (frame, B_TRANSLATE("Resource Usage"), B_TITLED_WINDOW_LOOK,
B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE)
{
InitWindow(list);
CenterOnScreen();
Show();
}
示例12: BWindow
Window::Window()
:
BWindow(BRect(100, 100, 620, 200), "Alert-Test", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
BMenu* sizeMenu = new BMenu("Button size");
sizeMenu->SetLabelFromMarked(true);
sizeMenu->SetRadioMode(true);
sizeMenu->AddItem(new BMenuItem("As usual", NULL));
sizeMenu->AddItem(new BMenuItem("From widest", NULL));
sizeMenu->AddItem(new BMenuItem("From label", NULL));
sizeMenu->ItemAt(0)->SetMarked(true);
fSizeField = new BMenuField("Button size", sizeMenu);
BMenu* typeMenu = new BMenu("Alert type");
typeMenu->SetLabelFromMarked(true);
typeMenu->SetRadioMode(true);
typeMenu->AddItem(new BMenuItem("Empty", NULL));
typeMenu->AddItem(new BMenuItem("Info", NULL));
typeMenu->AddItem(new BMenuItem("Idea", NULL));
typeMenu->AddItem(new BMenuItem("Warning", NULL));
typeMenu->AddItem(new BMenuItem("Stop", NULL));
typeMenu->ItemAt(0)->SetMarked(true);
fTypeField = new BMenuField("Alert type", typeMenu);
BMenu* spacingMenu = new BMenu("Button spacing");
spacingMenu->SetLabelFromMarked(true);
spacingMenu->SetRadioMode(true);
spacingMenu->AddItem(new BMenuItem("Even", NULL));
spacingMenu->AddItem(new BMenuItem("Offset", NULL));
spacingMenu->ItemAt(0)->SetMarked(true);
fSpacingField = new BMenuField("Button spacing", spacingMenu);
fCountSlider = new BSlider("count", "Button count", NULL, 1, 3,
B_HORIZONTAL);
fCountSlider->SetValue(3);
fCountSlider->SetLimitLabels("1", "3");
fCountSlider->SetHashMarkCount(3);
fCountSlider->SetHashMarks(B_HASH_MARKS_BOTTOM);
fLastStringView = new BStringView("last pressed", "");
fLastStringView->SetAlignment(B_ALIGN_CENTER);
BButton* button = new BButton("Show alert", new BMessage(kMsgShowAlert));
BLayoutBuilder::Group<>(this, B_VERTICAL)
.Add(fSizeField)
.Add(fTypeField)
.Add(fSpacingField)
.Add(fCountSlider)
.AddGlue()
.Add(fLastStringView)
.Add(button)
.SetInsets(B_USE_DEFAULT_SPACING);
CenterOnScreen();
SetFlags(Flags() | B_CLOSE_ON_ESCAPE);
}
示例13: BWindow
MainWindow::MainWindow()
:
BWindow(BRect(0, 0, 300, 400), "Caya", B_TITLED_WINDOW, 0),
fWorkspaceChanged(false)
{
fStatusView = new StatusView("statusView");
SearchBarTextControl* searchBox =
new SearchBarTextControl(new BMessage(kSearchContact));
fListView = new RosterListView("buddyView");
fListView->SetInvocationMessage(new BMessage(CAYA_OPEN_CHAT_WINDOW));
BScrollView* scrollView = new BScrollView("scrollview", fListView,
B_WILL_DRAW, false, true);
// Wrench menu
BPopUpMenu* wrenchMenu = new BPopUpMenu("Wrench");
(void)wrenchMenu->AddItem(new BMenuItem("About" B_UTF8_ELLIPSIS,
new BMessage(B_ABOUT_REQUESTED)));
(void)wrenchMenu->AddItem(new BSeparatorItem());
(void)wrenchMenu->AddItem(new BMenuItem("Preferences" B_UTF8_ELLIPSIS,
new BMessage(CAYA_SHOW_SETTINGS)));
(void)wrenchMenu->AddItem(new BSeparatorItem());
(void)wrenchMenu->AddItem(new BMenuItem("Quit",
new BMessage(B_QUIT_REQUESTED)));
wrenchMenu->SetTargetForItems(this);
// Tool icon
BResources* res = CayaResources();
BBitmap* toolIcon = IconFromResources(res, kToolIcon);
delete res;
// Wrench tool button
ToolButton* wrench = new ToolButton(NULL, NULL);
wrench->SetBitmap(toolIcon);
wrench->SetMenu(wrenchMenu);
SetLayout(new BGridLayout(1, 2));
AddChild(BGridLayoutBuilder(1, 2)
.Add(searchBox, 0, 0)
.Add(wrench, 1, 0)
.Add(scrollView, 0, 1, 2)
.Add(fStatusView, 0, 2, 2)
.SetInsets(5, 5, 5, 10)
);
AddShortcut('a', B_COMMAND_KEY, new BMessage(B_ABOUT_REQUESTED));
MoveTo(BAlert::AlertPosition(Bounds().Width(), Bounds().Height() / 2));
// Filter messages using Server
fServer = new Server();
AddFilter(fServer);
CenterOnScreen();
//TODO check for errors here
ReplicantStatusView::InstallReplicant();
}
示例14: wxFrame
InstConsoleWindow::InstConsoleWindow(Instance *inst, MainWindow* mainWin, bool quitAppOnClose)
: wxFrame(NULL, -1, _("MultiMC Console"), wxDefaultPosition, wxSize(620, 250))
{
SetAprilFonts(this);
m_quitAppOnClose = quitAppOnClose;
m_mainWin = mainWin;
m_running = nullptr;
m_inst = inst;
crashReportIsOpen = false;
wxPanel *mainPanel = new wxPanel(this, -1);
wxBoxSizer *mainSizer = new wxBoxSizer(wxVERTICAL);
mainPanel->SetSizer(mainSizer);
consoleTextCtrl = new wxTextCtrl(mainPanel, -1, wxEmptyString,
wxDefaultPosition, wxSize(200, 100),
wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH);
mainSizer->Add(consoleTextCtrl, wxSizerFlags(1).Expand().Border(wxALL, 8));
consoleTextCtrl->SetBackgroundColour(*wxWHITE);
wxBoxSizer *btnBox = new wxBoxSizer(wxHORIZONTAL);
mainSizer->Add(btnBox, 0, wxEXPAND | wxBOTTOM | wxRIGHT | wxLEFT, 8);
wxButton *crashReportBtn = new wxButton(mainPanel, ID_GENREPORT, _("Generate Crash &Report"));
btnBox->Add(crashReportBtn, wxSizerFlags(0).Align(wxALIGN_LEFT));
btnBox->AddStretchSpacer();
killButton = new wxButton(mainPanel, wxID_DELETE, _("&Kill Minecraft"));
btnBox->Add(killButton, wxSizerFlags(0).Align(wxALIGN_RIGHT));
closeButton = new wxButton(mainPanel, wxID_CLOSE, _("&Close"));
btnBox->Add(closeButton, wxSizerFlags(0).Align(wxALIGN_RIGHT));
// close is close at this point. there is no linked process yet.
SetCloseIsHide(false);
consoleIcons = new wxIconArray();
wxMemoryInputStream iconInput1(console, sizeof(console));
wxMemoryInputStream iconInput2(console_error, sizeof(console_error));
wxMemoryInputStream iconInput3(console24, sizeof(console24));
wxMemoryInputStream iconInput4(console_error24, sizeof(console_error24));
wxIcon icon_OK,icon_BAD,icon_OK24,icon_BAD24;
icon_OK.CopyFromBitmap(wxBitmap(wxImage(iconInput1)));
icon_BAD.CopyFromBitmap(wxBitmap(wxImage(iconInput2)));
icon_OK24.CopyFromBitmap(wxBitmap(wxImage(iconInput3)));
icon_BAD24.CopyFromBitmap(wxBitmap(wxImage(iconInput4)));
consoleIcons->Add(icon_OK);
consoleIcons->Add(icon_BAD);
consoleIcons->Add(icon_OK24);
consoleIcons->Add(icon_BAD24);
// Create the task bar icon.
trayIcon = new ConsoleIcon(this);
SetState(STATE_OK);
CenterOnScreen();
}
示例15: GetSizeLimits
void
ScreenshotWindow::_ResizeToFitAndCenter()
{
float minWidth;
float minHeight;
GetSizeLimits(&minWidth, NULL, &minHeight, NULL);
ResizeTo(minWidth, minHeight);
CenterOnScreen();
}