本文整理汇总了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("");
}
}
示例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);
}
示例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());
}
示例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();
}
示例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());
}
示例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
}
示例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);
}
}
}
示例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();
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
}
示例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")));
}
}
示例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();
}
示例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();
}
}
}
示例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();
}