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


C++ ShowText函数代码示例

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


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

示例1: ShowText

void AutoLinkChangeString::OnCbnSelchangeComboMatchdev()
{
	CString strListTemp;
	int iIndex = m_DevInfoDropList.GetCurSel();
	m_DevInfoDropList.GetLBText(iIndex, strListTemp);
	
	// 第一次打开
	if (m_bFirstUseDropLise && !strListTemp.IsEmpty())
	{
		m_ChangeEdit.SetWindowText("");
		m_bFirstUseDropLise = false;
	}

	if ("设备IP" == strListTemp)
	{
		ShowText("$(DeviceIP)");
	}
	else if ("设备编号" == strListTemp)
	{
		ShowText("$(DeviceNo)");
	}
	else
	{
		ShowText("");
	}
}
开发者ID:fangbaolei,项目名称:EC700IR,代码行数:26,代码来源:AutoLinkChangeString.cpp

示例2: GetDlgItem

void CTab4::OnBnClickedButton1()
{
	// TODO: 在此添加控件通知处理程序代码
	GetDlgItem(IDC_BUTTON1)->EnableWindow(FALSE);
	m_text = "";
	CString str;
	long num[] = { 50000, 100000, 200000, 300000, 500000 };
	long maxnode[] = { 5,10,20,50,100,120,150,200 };
	int color[5][3] = { { 255,0,0 },{ 100,200,100 },{ 0,0,255 },{ 255,0,255 },{ 0,0,0 } };

	for (int i = 0; i < 5; i++)
	{
		str.Format(_T("矩形数:%d:"), num[i]);
		ShowText(str);
		CPen pen(PS_SOLID, 1, RGB(color[i][0], color[i][1], color[i][2]));
		CPen *pOldPen = MemDC.SelectObject(&pen);
		for (int j = 0; j < 8; j++)
		{
			long t = Test(maxnode[j], num[i]);
			str.Format(_T("  内部节点最大条目数:%d:\r\n  耗时:%dms\r\n"), maxnode[j], t);
			ShowText(str);
			long y = (long)((1000.0 - t) * dif_y / 200.0 + r.top);
			if (j == 0)
			{
				MemDC.MoveTo(r.left + dif_x * (j + 1), y);
			}
			MemDC.LineTo(r.left + dif_x * (j + 1), y);
			pDC->BitBlt(0, 0, x_m, y_m, &MemDC, 0, 0, SRCAND);
		}
		MemDC.SelectObject(pOldPen);
	}
	GetDlgItem(IDC_BUTTON1)->EnableWindow(TRUE);
}
开发者ID:kimiuso,项目名称:RShu,代码行数:33,代码来源:Tab4.cpp

示例3: sleep

void CVFD::showRCLock(int duration)
{
	if (!has_lcd || !g_settings.lcd_notify_rclock)
	{
		sleep(duration);
		return;
	}

	std::string _text = text;
	ShowText(g_Locale->getText(LOCALE_RCLOCK_LOCKED));
	sleep(duration);
	ShowText(_text.c_str());
}
开发者ID:star1978,项目名称:neutrino-mp-cst-next,代码行数:13,代码来源:vfd.cpp

示例4: j00zekDBG

void CVFD::Clear()
{
	j00zekDBG(DEBUG_DEBUG,"j00zek>CVFD::Clear()\n");
	if (g_settings.lcd_vfd_size == 16)
		ShowText("                ");
	else if (g_settings.lcd_vfd_size == 8)
		ShowText("        ");
	else if (g_settings.lcd_vfd_size == 4)
		ShowText("    ");
	else if (g_settings.lcd_vfd_size >= 1)
		ShowText(" ");
	ClearIcons();
}
开发者ID:j00zek,项目名称:j00zeks-neutrino-mp-cst-next,代码行数:13,代码来源:vfd.cpp

示例5: sleep

void CVFD::showRCLock(int duration)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	if (!g_settings.lcd_notify_rclock) {
		sleep(duration);
		return;
	}

	std::string _text = text;
	ShowText(g_Locale->getText(LOCALE_RCLOCK_LOCKED));
	sleep(duration);
	ShowText(_text.c_str());
}
开发者ID:j00zek,项目名称:j00zeks-neutrino-mp-cst-next,代码行数:13,代码来源:vfd.cpp

示例6: CString

//-----------------------------------------------------------------------------
//!	\CDialog class virtual function
//-----------------------------------------------------------------------------
BOOL CDisplayMsgDlg::OnInitDialog()
{
	char* buf;
	m_TitleIndex = CLanguage::IDX_PURCHASE;
	CLanguage::GetTextFromIndex(CLanguage::IDX_PURCHASE,&buf);
	m_Title = CString(buf);

	CBaseDlg::OnInitDialog();

	if(m_time > 0)
		SetTimer(1, m_time, NULL);
	else	
		SetTimer(1, 10000, NULL); //DEFAULT TIME 10 SEC IF TIMER NOT SET

	m_strMsg.ShowWindow(SW_SHOW);
	m_strMsg1.ShowWindow(SW_SHOW);
	m_strMsg2.ShowWindow(SW_SHOW);
	m_strMsg.m_nFormat = DT_LEFT;
	m_strMsg1.m_nFormat = DT_LEFT;
	m_strMsg2.m_nFormat = DT_LEFT;

	CDisplay::SetDisplayWnd(m_hWnd);
	CLanguage::SetDisplayWnd(m_hWnd);

	ShowText(m_str1, m_str2, m_str3);
	SetFocus();
	return TRUE;  // retur TRUE unless you set the focus to a control
}
开发者ID:tdgincjp,项目名称:FD-T303,代码行数:31,代码来源:DisplayMessage.cpp

示例7: NewLine

void Screen::Display(const char *Text, int x, int y)
{
	if (x >= 0) this->OutputPosition.x = x;
	if (y >= 0) this->OutputPosition.y = y;
	for (int i = 0; i < (int)strlen(Text); i++)
	{
		if (Text[i] == 10)
		{
			NewLine();
		} else if (Text[i] == 9) {
			this->OutputPosition.x += this->FontWidth * 8;
			CheckPosition();
		} else {
			int len = SDL2Function::GetAllowCharNum(Text);
			char *t = (char*)malloc(len + 1);
			strncpy(t, Text + i, len);
			t[len] = '\0';
			i += len - 1;
			char *text = GB2312toUTF8(t);
			free(t);
			SDL_Surface *SDLText;
			SDL_Color FrontColor;
			Uint8 r, g, b;
			SDL_GetRGB(this->TextColor, this->ScreenSurface->format, &r, &g, &b);
			FrontColor.a = 255; FrontColor.r = r; FrontColor.g = g; FrontColor.b = b;
			SDLText = TTF_RenderUTF8_Solid((TTF_Font*)this->Font, text, FrontColor);
			Rect RefRect = ShowText(SDLText, this->OutputPosition.x, this->OutputPosition.y, 0, 0, this->ScreenSurface);
			this->Refresh(&RefRect);
		}
	}
}
开发者ID:RonxBulld,项目名称:anvm,代码行数:31,代码来源:Screen.cpp

示例8: _WriteBuf

void _WriteBuf(char *Buffer, WORD Count)
{
    int L, R;

    __InitEasyWin();
    L = _Cursor.x;
    R = _Cursor.x;
    while (Count > 0)
        {
        if (Buffer[0] == -1)
            Buffer[0] = ' ';
        switch (Buffer[0])
            {
            case 13:
            NewLine(L, R);
                break;
            case 10:
                break;
            case  9:
                do
                    {
                    *(ScreenPtr(_Cursor.x, _Cursor.y)) = ' ';
                    ++_Cursor.x;
                    if (_Cursor.x > R)
                        R = _Cursor.x;
                    if (_Cursor.x == _ScreenSize.x)
                        {
                        NewLine(L, R);
                        break;
                        }
                    } while (_Cursor.x % 8);
                break;
            case  8:
            if (_Cursor.x > 0)
                {
                --_Cursor.x;
                *(ScreenPtr(_Cursor.x, _Cursor.y)) = ' ';
                if (_Cursor.x < L )
                        L = _Cursor.x;
                }
                break;
            case  7:
                MessageBeep(0);
                break;
            default:
                *(ScreenPtr(_Cursor.x, _Cursor.y)) = Buffer[0];
                ++_Cursor.x;
                if (_Cursor.x > R)
                    R = _Cursor.x;
                if (_Cursor.x == _ScreenSize.x)
                    NewLine(L, R);
            }

        ++Buffer;
        --Count;
        }
    ShowText(L, R);
    if (_AutoTracking)
        _TrackCursor();
}
开发者ID:nicolaemariuta,项目名称:bachelorHomeworkAndStudy,代码行数:60,代码来源:EASYWIN.CPP

示例9: OpenFile

bool MpvHandler::PlayFile(QString f)
{
    if(f == QString()) // ignore if file doesn't exist
        return false;

    if(path == QString()) // web url
    {
        OpenFile(f);
        setFile(f);
    }
    else
    {
        QFile qf(path+f);
        if(qf.exists())
        {
            OpenFile(path+f);
            setFile(f);
            Play();
        }
        else
        {
            ShowText(tr("File no longer exists")); // tell the user
            return false;
        }
    }
    return true;
}
开发者ID:ThreeGe,项目名称:Baka-MPlayer,代码行数:27,代码来源:mpvhandler.cpp

示例10: ShowIcon

void CVFD::showVolume(const char vol, const bool force_update)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	static int oldpp = 0;
	
	if (j00zekVFDsize < 4)
		return;

	ShowIcon(FP_ICON_MUTE, muted);

	if(!force_update && vol == volume)
		return;
	volume = vol;

	bool allowed_mode = (mode == MODE_TVRADIO || mode == MODE_AUDIO || mode == MODE_MENU_UTF8);
	if (!allowed_mode)
		return;

	if (g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME] == 1) {
		wake_up();
		int pp = (int) round((double) vol / (double) 2);
		if(oldpp != pp)
		{
			char vol_chr[64] = "";
			if (j00zekVFDsize==4)
				snprintf(vol_chr, sizeof(vol_chr)-1, "v%3d", (int)vol);
			else if (j00zekVFDsize==8)
				snprintf(vol_chr, sizeof(vol_chr)-1, "VOL %d%%", (int)vol);
			else
				snprintf(vol_chr, sizeof(vol_chr)-1, "Volume: %d%%", (int)vol);
			ShowText(vol_chr);
			oldpp = pp;
		}
	}
}
开发者ID:j00zek,项目名称:j00zeks-neutrino-mp-cst-next,代码行数:35,代码来源:vfd.cpp

示例11: pthread_mutex_lock

// Process a key-up or -down event.  A key is "registered" when it is
// pressed and then released, with no other keypresses or releases in
// between.  Registered keys are passed to CheckKey() to see if it
// should trigger a visibility toggle, an immediate reboot, or be
// queued to be processed next time the foreground thread wants a key
// (eg, for the menu).
//
// We also keep track of which keys are currently down so that
// CheckKey can call IsKeyPressed to see what other keys are held when
// a key is registered.
//
// updown == 1 for key down events; 0 for key up events
void RecoveryUI::process_key(int key_code, int updown) {
    bool register_key = false;
    bool long_press = false;
    bool reboot_enabled;

    pthread_mutex_lock(&key_queue_mutex);
    key_pressed[key_code] = updown;
    if (updown) {
        ++key_down_count;
        key_last_down = key_code;
        key_long_press = false;
        pthread_t th;
        key_timer_t* info = new key_timer_t;
        info->ui = this;
        info->key_code = key_code;
        info->count = key_down_count;
        pthread_create(&th, NULL, &RecoveryUI::time_key_helper, info);
        pthread_detach(th);
    } else {
        if (key_last_down == key_code) {
            long_press = key_long_press;
            register_key = true;
        }
        key_last_down = -1;
    }
    reboot_enabled = enable_reboot;
    pthread_mutex_unlock(&key_queue_mutex);

    if (register_key) {
        NextCheckKeyIsLong(long_press);
        switch (CheckKey(key_code)) {
        case RecoveryUI::IGNORE:
            break;

        case RecoveryUI::TOGGLE:
            ShowText(!IsTextVisible());
            break;

        case RecoveryUI::REBOOT:
#ifdef ANDROID_RB_RESTART
            if (reboot_enabled) {
                android_reboot(ANDROID_RB_RESTART, 0, 0);
            }
#endif
            break;

        case RecoveryUI::ENQUEUE:
            EnqueueKey(key_code);
            break;

        case RecoveryUI::MOUNT_SYSTEM:
#ifndef NO_RECOVERY_MOUNT
            ensure_path_mounted("/system");
            Print("Mounted /system.");
#endif
            break;
        }
    }
}
开发者ID:Zenfone2-Dev,项目名称:Team-Win-Recovery-Project,代码行数:71,代码来源:ui.cpp

示例12: mpv_set_property_string

void MpvHandler::Deinterlace(bool deinterlace)
{
    if(mpv)
    {
        mpv_set_property_string(mpv, "deinterlace", deinterlace ? "yes" : "auto");
        ShowText(tr("Deinterlacing: %0").arg(deinterlace ? tr("enabled") : tr("disabled")));
    }
}
开发者ID:jqs7,项目名称:Baka-MPlayer,代码行数:8,代码来源:mpvhandler.cpp

示例13: ShowText

void CVFD::showAudioTrack(const std::string & /*artist*/, const std::string & title, const std::string & /*album*/)
{
	//j00zekDBG(DEBUG_DEBUG,"j00zek>%s:%s >>>\n", "CVFD::", __func__);
	if (mode != MODE_AUDIO)
		return;
	ShowText(title.c_str());
	wake_up();
}
开发者ID:j00zek,项目名称:j00zeks-neutrino-mp-cst-next,代码行数:8,代码来源:vfd.cpp

示例14: tr

void mepp_component_Compression_Valence_plugin::OnJCWdecompress(void)
{
	// active viewer
	if (mw->activeMdiChild() != 0)
	{
		Viewer* viewer = (Viewer *)mw->activeMdiChild();
		PolyhedronPtr polyhedron_ptr = viewer->getScenePtr()->get_polyhedron();

		Compression_Valence_ComponentPtr component_ptr = findOrCreateComponentForViewer<Compression_Valence_ComponentPtr, Compression_Valence_Component>(viewer, polyhedron_ptr);
		{
			if (!component_ptr->IsDecompress)
			{				
				QMessageBox::information(mw, APPLICATION, tr("Decompression not possible: please load .p3d file first."));
				return;
			}		

			if (component_ptr->Possible_change_sequence == true)
				component_ptr->Possible_change_sequence = false;


			// read from file
			if (component_ptr->Sequence == false)
			{
				component_ptr->JCW_Decompression_From_File(*viewer->getScenePtr()->get_polyhedron(0));				
			}

			// from sequence
			else
			{
				component_ptr->Visu_level = viewer->getScenePtr()->get_current_polyhedron();

				if (component_ptr->Visu_level >= component_ptr->Total_layer)
					return;

				// if the next mesh already exists in the sequence
				if (component_ptr->Visu_level < component_ptr->Process_level)
				{
					component_ptr->Visu_level++;
					viewer->getScenePtr()->set_current_polyhedron(component_ptr->Visu_level);					
				}

				// Insert a mesh into the sequence
				else
				{					

					PolyhedronPtr New_mesh(new Polyhedron());	//Polyhedron * New_mesh = new Polyhedron;	// MT

					component_ptr->JCW_Decompression_From_Sequence(*viewer->getScenePtr()->get_polyhedron(component_ptr->Process_level), *New_mesh);					
					vector<PolyhedronPtr/*Polyhedron**/>::iterator it = viewer->getScenePtr()->get_begin_polyhedrons();	// MT
					viewer->getScenePtr()->insert_polyhedron(it + component_ptr->Process_level-1, New_mesh);
					viewer->getScenePtr()->set_current_polyhedron(component_ptr->Process_level);					
				}
			}
			ShowText();
			viewer->recreateListsAndUpdateGL();
		}
	}
}
开发者ID:Salepate,项目名称:MEPP,代码行数:58,代码来源:mepp_component_Compression_Valence_plugin.cpp

示例15: ShowText

void CVFD::showMenuText(const int /*position*/, const char * ptext, const int /*highlight*/, const bool /*utf_encoded*/)
{
	if(fd < 0) return;
	if (mode != MODE_MENU_UTF8)
		return;

	ShowText(ptext);
	wake_up();
}
开发者ID:star1978,项目名称:neutrino-mp-cst-next,代码行数:9,代码来源:vfd.cpp


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