本文整理汇总了C++中PositionWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ PositionWindow函数的具体用法?C++ PositionWindow怎么用?C++ PositionWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PositionWindow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Hide
void
TBarView::HideDeskbar(bool hide)
{
BRect screenFrame = (BScreen(Window())).Frame();
if (hide) {
Hide();
PositionWindow(screenFrame);
SizeWindow(screenFrame);
} else {
Show();
SizeWindow(screenFrame);
PositionWindow(screenFrame);
}
}
示例2: PositionWindow
// Sets the content of the balloon (plain text only)
void CBalloonHelp::SetContent(const CString& strContent)
{
m_strContent = strContent;
// if already visible, resize & move
if ( NULL != m_hWnd )
PositionWindow();
}
示例3: set_type_hint
/** \brief
*
* Constructor. Sets up a modeless window and adds the HUD component to a
* ScrolledWindow component.
*
*/
HUDWindow::HUDWindow()
{
set_type_hint(Gdk::WINDOW_TYPE_HINT_NORMAL);
set_title(gettext("Player HUD Window"));
set_resizable(true);
set_decorated(true);
set_position(Gtk::WIN_POS_CENTER);
set_modal(false);
set_icon( Gdk::Pixbuf::create_from_xpm_data( Helmet_xpm ) );
PositionWindow();
f_charView.AddHUDColumns();
f_charView.set_border_width( 1 );
//f_charView.update();
//
f_scrolledWindow.add( f_charView );
f_scrolledWindow.set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC );
f_scrolledWindow.set_shadow_type( Gtk::SHADOW_IN );
f_scrolledWindow.set_border_width( 1 );
//
f_mainBox.pack_start( f_scrolledWindow, Gtk::PACK_EXPAND_WIDGET );
f_mainBox.pack_start( f_statusBox, Gtk::PACK_SHRINK );
//
add( f_mainBox );
f_statusBox.Update();
show_all_children();
}
示例4: MythOSDWindow
void OSD::LoadWindows(void)
{
static const char* default_windows[7] = {
"osd_message", "osd_input", "program_info", "browse_info", "osd_status",
"osd_program_editor", "osd_debug"};
for (int i = 0; i < 7; i++)
{
const char* window = default_windows[i];
MythOSDWindow *win = new MythOSDWindow(NULL, window, true);
win->SetPainter(m_CurrentPainter);
if (win->Create())
{
PositionWindow(win);
LOG(VB_PLAYBACK, LOG_INFO, LOC +
QString("Loaded window %1").arg(window));
m_Children.insert(window, win);
}
else
{
LOG(VB_GENERAL, LOG_ERR, LOC + QString("Failed to load window %1")
.arg(window));
delete win;
}
}
}
示例5: GetStyle
void CHyperLink::PreSubclassWindow()
{
// We want to get mouse clicks via STN_CLICKED
DWORD dwStyle = GetStyle();
::SetWindowLong(m_hWnd, GWL_STYLE, dwStyle | SS_NOTIFY);
// Set the URL as the window text
if (m_strURL.IsEmpty())
GetWindowText(m_strURL);
// Check that the window text isn't empty. If it is, set it as the URL.
CString strWndText;
GetWindowText(strWndText);
if (strWndText.IsEmpty()) {
ASSERT(!m_strURL.IsEmpty()); // Window and URL both empty. DUH!
SetWindowText(m_strURL);
}
// Adjust size of window to fit URL if necessary
PositionWindow();
// Load up the (standard) hyperlink cursor
m_hLinkCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
// Create the tooltip
CRect rect;
GetClientRect(rect);
m_ToolTip.Create(this);
m_ToolTip.AddTool(this, m_strURL, rect, TOOLTIP_ID);
CStatic::PreSubclassWindow();
}
示例6: ActiveMonitors
void OSD::InitMeterWnd(MeterWnd &mWnd) {
mWnd.AlwaysOnTop(_settings->AlwaysOnTop());
mWnd.HideAnimation(_settings->HideAnim(), _settings->HideSpeed());
mWnd.VisibleDuration(_settings->HideDelay());
std::vector<Monitor> monitors = ActiveMonitors();
for (unsigned int i = 1; i < monitors.size(); ++i) {
mWnd.Clone();
}
PositionWindow(monitors[0], mWnd);
std::vector<LayeredWnd *> clones = mWnd.Clones();
for (unsigned int i = 1; i < monitors.size(); ++i) {
PositionWindow(monitors[i], *clones[i - 1]);
}
}
示例7: PositionWindow
void CHyperLink::SetAutoSize(bool bAutoSize /* = true */)
{
m_bAdjustToFit = bAutoSize;
if (::IsWindow(GetSafeHwnd()))
PositionWindow();
}
示例8: Create
HWND
CalendarCtrl::CreateGrid(HWND hwndparent, DataView *dv, wyBool isDate, wyBool isResult)
{
m_hwndparent= hwndparent;
wyChar* temp = dv->m_data->m_rowarray->GetRowExAt(CustomGrid_GetCurSelRow(dv->m_hwndgrid))->m_row[CustomGrid_GetCurSelCol(dv->m_hwndgrid)];
if(temp)
m_orgdata.SetAs(temp);
else
m_orgdata.SetAs(L"(NULL)");
m_isDate = isDate;
m_date.SetAs(m_orgdata);
m_dv = dv;
m_isResult = isResult;
m_hwnd = Create();
if(isDate)
ShowWindow(GetDlgItem(m_hwnd,IDC_DATETIMEPICKER1),SW_HIDE);
CustomGrid_GetSubItemRect(m_hwndparent, m_row, m_col, &m_rectCell);
PositionWindow(&m_rectCell);
ShowWindow(m_hwnd,SW_SHOW);
return m_hwnd;
}
示例9: SetWindowText
// Sets the title of the balloon
void CBalloonHelp::SetTitle(const CString& strTitle)
{
SetWindowText(strTitle);
// if already visible, resize & move
if ( NULL != m_hWnd )
PositionWindow();
}
示例10: PositionWindow
void CHyperLink::SetAutoSize(BOOL bAutoSize /* = TRUE */)
{
m_bAdjustToFit = bAutoSize;
if (::IsWindow(GetSafeHwnd()))
PositionWindow();
}
示例11: SetUrl
/*
SetUrl()
*/
void CHyperLink::SetUrl(LPCSTR lpcszUrl)
{
m_strUrl.Format("%s",lpcszUrl);
if(m_bAdjustToFit)
if(::IsWindow(GetSafeHwnd()))
PositionWindow();
}
示例12: PositionWindow
/////////////////////////////////////////////////////////////////////////////
// CXHyperLink operations
void CXHyperLink::SetURL(CString strURL)
{
m_strURL = strURL;
if (::IsWindow(GetSafeHwnd()))
{
PositionWindow();
}
}
示例13: ASSERT
///////////////////////////////////////////////////////////////////////////////
// SetWindowText
void CXHyperLink::SetWindowText(LPCTSTR lpszString)
{
ASSERT(lpszString);
if (!lpszString)
return;
CStatic::SetWindowText(_T(""));
RedrawWindow();
CStatic::SetWindowText(lpszString);
PositionWindow();
}
示例14: ShowFrameRate
void ShowFrameRate(FrameRateWnd *w, int frameRate)
{
if (w->frameRate == frameRate) {
return;
}
w->frameRate = frameRate;
SIZE s = GetIdealSize(w);
PositionWindow(w, s);
ScheduleRepaint(w->hwnd);
}
示例15: SetFont
void CStaticHyperLink::SetDisplayString(CString strDisplay)
{
m_strDisplay = strDisplay;
if (::IsWindow(GetSafeHwnd()))
{
SetFont();
SetWindowText(m_strDisplay);
PositionWindow();
}
}