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

C++ MoveCursor函数代码示例

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

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



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

示例1: end_screen

void
end_screen(char *message, int exit_val)
{
    int footer_rows_was_one = 0;

    if(panicking())
      return;

    if(FOOTER_ROWS(ps_global) == 1){
	footer_rows_was_one++;
	FOOTER_ROWS(ps_global) = 3;
	mark_status_unknown();
    }

    flush_status_messages(exit_val ? 0 : 1);

    blank_keymenu(_lines - 2, 0);

    if(message){
	StartInverse();
	PutLine0(_lines - 2, 0, message);
    }
    
    EndInverse();

    MoveCursor(_lines - 1, 0);

    mswin_showcaret(F_ON(F_SHOW_CURSOR, ps_global));

    if(footer_rows_was_one){
	FOOTER_ROWS(ps_global) = 1;
	mark_status_unknown();
    }
}
开发者ID:OS2World,项目名称:APP-INTERNET-Alpine,代码行数:34,代码来源:termout.wnt.c


示例2: MoveSelection

bool FullDisassemblyView::MoveSelection(s32 xOffset, s32 yOffset, bool& rInvalidateView)
{
  if (!MoveCursor(xOffset, yOffset, rInvalidateView))
    return false;
  m_SelectionEnd = m_Cursor;
  return true;
}
开发者ID:GrimDerp,项目名称:medusa,代码行数:7,代码来源:disassembly_view.cpp


示例3: outbyte

void SimpleConsole::OutputChar( int ch )
{
	outbyte(0xE9,ch);	//for bochs
	if(ch=='\t')
	{
		do{
			OutputChar(' ');
		}while( (cursorX-1)%4 );
		return;
	}
	if(ch=='\n')
	{
		NextLine();
	}
	else if( ch == 8 )
	{
		OutputChar( charStyle, cursorY, --cursorX );
	}
	else if ( isprint((unsigned char)ch) )
	{
		OutputChar( charStyle | ch, cursorY, cursorX++ );
	}
	if(cursorX >= width )
	{
		NextLine();
	}
	MoveCursor();
}
开发者ID:Ga-vin,项目名称:sgos,代码行数:28,代码来源:console.cpp


示例4: GetCursorPos

void CGUIDialogKeyboardGeneric::OnPasteClipboard(void)
{
  CStdStringW unicode_text;
  CStdStringA utf8_text;

// Get text from the clipboard
  utf8_text = g_Windowing.GetClipboardText();

  // Insert the pasted text at the current cursor position.
  if (utf8_text.length() > 0)
  {
    g_charsetConverter.utf8ToW(utf8_text, unicode_text);

    size_t i = GetCursorPos();
    if (i > m_strEdit.size())
      i = m_strEdit.size();
    CStdStringW left_end = m_strEdit.substr(0, i);
    CStdStringW right_end = m_strEdit.substr(i);

    m_strEdit = left_end;
    m_strEdit.append(unicode_text);
    m_strEdit.append(right_end);
    UpdateLabel();
    MoveCursor(unicode_text.length());
  }
}
开发者ID:lewy20041,项目名称:xbmclibmedia,代码行数:26,代码来源:GUIDialogKeyboardGeneric.cpp


示例5: dlgTextEntryHighscoreType

static void
dlgTextEntryHighscoreType(TCHAR *text, size_t width,
                          const TCHAR* caption)
{
    wf = NULL;
    wGrid = NULL;

    if (width == 0)
        width = MAX_TEXTENTRY;

    max_width = std::min(MAX_TEXTENTRY, width);

    wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
                    _T("IDR_XML_TEXTENTRY"));
    assert(wf != nullptr);

    if (caption)
        wf->SetCaption(caption);

    wGrid = (WndOwnerDrawFrame*)wf->FindByName(_T("frmGrid"));

    cursor = 0;
    CopyString(edittext, text, max_width);
    MoveCursor();

    wf->SetKeyDownFunction(FormKeyDown);

    if (wf->ShowModal() == mrOK) {
        TrimRight(edittext);
        CopyString(text, edittext, max_width);
    }

    delete wf;
}
开发者ID:onkelhotte,项目名称:XCSoar,代码行数:34,代码来源:dlgTextEntry.cpp


示例6: _ASSERTE

BOOL COledbRecordset::MoveBottom()
{
   _ASSERTE(IsOpen());
   // Restart and then move backwards...
   m_spRowset->RestartPosition(DB_NULL_HCHAPTER);
   return MoveCursor(-1, 1);
}
开发者ID:okigan,项目名称:dblib,代码行数:7,代码来源:DbOledb.cpp


示例7: do_PutLine

static void do_PutLine(int x, int y, const char *line)
{
    if (x >= 0 && y >= 0)
	MoveCursor(x, y);
    while (*line)
	WriteChar(*line++);
}
开发者ID:wfp5p,项目名称:elm,代码行数:7,代码来源:out_utils.c


示例8: stow_cursor

/*
 * Move the cursor to the lower-left of the screen, where it won't be annoying
 */
void
stow_cursor(
	void)
{
	if (!cmd_line)
		MoveCursor(cLINES, 0);
}
开发者ID:OS2World,项目名称:APP-INTERNET-Tin,代码行数:10,代码来源:screen.c


示例9: SendMessage

/*
   VMenu2:Call() (т.е. функция обработки меню)
   должна возвращать true если она обработала событие и дальше ничего делать не надо
   (вне зависимости что говорит енц. о кодах возврата различных DN_*).
*/
int VMenu2::Call(int Msg, void *param)
{
	if(!mfn)
		return 0;

	SendMessage(DM_ENABLEREDRAW, 0, nullptr);
	int r=mfn(Msg, param);

	bool Visible;
	DWORD Size;
	SHORT X, Y;
	GetCursorType(Visible, Size);
	GetCursorPos(X, Y);

	if(SendMessage(DM_ENABLEREDRAW, -1, nullptr)<0)
		SendMessage(DM_ENABLEREDRAW, 1, nullptr);

	if(NeedResize)
		Resize();

	SetCursorType(Visible, Size);
	MoveCursor(X, Y);

	if(closing)
	{
		closing=false;
		if(Msg==DN_CLOSE)
			return false;
		SendMessage(DM_CLOSE, -1, nullptr);
	}

	return r;
}
开发者ID:chapgaga,项目名称:farmanager,代码行数:38,代码来源:vmenu2.cpp


示例10: UpdateLabel

void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
{
  m_strEdit.Empty();
  g_charsetConverter.utf8ToW(aTextString, m_strEdit);
  UpdateLabel();
  MoveCursor(m_strEdit.size());
}
开发者ID:maximuska,项目名称:xbmc,代码行数:7,代码来源:GUIDialogKeyboardGeneric.cpp


示例11: DlgHistoryKey

extern bool DlgHistoryKey( gui_window *gui, void *param, int edit, int list )
{
    gui_ctl_id  id;
    gui_key     key;

    GUI_GET_KEY_CONTROL( param, id, key );
    switch( key ) {
    case GUI_KEY_UP:
        MoveCursor( gui, edit, list, -1 );
        return( true );
    case GUI_KEY_DOWN:
        MoveCursor( gui, edit, list, 1 );
        return( true );
    default:
        return( false );
    }
}
开发者ID:GEO-IASS,项目名称:open-watcom-v2,代码行数:17,代码来源:dlgsrch.c


示例12: MoveCursorLeft

  bool MoveCursorLeft() {
    if (cursor < 1)
      return false;

    --cursor;
    MoveCursor();
    return true;
  }
开发者ID:Exadios,项目名称:xcsoar-exp,代码行数:8,代码来源:KnobTextEntry.cpp


示例13: memsetw

void SimpleConsole::ClearScreen()
{
	memsetw( buffer, charStyle, width * height );
	RefreshBuffer();
	cursorX = 0;
	cursorY = 0;
	MoveCursor();
}
开发者ID:Ga-vin,项目名称:sgos,代码行数:8,代码来源:console.cpp


示例14: MoveCursorRight

  bool MoveCursorRight() {
    if (cursor + 2 >= max_width)
      return false; // max width

    ++cursor;
    MoveCursor();
    return true;
  }
开发者ID:Exadios,项目名称:xcsoar-exp,代码行数:8,代码来源:KnobTextEntry.cpp


示例15: DrawBox

void DrawBox( int up_left_row, int up_left_col,
              int num_rows,    int num_cols ) {

  MoveCursor( up_left_row, up_left_col) ;
  UpLeftCorner() ;
  DrawHorizontal (num_cols - 2) ;
  UpRightCorner() ;
  CursorToLeft(1) ;
  CursorDown(1) ;
  DrawVertical (num_rows - 2) ;
  MoveCursor (up_left_row, up_left_col ) ;
  CursorDown(1) ;
  DrawVertical( num_rows - 2 ) ;
  LowerLeftCorner() ;
  DrawHorizontal( num_cols - 2 ) ;
  LowerRightCorner() ;
}
开发者ID:chadadavis,项目名称:junk,代码行数:17,代码来源:charactergraphics.C


示例16: ClearLine

/*----------------------------------------------------------------------
     Clear specified line on the screen

 Result: The line is blanked and the cursor is left at column 0.

  ----*/
void
ClearLine(int n)
{
    if(ps_global->in_init_seq)
      return;

    MoveCursor(n, 0);
    CleartoEOLN();
}
开发者ID:carriercomm,项目名称:alpine,代码行数:15,代码来源:termout.gen.c


示例17: while

//------------------------------- SetGame -------------------------------------
// 게임을 처음 시작했을때 스테이지를 고를 수 있도록 해준다.
//-----------------------------------------------------------------------------
void Snake_Game::SetGame()
{
    while(true)
    {
        this->InitGame();

        //UI를 위해서
        MoveCursor(Position(14,21));
        puts("N = 다음 스테이지 / P = 이전 스테이지 / S = 시작");

        int ch=getch();

        //키값을 받고, N이면 다음스테이지 P면 이전스테이지 S를 누르면 루프를빠져간다.
        if (ch == 0xE0)
        {
            getch();
        }
        else
        {
            if (tolower(ch) == 'n')
            {
                if(current_stage_ < STAGE_FOUR)
                {
                    current_stage_++;
                }
            }
            if (tolower(ch) == 'p')
            {
                if(current_stage_ > STAGE_ONE)
                {
                    current_stage_--;
                }
            }
            if (tolower(ch) == 's')
            {
                break;
            }
        }
    }

    //UI를 지우기위해,/
    MoveCursor(Position(14,21));
    puts("                                                 ");
}
开发者ID:wawworld,项目名称:20071965,代码行数:47,代码来源:Snake_Game.cpp


示例18: GetCursorPos

void CGUIDialogKeyboardGeneric::Backspace()
{
  int iPos = GetCursorPos();
  if (iPos > 0)
  {
    m_strEdit.erase(iPos - 1, 1);
    MoveCursor(-1);
    UpdateLabel();
  }
}
开发者ID:maximuska,项目名称:xbmc,代码行数:10,代码来源:GUIDialogKeyboardGeneric.cpp


示例19: main

void main ()
{
	/* Variable Declarations */
	int Row, Col;
	int BoardNum = 0;
	int ULStat = 0;
	int Chan;
	double frequency;
	float    RevLevel = (float)CURRENTREVNUM;

	/* Declare UL Revision Level */
	ULStat = cbDeclareRevision(&RevLevel);

	/* Initiate error handling
	Parameters:
	PRINTALL :all warnings and errors encountered will be printed
	DONTSTOP :program will continue even if error occurs.
						Note that STOPALL and STOPFATAL are only effective in 
						Windows applications, not Console applications. 
	*/
	cbErrHandling (PRINTALL, DONTSTOP);

	/* set up the display screen */
	ClearScreen();
	printf ("Demonstration of cbTimerStart() and cbTimerStop()\n\n");
	GetTextCursor (&Col, &Row);

	Chan = 0;
	MoveCursor (0, 7);
	printf ("Enter a frequency between 16 and 1000000 Hz: ");
	MoveCursor (50, 7);
	scanf ("%lf", &frequency);
	ULStat = cbTimerOutStart (BoardNum, Chan, &frequency);
	if(ULStat == NOERRORS)
	{
		printf ("\n  Timer 0 was set to output %.2lf Hz.\n\n", frequency);
		printf ("Press any key to stop the timer:\n ");
		while (!kbhit()){}
		cbTimerOutStop(BoardNum, Chan);
	}
	MoveCursor (1, 20);
	printf ("\n");
}
开发者ID:mikanradojevic,项目名称:sdkpub,代码行数:43,代码来源:TimerOutStart01.C


示例20: MakeColumns

/*------------------------------------------------------------------------------
-- FUNCTION:    MakeColumns
--
-- DATE:        Nov 6, 2010
--
-- REVISIONS:   (Date and Description)
--
-- DESIGNER:    Ian Lee
--
-- PROGRAMMER:  Ian Lee
--
-- INTERFACE:   VOID MakeColumns(HWND hWnd)
--                              hWnd - handle to the window
--
-- REVISIONS:	Daniel Wright - Dec 2, 2010
--					Modified to display columns for wireless protocol.
-- RETURNS:     VOID.
--
-- NOTES:
--              Prints Column Headers "Token" and "Value"
--
------------------------------------------------------------------------------*/
VOID MakeColumns(HWND hWnd){
    CHAR temp1[10]= "Frame";
    CHAR temp2[15]= "Frame Length";
    CHAR temp3[5]= "CRC";
    DWORD i;

    MoveCursor( hWnd, 1, 1, FALSE);
    for(i=0;i<10;i++){
        UpdateDisplayBuf(hWnd,temp1[i]);
    }
    MoveCursor( hWnd, 12, 1, FALSE);
    for(i=0;i<15;i++){
        UpdateDisplayBuf(hWnd,temp2[i]);
    }
    MoveCursor(hWnd, 29, 1, FALSE);
    for(i = 0; i<5; i++){
        UpdateDisplayBuf(hWnd,temp3[i]);
    }
}
开发者ID:deanmorin,项目名称:wireless,代码行数:41,代码来源:Application.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MoveDown函数代码示例发布时间:2022-05-30
下一篇:
C++ MouseY函数代码示例发布时间: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