• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ShowModuleInfo

VOID ShowModuleInfo(HWND hwnd, PCTSTR pszModulePath) {

   SetWindowText(hwnd, TEXT(""));   // Clear the output box

   CToolhelp thProcesses(TH32CS_SNAPPROCESS);
   PROCESSENTRY32 pe = { sizeof(pe) };
   BOOL fOk = thProcesses.ProcessFirst(&pe);
   AddText(hwnd, TEXT("Pathname: %s\r\n\r\n"), pszModulePath);
   AddText(hwnd, TEXT("Process Information:\r\n"));
   AddText(hwnd, TEXT("     PID    %-*s  Process\r\n"), 
	   s_cchAddress, TEXT("BaseAddr"));

   for (; fOk; fOk = thProcesses.ProcessNext(&pe)) {
      CToolhelp thModules(TH32CS_SNAPMODULE, pe.th32ProcessID);
      MODULEENTRY32 me = { sizeof(me) };
      BOOL fOk = thModules.ModuleFirst(&me);
      for (; fOk; fOk = thModules.ModuleNext(&me)) {
         if (_tcscmp(me.szExePath, pszModulePath) == 0) {
            AddText(hwnd, TEXT("  %08X  %p  %s\r\n"), 
               pe.th32ProcessID, me.modBaseAddr, pe.szExeFile);
         }
      }
   }
}
开发者ID:melvinvarkey,项目名称:ANCI_C_Training,代码行数:24,代码来源:ProcessInfo.cpp


示例2: AddText

LRESULT CAddTaskLinksEdit::OnDocUrlModified(WPARAM wParam, LPARAM lParam)
{
	if (0 == lParam)
		return 0;

	BOOL	bCheck = (BOOL) wParam;
	CString	strUrl = (LPCTSTR) lParam;

	if (bCheck)
		AddText(strUrl);
	else
		RemoveLine(strUrl);

	return 0;
}
开发者ID:techpub,项目名称:archive-code,代码行数:15,代码来源:AddTaskLinksEdit.cpp


示例3: ParseWordList

void ParseWordList (TraverseCtx &Ctx, CXMLElement *pElement)
	{
	int i;

	//	Parse all attributes

	for (i = 0; i < pElement->GetAttributeCount(); i++)
		AddText(Ctx, pElement->GetAttribute(i));

	//	If this has sub-elements, then recurse

	if (pElement->GetContentElementCount())
		{
		for (i = 0; i < pElement->GetContentElementCount(); i++)
			ParseWordList(Ctx, pElement->GetContentElement(i));
		}

	//	Otherwise, add the content 

	else
		{
		AddText(Ctx, pElement->GetContentText(0));
		}
	}
开发者ID:Arkheias,项目名称:Transcendence,代码行数:24,代码来源:Words.cpp


示例4: IngameWindow

iwTrade::iwTrade(const nobBaseWarehouse& wh, const GameWorldViewer& gwv, GameCommandFactory& gcFactory)
    : IngameWindow(wh.CreateGUIID(), (unsigned short) - 2, (unsigned short) - 2, 400, 194, _("Trade"), LOADER.GetImageN("resource", 41)),
      wh(wh), gwv(gwv), gcFactory(gcFactory), possibleSrcWarehouses(gwv.GetPlayer().GetWarehousesForTrading(wh))
{
    // Get title of the player
    SetTitle(_("Trade with %s") + gwv.GetWorld().GetPlayer(wh.GetPlayer()).name);
    // Gebäudebild und dessen Schatten
    AddImage( 0, 100, 144, LOADER.GetNationImage(wh.GetNation(), 250 + 5 * wh.GetBuildingType()));

    const unsigned left_column = 200;

    this->AddComboBox(4, left_column, 84, 160, 18, TC_GREY, NormalFont, 90); // Ware/Figure names
    this->AddText(1, left_column, 30, "Deal in:", COLOR_YELLOW, glArchivItem_Font::DF_LEFT, NormalFont);
    ctrlComboBox* box = this->AddComboBox(2, left_column, 44, 160, 18, TC_GREY, NormalFont, 200); // Ware or figure?
    box->AddString(_("Wares"));
    box->AddString(_("Settlers"));
    this->AddText(3, left_column, 70, "Type:", COLOR_YELLOW, glArchivItem_Font::DF_LEFT, NormalFont);


    // Create possible wares, figures
    for(unsigned i = 0; i < WARE_TYPES_COUNT; ++i)
    {
        // Only add one shield type
        if(GoodType(i) != ConvertShields(GoodType(i)))
            continue;
        // Don't add nothing or empty water
        if(i == GD_NOTHING || i == GD_WATEREMPTY)
            continue;
        wares.push_back(GoodType(i));
    }
    for(unsigned i = 0; i < JOB_TYPES_COUNT; ++i)
    {
        // Can't trade boat carriers
        if(i == JOB_BOATCARRIER)
            continue;
        jobs.push_back(Job(i));
    }

    AddImage(5, left_column + 20, 130, NULL, _("Ware you like to trade"));
    AddEdit(6, left_column + 34, 120, 39 , 20, TC_GREY, NormalFont)->SetNumberOnly(true);
    AddText(7, left_column + 75, 125, "/ 20", COLOR_YELLOW, glArchivItem_Font::DF_LEFT, NormalFont);

    AddTextButton(8, left_column, 150, 150, 22, TC_GREEN2, _("Send"), NormalFont);

    // Choose wares at first
    box->SetSelection(0);
    Msg_ComboSelectItem(2, 0);
}
开发者ID:viksuhor,项目名称:s25client,代码行数:48,代码来源:iwTrade.cpp


示例5: IngameWindow

iwPostWindow::iwPostWindow(GameWorldViewer& gwv)
    : IngameWindow(CGI_POSTOFFICE, 0xFFFF, 0xFFFF, 254, 295, _("Post office"), LOADER.GetImageN("resource", 41)), gwv(gwv)
{
    AddImageButton( 0, 18, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 190));   // Viewer: 191 - Papier
    AddImageButton( 1, 56, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 30));    // Viewer:  31 - Soldat
    AddImageButton( 2, 91, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 20));    // Viewer:  21 - Geologe
    AddImageButton( 3, 126, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 28));   // Viewer:  29 - Wage
    AddImageButton( 4, 161, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 189));  // Viewer: 190 - Neue Nachricht
    AddImageButton( 5, 199, 25, 35, 35, TC_GREY, LOADER.GetImageN("io", 79));   // Viewer:  80 - Notiz
    AddImage(  6, 126, 151, LOADER.GetImageN("io", 228));
    AddImageButton( 7, 18, 242, 30, 35, TC_GREY, LOADER.GetImageN("io", 225));  // Viewer: 226 - Hilfe
    AddImageButton( 8, 51, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 102));  // Viewer: 103 - Schnell zurück
    AddImageButton( 9, 81, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 103));  // Viewer: 104 - Zurück
    AddImageButton(10, 111, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 104)); // Viewer: 105 - Vor
    AddImageButton(11, 141, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 105)); // Viewer: 106 - Schnell vor


    gotoButton = AddImageButton(14, 181, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 107)); // Goto, nur sichtbar wenn Nachricht mit Koordinaten da
    gotoButton->SetVisible(false);
    deleteButton = AddImageButton(15, 211, 246, 30, 26, TC_GREY, LOADER.GetImageN("io", 106)); // Mülleimer, nur sichtbar, wenn Nachricht da
    deleteButton->SetVisible(false);



    postMsgInfos = AddText(18, 127, 228, "", MakeColor(255, 188, 100, 88), glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM, SmallFont);
    postMsgInfos->SetVisible(false);

    postImage = AddImage(13, 127, 155, LOADER.GetImageN("io", 225));

    // Multiline-Teil mit drei leeren Zeilen erzeugen
    ctrlMultiline* text = AddMultiline(12, 126, 141, 200, 50, TC_INVISIBLE, NormalFont, glArchivItem_Font::DF_CENTER | glArchivItem_Font::DF_BOTTOM | glArchivItem_Font::DF_NO_OUTLINE);
    text->EnableBox(false);
    text->AddString("", COLOR_WINDOWBROWN, false);
    text->AddString("", COLOR_WINDOWBROWN, false);
    text->AddString("", COLOR_WINDOWBROWN, false);

    SetMessageText(_("No letters!"));

    acceptButton = AddImageButton(16, 87, 185, 30, 26, TC_GREEN1, LOADER.GetImageN("io", 32)); // Button mit Haken, zum Annehmen von Verträgen
    acceptButton->SetVisible(false);
    declineButton = AddImageButton(17, 137, 185, 30, 26, TC_RED1, LOADER.GetImageN("io", 40)); // Button mit Kreuz, zum Ablehnen von Verträgen
    declineButton->SetVisible(false);

    currentMessage = 0;
    DisplayPostMessage();

    lastSize = GameClient::inst().GetPostMessages().size();
}
开发者ID:MarcusSt,项目名称:s25client,代码行数:48,代码来源:iwPostWindow.cpp


示例6: Actor

ActorTip::ActorTip(const gedString *tip)
	: Actor(ACTOR_TIP_NAME, NULL, CANVAS, Text::GetDimensions(*tip).Width() + 6, Text::GetDimensions(*tip).Height() + 4, true)
{
	getImage()->SetZDepth(CURSOR_DEPTH - 1);

	int x = GameControl::Get()->getMouseX() + 20, 
		y = GameControl::Get()->getMouseY() + 20, 
		width = Width(), 
		height = Height();

	if(x + width > GameControl::Get()->Width())
		x -= x + width - GameControl::Get()->Width();

	if(y + height > GameControl::Get()->Height())
		y -= y + height - GameControl::Get()->Height();

	getImage()->SetPos(x, y);

	
	//Draw
	KrRGBA *pixels = getCanvasResource()->Pixels(), colorBack, colorBlack;

	colorBack.c.red		= 255;
	colorBack.c.green	= 255;
	colorBack.c.blue	= 225;
	colorBack.c.alpha	= 255;

	colorBlack.Set(0, 0, 0);

	//Fill background
	int i;
	for(i = 0; i < width; i++)
	{
		for(int j = 0; j < height; j++)
		{
			if(i == 0 || j == 0 || i == width-1 || j == height - 1)
				pixels[ j*width + i ] = colorBlack;
			else
				pixels[ j*width + i ] = colorBack;
		}
	}

	//Text
	AddText(*tip, 3, 2);

	SetTransparency(.1);
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:47,代码来源:ActorTip.cpp


示例7: IngameWindow

/**
 *  Konstruktor von @p iwBuildingSite.
 *
 *  @author OLiver
 */
iwBuildingSite::iwBuildingSite(GameWorldViewer *const gwv, const noBuildingSite *const buildingsite) 
: IngameWindow(buildingsite->CreateGUIID(), 0xFFFE, 0xFFFE, 226, 194, _(BUILDING_NAMES[buildingsite->GetBuildingType()]), LOADER.GetImageN("resource", 41)),
	gwv(gwv), buildingsite(buildingsite)
{
	// Bild des Gebäudes
	AddImage(0, 113, 130, buildingsite->GetBuildingImage());
	// Gebäudename 
	AddText(1, 113, 44, _("Order of building site"), COLOR_YELLOW, glArchivItem_Font::DF_CENTER, NormalFont);

	// Hilfe
	AddImageButton( 2,  16, 147, 30, 32, TC_GREY, LOADER.GetImageN("io",  21));
	// Gebäude abbrennen
	AddImageButton( 3,  50, 147, 34, 32, TC_GREY, LOADER.GetImageN("io",  23));

	// "Gehe Zu Ort"
	AddImageButton( 4, 179, 147, 30, 32, TC_GREY, LOADER.GetImageN("io", 107), _("Go to place"));
}
开发者ID:MiyaxinPittahai,项目名称:s25rttr,代码行数:22,代码来源:iwBuildingSite.cpp


示例8: DrawHidden

NODESIZE CNodeHex64::Draw( const PVIEWINFO View, int x, int y )
{
    int tx;
    NODESIZE DrawSize;
    const UCHAR* Data;

    if (m_bHidden)
        return DrawHidden( View, x, y );

    Data = (const UCHAR*)(View->Data + m_Offset);
    AddSelection( View, 0, y, g_FontHeight );
    AddDelete( View, x, y );
    AddTypeDrop( View, x, y );
    //AddAdd(View,x,y);

    tx = x + TXOFFSET + 16;
    tx = AddAddressOffset( View, tx, y );

    if (g_bText)
    {
        CStringA AsciiMemory = GetStringFromMemoryA( (const char*)Data, 8 ) + " ";
        tx = AddText( View, tx, y, g_clrChar, HS_NONE, "%s", AsciiMemory.GetBuffer( ) );
    }

    tx = AddText( View, tx, y, g_clrHex, 0, _T( "%0.2X" ), Data[0] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 1, _T( "%0.2X" ), Data[1] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 2, _T( "%0.2X" ), Data[2] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 3, _T( "%0.2X" ), Data[3] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 4, _T( "%0.2X" ), Data[4] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 5, _T( "%0.2X" ), Data[5] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 6, _T( "%0.2X" ), Data[6] ) + g_FontWidth;
    tx = AddText( View, tx, y, g_clrHex, 7, _T( "%0.2X" ), Data[7] ) + g_FontWidth;
    tx = AddComment( View, tx, y );

    DrawSize.x = tx;
    DrawSize.y = y + g_FontHeight;
    return DrawSize;
}
开发者ID:dude719,项目名称:Reclass-2015,代码行数:38,代码来源:CNodeHex64.cpp


示例9: begin_pos

void wxHtmlParser::DoParsing(const wxString::const_iterator& begin_pos_,
                             const wxString::const_iterator& end_pos)
{
    wxString::const_iterator begin_pos(begin_pos_);

    if (end_pos <= begin_pos)
        return;

    wxHtmlTextPieces& pieces = *m_TextPieces;
    size_t piecesCnt = pieces.size();

    while (begin_pos < end_pos)
    {
        while (m_CurTag && m_CurTag->GetBeginIter() < begin_pos)
            m_CurTag = m_CurTag->GetNextTag();
        while (m_CurTextPiece < piecesCnt &&
               pieces[m_CurTextPiece].m_start < begin_pos)
            m_CurTextPiece++;

        if (m_CurTextPiece < piecesCnt &&
            (!m_CurTag ||
             pieces[m_CurTextPiece].m_start < m_CurTag->GetBeginIter()))
        {
            // Add text:
            AddText(GetEntitiesParser()->Parse(
                       wxString(pieces[m_CurTextPiece].m_start,
                                pieces[m_CurTextPiece].m_end)));
            begin_pos = pieces[m_CurTextPiece].m_end;
            m_CurTextPiece++;
        }
        else if (m_CurTag)
        {
            if (m_CurTag->HasEnding())
                begin_pos = m_CurTag->GetEndIter2();
            else
                begin_pos = m_CurTag->GetBeginIter();
            wxHtmlTag *t = m_CurTag;
            m_CurTag = m_CurTag->GetNextTag();
            AddTag(*t);
            if (m_stopParsing)
                return;
        }
        else break;
    }
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:45,代码来源:htmlpars.cpp


示例10: braces

bool cbStyledTextCtrl::DoSelectionBraceCompletion(const wxChar& ch)
{
    if (GetLastSelectedText().IsEmpty())
        return false; // nothing changed
    const wxString braces(wxT("([{<'\")]}>'\""));
    const int braceAIdx = braces.Find(ch, true); // from end (so caret is placed after quotes)
    if (braceAIdx == wxNOT_FOUND)
        return false; // nothing changed
    const int braceBIdx = (braceAIdx + (braces.Length() / 2)) % braces.Length();
    BeginUndoAction();
    DeleteBack();
    if (braceAIdx < braceBIdx)
        InsertText(GetCurrentPos(), braces[braceAIdx] + GetLastSelectedText() + braces[braceBIdx]);
    else
        AddText(braces[braceBIdx] + GetLastSelectedText() + braces[braceAIdx]);
    EndUndoAction();
    return true; // succeeded
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:18,代码来源:cbstyledtextctrl.cpp


示例11: IngameWindow

iwBuildingSite::iwBuildingSite(GameWorldView& gwv, const noBuildingSite* const buildingsite)
    : IngameWindow(buildingsite->CreateGUIID(), IngameWindow::posAtMouse, Extent(226, 194),
                   _(BUILDING_NAMES[buildingsite->GetBuildingType()]), LOADER.GetImageN("resource", 41)),
      gwv(gwv), buildingsite(buildingsite)
{
    // Bild des Gebäudes
    AddImage(0, DrawPoint(113, 130), buildingsite->GetBuildingImage());
    // Gebäudename
    AddText(1, DrawPoint(113, 44), _("Order of building site"), COLOR_YELLOW, FontStyle::CENTER, NormalFont);

    // Hilfe
    AddImageButton(2, DrawPoint(16, 147), Extent(30, 32), TC_GREY, LOADER.GetImageN("io", 225), _("Help"));
    // Gebäude abbrennen
    AddImageButton(3, DrawPoint(50, 147), Extent(34, 32), TC_GREY, LOADER.GetImageN("io", 23), _("Demolish house"));

    // "Gehe Zu Ort"
    AddImageButton(4, DrawPoint(179, 147), Extent(30, 32), TC_GREY, LOADER.GetImageN("io", 107), _("Go to place"));
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:18,代码来源:iwBuildingSite.cpp


示例12: va_start

void MPanelItem::printf(LPCWSTR asFormat, ...)
{
	if (!asFormat || !*asFormat)
		return;
		
    va_list args;
    va_start(args,asFormat);
    wchar_t szBuffer[1025]; szBuffer[0] = 0;
    
    int nLen = vswprintf(szBuffer, 1024, asFormat, args);
    
    if (nLen > 0) {
    	_ASSERTE(nLen<1023);
    	szBuffer[nLen] = 0;

		AddText(szBuffer, nLen);
	}
}
开发者ID:kleopatra999,项目名称:FarPlugins,代码行数:18,代码来源:PanelItem.cpp


示例13: ReaderThread

DWORD WINAPI ReaderThread(PVOID pvParam) {

   int nThreadNum = PtrToUlong(pvParam);
   HWND hWndLB = GetDlgItem(g_hWnd, IDC_SERVERS);

   for (int nRequestNum = 1; !g_fShutdown; nRequestNum++) {

      if (!ConsumeElement(nThreadNum, nRequestNum, hWndLB))
         return(0);

      Sleep(2500);   // Wait before reading another element
   }
   
   // g_fShutdown has been set during Sleep
   // --> Show that the current thread is exiting
   AddText(hWndLB, TEXT("[%d] bye bye"), nThreadNum);

   return(0);
}
开发者ID:Jeanhwea,项目名称:WindowsViaCPP,代码行数:19,代码来源:Queue.cpp


示例14: iwSaveLoad

iwSave::iwSave() : iwSaveLoad(40, _("Save game!"))
{
    AddEdit(1, 20, 390, 510, 22, TC_GREEN2, NormalFont);
    AddImageButton(2, 540, 386, 40, 40, TC_GREEN2, LOADER.GetImageN("io", 47));

    // Autospeicherzeug
    AddText(3, 20, 350, _("Auto-Save every:"), 0xFFFFFF00, 0, NormalFont);
    ctrlComboBox* combo = AddComboBox(4, 270, 345, 130, 22, TC_GREEN2, NormalFont, 100);

    /// Combobox füllen
    combo->AddString(_("Disabled")); // deaktiviert
    
    // Last entry is only for debugging
    const unsigned numIntervalls = SETTINGS.global.debugMode ? AUTO_SAVE_INTERVALS_COUNT : AUTO_SAVE_INTERVALS_COUNT - 1;

    // Die Intervalle
    for(unsigned i = 0; i < numIntervalls; ++i)
    {
        char str[64];
        sprintf(str, "%u GF", AUTO_SAVE_INTERVALS[i]);
        combo->AddString(str);
    }

    // Richtigen Eintrag auswählen
    bool found = false;
    for(unsigned i = 0; i < numIntervalls; ++i)
    {
        if(SETTINGS.interface.autosave_interval == AUTO_SAVE_INTERVALS[i])
        {
            combo->SetSelection(i + 1);
            found = true;
            break;
        }
    }

    // Ungültig oder 0 --> Deaktiviert auswählen
    if(!found)
        combo->SetSelection(0);

    // Tabelle ausfüllen beim Start
    RefreshTable();
}
开发者ID:vader1986,项目名称:s25client,代码行数:42,代码来源:iwSave.cpp


示例15: AddButton

//================================================================================================================
void MenuEditorSystem::OnMouseDown(WPARAM btnState, int x, int y)
{
	// Start a left button drag of an item
	if ((btnState & MK_LBUTTON) != 0)
	{
		m_leftButtonDown = true;
		
		m_SelectedMousePos.x = x;
		m_SelectedMousePos.y = y;
		
		// If applicable, Add a button
		if (BetterString(m_SelectedButtonImageName) != "")
		{
			AddButton();
		}
		
		// If applicable, Add a text
		AddText();
	}
}
开发者ID:henriyl,项目名称:ZShadeSandboxOld,代码行数:21,代码来源:MenuEditorSystem.cpp


示例16: DELETE

void  CHandleSynchronization::ReWriteXMl()
{
	DELETE(iDataBuf);
	TBuf<100> tempBuf;

	tempBuf.Zero();
	tempBuf.Append(KXMLHEADER);
	iDataBuf=HBufC::NewL(tempBuf.Length());
	iDataBuf->Des().Append(KXMLHEADER);

	tempBuf.Zero();
	tempBuf.Format(KXMLUPTIME,iTimeFlag);

	iDataBuf = iDataBuf->ReAllocL(iDataBuf->Length() + tempBuf.Length());
	iDataBuf->Des().Append(tempBuf);

	for(TInt i=0;i<iArray.Count();i++)
	{
		tempBuf.Zero();
		tempBuf.Format(KXMLFIRSTHEADER,iArray[i]->GetID(),&iArray[i]->GetName());
		iDataBuf = iDataBuf->ReAllocL(iDataBuf->Length() + tempBuf.Length());
		iDataBuf->Des().Append(tempBuf);


		AddText(iArray[i]);
		iDataBuf = iDataBuf->ReAllocL(iDataBuf->Length() + iTempBuf->Length());
		iDataBuf->Des().Append(*iTempBuf);

		tempBuf.Zero();
		tempBuf.Append(KXMLFIRSTEND);
		iDataBuf = iDataBuf->ReAllocL(iDataBuf->Length() + tempBuf.Length());
		iDataBuf->Des().Append(tempBuf);
	}
	
	tempBuf.Zero();
	tempBuf.Append(KXMLEND);
	iDataBuf = iDataBuf->ReAllocL(iDataBuf->Length() + tempBuf.Length());
	iDataBuf->Des().Append(tempBuf);

	::WriteFile(iSynFileName,*iDataBuf);
}
开发者ID:flaithbheartaigh,项目名称:wapbrowser,代码行数:41,代码来源:HandleSynchronization.cpp


示例17: IngameWindow

iwPostWindow::iwPostWindow(GameWorldView& gwv, PostBox& postBox)
    : IngameWindow(CGI_POSTOFFICE, IngameWindow::posLastOrCenter, Extent(254, 295), _("Post office"), LOADER.GetImageN("resource", 41)),
      gwv(gwv), postBox(postBox), showAll(true), curCategory(PostCategory::General), curMsg(nullptr), lastHasMissionGoal(true)
{
    AddImageButton(ID_SHOW_ALL, DrawPoint(18, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 190));  // Viewer: 191 - Papier
    AddImageButton(ID_SHOW_MIL, DrawPoint(56, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 30));   // Viewer:  31 - Soldat
    AddImageButton(ID_SHOW_GEO, DrawPoint(91, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 20));   // Viewer:  21 - Geologe
    AddImageButton(ID_SHOW_ECO, DrawPoint(126, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 28));  // Viewer:  29 - Wage
    AddImageButton(ID_SHOW_GEN, DrawPoint(161, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 189)); // Viewer: 190 - Neue Nachricht
    AddImageButton(ID_SHOW_GOAL, DrawPoint(199, 25), Extent(35, 35), TC_GREY, LOADER.GetImageN("io", 79)); // Viewer:  80 - Notiz
    AddImage(0, DrawPoint(126, 151), LOADER.GetImageN("io", 228));
    AddImageButton(ID_HELP, DrawPoint(18, 242), Extent(30, 35), TC_GREY, LOADER.GetImageN("io", 225));     // Viewer: 226 - Hilfe
    AddImageButton(ID_GO_START, DrawPoint(51, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 102)); // Viewer: 103 - Schnell zurück
    AddImageButton(ID_GO_BACK, DrawPoint(81, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 103));  // Viewer: 104 - Zurück
    AddImageButton(ID_GO_FWD, DrawPoint(111, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 104));  // Viewer: 105 - Vor
    AddImageButton(ID_GO_END, DrawPoint(141, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 105));  // Viewer: 106 - Schnell vor

    // Goto, nur sichtbar wenn Nachricht mit Koordinaten da
    AddImageButton(ID_GOTO, DrawPoint(181, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 107))->SetVisible(false);
    // Mülleimer, nur sichtbar, wenn Nachricht da
    AddImageButton(ID_DELETE, DrawPoint(211, 246), Extent(30, 26), TC_GREY, LOADER.GetImageN("io", 106))->SetVisible(false);

    AddText(ID_INFO, DrawPoint(127, 228), "", MakeColor(255, 188, 100, 88), FontStyle::CENTER | FontStyle::BOTTOM, SmallFont)
      ->SetVisible(false);

    AddImage(ID_IMG, DrawPoint(127, 155), LOADER.GetImageN("io", 225));

    // Multiline-Teil mit drei leeren Zeilen erzeugen
    ctrlMultiline* text = AddMultiline(ID_TEXT, DrawPoint(126, 141), Extent(200, 0), TC_INVISIBLE, NormalFont,
                                       FontStyle::CENTER | FontStyle::BOTTOM | FontStyle::NO_OUTLINE);
    text->SetNumVisibleLines(4);
    text->ShowBackground(false);

    // Button with OK and deny sign (tick and cross) for contracts
    AddImageButton(ID_ACCEPT, DrawPoint(87, 185), Extent(30, 26), TC_GREEN1, LOADER.GetImageN("io", 32))->SetVisible(false);
    AddImageButton(ID_DENY, DrawPoint(137, 185), Extent(30, 26), TC_RED1, LOADER.GetImageN("io", 40))->SetVisible(false);

    FilterMessages();
    curMsgId = curMsgIdxs.size();
    DisplayPostMessage();
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:41,代码来源:iwPostWindow.cpp


示例18: UseSubList

void ListPop::PopulateCloneList(gedString actorName)
{
	subItens.Clear();
	stackItens.Clear();
	UseSubList();

	ListActor *listActor = mapActors[actorName];
	for(int il = 0; listActor && il < listActor->Count(); il++)
	{
		Actor *actor = (*listActor)[il];
		if(actor->EditMode())
		{
			AddText(actor->getCloneName());
		}
	}

	Sort();
	
	ResetWork();
	PopulateWorkList(true);
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:21,代码来源:ListPop.cpp


示例19: IngameWindow

/**
 *  Konstruktor von @p iwLobbyConnect.
 *
 *  @author FloSoft
 */
iwLobbyConnect::iwLobbyConnect(void)
    : IngameWindow(CGI_LOBBYCONNECT, 0xFFFF, 0xFFFF, 500, 260, _("Connecting to Lobby"), LOADER.GetImageN("resource", 41))
{
    // Benutzername
    AddText(0,  20, 40, _("Username:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* user = AddEdit(1, 260, 40, 220, 22, TC_GREEN2, NormalFont, 15);
    user->SetFocus();
    user->SetText(SETTINGS.lobby.name);

    // Passwort
    AddText(2,  20, 70, _("Password:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* pass = AddEdit(3, 260, 70, 220, 22, TC_GREEN2, NormalFont, 0, true);
    pass->SetText(SETTINGS.lobby.password);

    // Emailadresse
    AddText(4,  20, 100, _("Email Address:"), COLOR_YELLOW, 0, NormalFont);
    ctrlEdit* email = AddEdit(5, 260, 100, 220, 22, TC_GREEN2, NormalFont);
    email->SetText(SETTINGS.lobby.email);

    // Passwort speichern ja/nein
    AddText(6, 20, 130, _("Save Password?"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* savepassword = AddOptionGroup(10, ctrlOptionGroup::CHECK);
    savepassword->AddTextButton(0, 260, 130, 105,   22, TC_GREEN2, _("No"), NormalFont); // nein
    savepassword->AddTextButton(1, 375, 130, 105,   22, TC_GREEN2, _("Yes"), NormalFont); // ja
    savepassword->SetSelection( (SETTINGS.lobby.save_password ? 1 : 0) );

    // ipv6 oder ipv4 benutzen
    AddText(11, 20, 160, _("Use IPv6:"), COLOR_YELLOW, 0, NormalFont);

    ctrlOptionGroup* ipv6 = AddOptionGroup(12, ctrlOptionGroup::CHECK);
    ipv6->AddTextButton(0, 260, 160, 105,   22, TC_GREEN2, _("IPv4"), NormalFont);
    ipv6->AddTextButton(1, 375, 160, 105,   22, TC_GREEN2, _("IPv6"), NormalFont);
    ipv6->SetSelection( (SETTINGS.server.ipv6 ? 1 : 0) );

    // Verbinden
    AddTextButton(7, 20, 220, 220,  22, TC_RED1, _("Connect"), NormalFont);

    // Registrieren
    AddTextButton(8, 260, 220, 220,  22, TC_GREEN2, _("Register"), NormalFont);

    // Status
    AddText(9, 250, 195, "", COLOR_RED, glArchivItem_Font::DF_CENTER, NormalFont);

    // Lobby-Interface setzen
    LOBBYCLIENT.SetInterface(this);

}
开发者ID:MarcusSt,项目名称:s25client,代码行数:53,代码来源:iwLobbyConnect.cpp


示例20: switch

/**** interpretation ****/
void AddOnListInfo::MessageReceived(BMessage *message)
{
	switch(message->what)
	{
	// barre de progression
	case PROGRESS_START_MSG:
	case PROGRESS_STOP_MSG:
		{
		// recuperer le type de demande :: ou -> ou .
		if(message->FindInt8(CS_ASK_TYPE,&_typeRequested)!=B_OK)
			return;

		BMessenger(_progress).SendMessage(message);		
		
		// on selectionne le premier
		if(_listOfInfos->CountItems()>0)
			_listOfInfos->PlaceOnKeyBuffer();
		}
		break;
	// on recoit des donnees du handler
	case ADD_DATAS_LIST:
		AddDatasList(message);
		break;
	// on recoit des donnees en retour d'une completion
	case ADD_COMPLETION_DATAS:
		AddCompletionDatas(message);
		break;
	// on a choisi un item
	case ADD_DATAS_TEXT:
		AddText(message);
		break;
	// redirige le message pour afficher le buffer
	case DISPLAY_BUFFER_MSG:
		_motherMessenger.SendMessage(message);
		break;
	default:
		BWindow::MessageReceived(message);
	}
}
开发者ID:mmuman,项目名称:dontworry,代码行数:40,代码来源:AddOnListInfo.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddToUpdateQueueOf函数代码示例发布时间:2022-05-30
下一篇:
C++ AddTask函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap