当前位置: 首页>>代码示例>>C++>>正文


C++ SetCaption函数代码示例

本文整理汇总了C++中SetCaption函数的典型用法代码示例。如果您正苦于以下问题:C++ SetCaption函数的具体用法?C++ SetCaption怎么用?C++ SetCaption使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetCaption函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetCaption

void ThumbItem::InitCaption(bool get_caption)
{
    if (!HasCaption() && get_caption)
        SetCaption(GalleryUtil::GetCaption(m_path));
    if (!HasCaption())
        SetCaption(m_name);
}
开发者ID:bfosberry,项目名称:mythtv,代码行数:7,代码来源:thumbview.cpp

示例2: strcpy

void EclButton::SetProperties ( const char *_name, int _x, int _y, int _w, int _h,
		 	   				    const UnicodeString &_caption, const UnicodeString &_tooltip )
{
    if ( strlen(_name) > SIZE_ECLBUTTON_NAME )
    {
    }
    else
    {
        strcpy ( m_name, _name );
    }

	m_x = _x;
	m_y = _y;
	m_w = _w;
	m_h = _h;

	if ( !&_caption )
	{
		// Could use LANGUAGEPHRASE here instead, but that's cross projecs, so probably shouldn't...
		SetCaption( UnicodeString(_name) );
	}
	else
	{
		SetCaption ( _caption );
	}

	SetTooltip ( _tooltip );
	
}
开发者ID:gene9,项目名称:Darwinia-and-Multiwinia-Source-Code,代码行数:29,代码来源:eclbutton.cpp

示例3: Render

    void Render( int realX, int realY, bool highlighted, bool clicked )
    {
        if( g_app->GetGame()->m_winner != -1 ) return;
        if( g_app->GetWorld()->AmISpectating() ) return;

        int permitDefection = g_app->GetGame()->GetOptionValue( "PermitDefection" );
        if( permitDefection )
        {
            AlliancesWindow *parent = (AlliancesWindow *)m_parent;
            int teamId = parent->m_selectionTeamId;

            if( teamId == -1 ) return;
            
            Team *myTeam = g_app->GetWorld()->GetMyTeam();
            Team *thisTeam = g_app->GetWorld()->GetTeam(teamId);
        
            if( myTeam && thisTeam )
            {
                if( myTeam->m_allianceId == thisTeam->m_allianceId )
                {
                    if( myTeam == thisTeam )
                    {
                        // This is my team
                        if( g_app->GetWorld()->CountAllianceMembers(myTeam->m_allianceId) == 1 )
                        {
                            // I am the only member of this alliance, so theres nothing to do here
                            return;
                        }
                        SetCaption( "dialog_alliance_leave", true );
                        SetTooltip( "tooltip_alliance_leave", true );
                    }
                    else
                    {
                        // Another member of the same alliance
                        SetCaption( "dialog_alliance_kick", true );
                        SetTooltip( "tooltip_alliance_kick", true );
                    }
                }
                else if( myTeam->m_allianceId != thisTeam->m_allianceId )
                {
                    // A different (enemy) alliance
                    SetCaption( "dialog_alliance_join", true );
                    SetTooltip( "tooltip_alliance_join", true );
                }
            }
        
            InterfaceButton::Render( realX, realY, highlighted, clicked );
        }
    }
开发者ID:cahocachi,项目名称:DEFCON,代码行数:49,代码来源:alliances_window.cpp

示例4: Init

GUIButton::GUIButton()
{
	Init();
	SetCaption(NULL);
	SetCaptionFont(NULL);
	SetCaptionColor(DEFAULT_TEXT_COLOR);
}
开发者ID:lightsgoout,项目名称:interview,代码行数:7,代码来源:gui_button.cpp

示例5: SetCaption

	VOID ExportConsoleDialog::StartNewTask( const CHAR* strCaption, FLOAT fTaskPercentOfWhole )
	{
		SetCaption( strCaption );
		m_fCurrentTaskMin += m_fCurrentTaskSize;
		m_fCurrentTaskSize = fTaskPercentOfWhole;
		SetProgress( 0 );
	}
开发者ID:KNeal,项目名称:Oculus,代码行数:7,代码来源:ExportConsoleDialog.cpp

示例6: SetCaption

void CTestGame::Init()
{
    CGame::Init();

    SetCaption("Test Game");
    mouse->SetVisible(false);

    //load image
    //mysurface = CSurface::Load("hi.png");
    #define width 256
    #define height 256
    mysurface = CSurface::CreateSurface(width,height);

    for(int y = 0; y < height; y++)
    {
        for(int x = 0; x < width; x++)
        {
            mysurface->SetPixel(x,y,x|y);
        }
    }

    #undef width
    #undef height

    //map inputs
    show = new CInput(MODE_TOGGLE);

    if(usingGamepad)
        gamepad->Map(show,GAMEPAD_A);
}
开发者ID:conwill708,项目名称:Code-Blocks-Projects,代码行数:30,代码来源:CTestGame.cpp

示例7: while

		/*=============================================================================
		-- Sets the caption of the text in the middle.
		=============================================================================*/
		void ButtonCaption::SetCaption(String caption)
		{
			mCaption = caption;
			WeakPtr<Text> text = DynamicPtrCast<Text>(GetChild(IEI_BUTTONCAPTION_TEXT).lock());

			if (!text.expired())
			{
				text.lock()->SetText(caption);
				Font *font = text.lock()->GetFont();

				unsigned width = (unsigned)font->GetTextLengthPx(mCaption.GetStd());
				unsigned height = (unsigned)font->GetCharHeightPx();


				//clip any characters that don't fit inside from the text element
				while (width > GetWidth())
				{
					mCaption.Remove(mCaption.Size()-1,mCaption.Size());
					SetCaption(mCaption);
					width = (unsigned)font->GetTextLengthPx(mCaption.GetStd());
				}

				//properly center the text
				text.lock()->SetRelPos( Vector2D<int>((GetWidth()-width)/2, (GetHeight()-height)/2) );
			}
		}
开发者ID:DanWatkins,项目名称:GlanceEngineSDK,代码行数:29,代码来源:ButtonCaption.cpp

示例8: SetCaptionmark

void CHomeLibraryBox::OnSkinChange()
{
	if ( m_pDocument ) delete m_pDocument;
	m_pDocument = NULL;
	m_pdLibraryFiles = m_pdLibraryVolume = m_pdLibraryHashRemaining = NULL;

	SetCaptionmark( _T("CHomeLibraryBox.Caption") );

	CXMLElement* pXML = Skin.GetDocument( _T("CHomeLibraryBox") );
	if ( pXML == NULL ) return;

	SetCaption( pXML->GetAttributeValue( _T("title"), _T("Library") ) );
	HICON hIcon = CoolInterface.ExtractIcon( IDR_LIBRARYFRAME, Settings.General.LanguageRTL );
	if ( hIcon ) SetIcon( hIcon );

	m_pDocument = new CRichDocument();

	CMap< CString, const CString&, CRichElement*, CRichElement* > pMap;
	if ( ! m_pDocument->LoadXML( pXML, &pMap ) ) return;

	pMap.Lookup( _T("LibraryFiles"), m_pdLibraryFiles );
	pMap.Lookup( _T("LibraryVolume"), m_pdLibraryVolume );
	pMap.Lookup( _T("LibraryHashRemaining"), m_pdLibraryHashRemaining );

	SetDocument( m_pDocument );

	Update();

	// Update Dropshadow	(Note: Caused app freeze when allowing hovered item during skin change)
	m_wndTip.DestroyWindow();
	m_wndTip.Create( this, &Settings.Interface.TipLibrary );
}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:32,代码来源:CtrlHomePanel.cpp

示例9: WEB_WINDOW_PARENT

CWebWindow::CWebWindow(CWnd* pParent /*=NULL*/)
: WEB_WINDOW_PARENT(CWebWindow::IDD, pParent)
{
	//{{AFX_DATA_INIT(CWebWindow)
	//}}AFX_DATA_INIT
	m_bChild = FALSE;
	m_bAutoKill = FALSE;
	m_bResizable = TRUE;
	m_pMessageParent = NULL;
	m_pWebCustomizer = NULL;
	m_dwSessionCookie = 0;
	m_SendStatus = 0;
	m_Handle = 0;
	m_pXMLDoc = NULL;
	SetCaption(RGB(0,0,0),RGB(0,0,0),0);
	m_bQueryAttachXML = FALSE;
	m_rBrowser.SetRectEmpty();
	m_rWindow.SetRectEmpty();
	m_rTarget.SetRectEmpty();
	m_nIEVersion = 0;
	m_bBrowserRect = FALSE;
	m_bIEBack = m_bIEForward = m_bIEStop = m_bIERefresh = FALSE;
	m_InWindowDropTarget	=	NULL;
	m_bCatchNavigate	=	TRUE;
	m_bCatchWindowOpen	=	TRUE;
	m_bFileDownload = FALSE;
	m_nFileDownload = -1;
	m_bNavigateStarted = FALSE;
}
开发者ID:0anion0,项目名称:IBN,代码行数:29,代码来源:WebWindow.cpp

示例10: SetCaption

////////////////////////////////////////////////////////////
// TViewWallTextureDialog
// -----------------
//
void TViewWallTextureDialog::SetupWindow ()
{
	TViewBitmapListDialog::SetupWindow();

	SetCaption ("Viewing Wall textures");
	pChooseStatic->SetCaption ("Choose texture name:");

	// Insert wall textures names in list box
	assert (pBitmapList->IsWindow());

	//BOOL ForgetInfo = FALSE;
	if ( NumWTexture <= 0 )
	{
		ReadWTextureInfo();
		//ForgetInfo = TRUE;
	}
	assert (WTexture != NULL);

	pBitmapList->ClearList();

	// Add Wall texture names (except the first: "-")
	for (SHORT i = 1 ; i < NumWTexture ; i++)
	{
		assert (WTexture[i] != NULL);
		pBitmapList->AddString (WTexture[i]->Name);
	}

//	if ( ForgetInfo == TRUE )
//		ForgetWTextureInfo();
}
开发者ID:GarMeridian3,项目名称:Meridian59,代码行数:34,代码来源:viewbmp.cpp

示例11: SetCaption

void VDUINumericLabelW32::SetValue(int v) {
	if (v != mValue) {
		mValue = v;

		SetCaption(VDswprintf(mFormat.c_str(), 1, &v).c_str());
	}
}
开发者ID:KGE-INC,项目名称:VirtualDub,代码行数:7,代码来源:w32label.cpp

示例12: SetCaption

bool CProgressThreadDlg::ExecuteFunctionWithProgressDialog(ProgressFunctionType* pfnFunction,
    const CString& sProgressTitle,
    int nSteps,
    void* pData,
    int nPriority)
{
  SetCaption(sProgressTitle);
  SetSteps(nSteps);
  CProgressThreadInfo Info;
  Info.m_pStatusDlg = this;
  Info.m_pfnFunction = pfnFunction;
  Info.m_pData = pData;
  m_pThread = AfxBeginThread(ProgressDialogWorkerThread, &Info, nPriority, 0, CREATE_SUSPENDED);

  // If the thread failed to create itself
  if (m_pThread == NULL) {
    ASSERT(0);
    return false;
  }

  // Start timer
  m_timeStart = CTime::GetCurrentTime();
  m_timeEnd = m_timeStart;

  // bring up the dialog modal (thread will close it for us)
  DoModal();

  return true;
}
开发者ID:nsights,项目名称:nSIGHTS,代码行数:29,代码来源:ProgressThreadDlg.cpp

示例13: main_window

WndForm::WndForm(SingleWindow &_main_window,
                 const TCHAR *Caption,
                 int X, int Y, int Width, int Height,
                 const WindowStyle style):
  main_window(_main_window),
  mModalResult(0),
  mColorTitle(Color::YELLOW),
  mhTitleFont(&Fonts::MapBold),
  mOnTimerNotify(NULL), mOnKeyDownNotify(NULL)
{
  set(main_window, X, Y, Width, Height, add_border(style));

  // Create ClientWindow

  SetBackColor(Color(0xDA, 0xDB, 0xAB));

  WindowStyle client_style;
  client_style.control_parent();
  client_area.set(*this, mClientRect.left, mClientRect.top,
                  mClientRect.right - mClientRect.left,
                  mClientRect.bottom - mClientRect.top, client_style);
  client_area.SetBackColor(GetBackColor());

  cbTimerID = set_timer(1001, 500);

  SetCaption(Caption);

#if !defined(ENABLE_SDL) && !defined(NDEBUG)
  ::SetWindowText(hWnd, mCaption);
#endif
}
开发者ID:Plantain,项目名称:XCSoar,代码行数:31,代码来源:Form.cpp

示例14: emTkGroup

emTestPanel::TkTestGrp::TkTestGrp(ParentArg parent, const emString & name)
	: emTkGroup(parent,name)
{
	SetCaption("Toolkit Test");
	EnableAutoExpansion();
	SetAutoExpansionThreshold(900.0);
}
开发者ID:ackalker,项目名称:eaglemode,代码行数:7,代码来源:emTestPanel.cpp

示例15: ZeroMemory

void AboutWindow::Initialise (HWND hWnd, unsigned int uID)
{	
	// Make the ID global
	m_ID = uID;
	m_parenthwnd = hWnd;
	//m_hwnd = hWnd;

	// Temporary string value for uID
	char szID[SIZE_STRING];
	ZeroMemory (szID, SIZE_STRING);

	SetParentHWND (hWnd);
	SetBgColor (GetSysColor (COLOR_BTNFACE));
	SetCaption (TEXT ("About"));
	SetWindowStyle (FS_STYLESTANDARD);

	// Create the class name
	strcat_s (m_szClassname, SIZE_STRING, "ABOUTWindowClass");
	sprintf_s (szID, SIZE_STRING, "%d", uID);
	strcat_s (m_szClassname, SIZE_STRING, szID);


	CreateAppWindow (m_szClassname, 70, 0, 397, 200, true);
	m_uihandler.SetWindowProperties (0, 0, 299, 0, GetSysColor (COLOR_BTNFACE));
	SetWindowPosition (FS_CENTER);
	Show ();
}
开发者ID:dannydraper,项目名称:CedeCryptClassic,代码行数:27,代码来源:AboutWindow.cpp


注:本文中的SetCaption函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。