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

C++ HideCaret函数代码示例

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

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



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

示例1: SetCaretPos

void CChildView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if ( nChar == VK_RETURN ) //return 키
	{
		pCaret.y += cyChar;
		pCaret.x = 0;
		SetCaretPos( pCaret );
		return ;
	}
	CClientDC dc(this);
	CFont* old = (CFont*)dc.SelectStockObject( SYSTEM_FIXED_FONT );

	// 출력전에 caret 감추기.
	HideCaret();

	char msg[] = { nChar }; // 1개의 문자를 문자열로 바꾸기.
	dc.TextOut( pCaret.x, pCaret.y, msg, 1);

	pCaret.x += cxChar;
	SetCaretPos( pCaret );

	ShowCaret(); // 출력후 다시 Caret를 보여 준다.

	dc.SelectObject( old); // dc 복구.
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:25,代码来源:ChildView.cpp


示例2: ImeUIStartComposition

void ImeUIStartComposition( HWND hwnd )
{
    PCONSOLE_TABLE ConTbl;

    ConTbl = SearchConsole(LastConsole);
    if (ConTbl == NULL) {
        DBGPRINT(("CONIME: Error! Cannot found registed Console\n"));
        return;
    }

    //
    // Set fInComposition variables.
    //
    ConTbl->fInComposition = TRUE;

#ifdef DEBUG_MODE
    {
        int i ;
        for (i = FIRSTCOL ; i < MAXCOL ; i++) {
            ConvertLine[i] = UNICODE_SPACE ;
            ConvertLineAtr[i] = 0 ;
        }
    }
#endif
#ifdef DEBUG_INFO
    xPos = FIRSTCOL;
    xPosLast = FIRSTCOL;
    HideCaret( hwnd );
    DisplayConvInformation( hwnd ) ;
    ResetCaret( hwnd );
#endif
}
开发者ID:conioh,项目名称:os-design,代码行数:32,代码来源:consubs.c


示例3: ME_LButtonDown

void ME_LButtonDown(ME_TextEditor *editor, int x, int y)
{
  ME_Cursor tmp_cursor;
  int is_selection = 0;
  
  editor->nUDArrowX = -1;
  
  y += ME_GetYScrollPos(editor);

  tmp_cursor = editor->pCursors[0];
  is_selection = ME_IsSelection(editor);

  ME_FindPixelPos(editor, x, y, &editor->pCursors[0], &editor->bCaretAtEnd);
  
  if (GetKeyState(VK_SHIFT)>=0)
  {
    editor->pCursors[1] = editor->pCursors[0];
  }
  else
  {
    if (!is_selection) {
      editor->pCursors[1] = tmp_cursor;
      is_selection = 1;
    }
  }
  ME_InvalidateSelection(editor);
  HideCaret(editor->hWnd);
  ME_MoveCaret(editor);
  ShowCaret(editor->hWnd);
  ME_ClearTempStyle(editor);
  ME_SendSelChange(editor);
}
开发者ID:NVIDIA,项目名称:winex_lgpl,代码行数:32,代码来源:caret.c


示例4: FaderSetPosition

void	FaderSetPosition( HWND hFader, int nPos )
/////////////////////////////////////////////////////////////////////////////
{
	PFADERINFO		pFI;
	HDC				hDC;

	pFI = (PFADERINFO)GetWindowLong( hFader, GWL_USERDATA );
	if( !pFI ) 
		return;

	if( !pFI->nMax )
		return;

	pFI->nPos = nPos;

	if( pFI->bHasFocus )
		HideCaret( hFader );
	
	hDC = GetDC( hFader );
	// MoveKnob updates pFI->nBitmapPos
	MoveKnob( hDC, (pFI->nMax - pFI->nPos) * (pFI->nWindowY - pFI->bmFader.bmHeight) / pFI->nMax, pFI );
	ReleaseDC( hFader, hDC );

	if( pFI->bHasFocus )
	{
		SetCaretPos( pFI->nBitmapX + 2, pFI->nBitmapPos + (CARET_OFFSET/2) );
		ShowCaret( hFader );
	}
}
开发者ID:jerlich,项目名称:rt-fsm,代码行数:29,代码来源:Fader.cpp


示例5: SendMessageW

	LRESULT RichEdit::ParentWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, 
		UINT_PTR uIdSubclass, DWORD_PTR dwRefData) {
		if(msg==WM_NOTIFY && (((LPNMHDR)lParam)->code)== EN_LINK) {
			ENLINK* enLinkInfo = (ENLINK *)lParam;
			if(enLinkInfo->msg == WM_LBUTTONUP || enLinkInfo->msg == WM_RBUTTONUP) {
				LONG utlBeg = enLinkInfo->chrg.cpMin;
				LONG utlEnd = enLinkInfo->chrg.cpMax;
				if(utlEnd - utlBeg > 0) {
					HWND hRichEdit = enLinkInfo->nmhdr.hwndFrom;
					wchar_t* urlString = new wchar_t[utlEnd-utlBeg+1];
					SendMessageW(hRichEdit, EM_EXSETSEL, 0, reinterpret_cast<LPARAM>(&enLinkInfo->chrg));
					SendMessageW(hRichEdit, EM_GETSELTEXT, 0, reinterpret_cast<LPARAM>(urlString));
					switch(enLinkInfo->msg) {
					case WM_LBUTTONUP:
						ShellExecuteW(NULL, L"open", urlString, NULL, NULL, SW_SHOWNORMAL);
						break;
					case WM_RBUTTONUP:
						copyToClipboard(hRichEdit, urlString);
						break;
					}
					delete [] urlString;
					SendMessage(hRichEdit, EM_SETSEL, utlEnd, utlEnd);
					HideCaret(hRichEdit);
				}
			}
		}
		return DefSubclassProc(hWnd, msg, wParam, lParam);
	}
开发者ID:mmuszkow,项目名称:wtwUpdate,代码行数:28,代码来源:RichEdit.cpp


示例6: memset

	RichEdit::RichEdit(HWND hControl) : wtwUpdate::ui::Control(hControl) {
		if (!hControl)
			return;

		memset(&_defaultCf, 0, sizeof(CHARFORMAT));
#ifndef MY_RICHEDIT_NO_OLE
		_pRichEditOle = NULL; 
		SendMessage(getHwnd(), EM_GETOLEINTERFACE, 0, reinterpret_cast<LPARAM>(&_pRichEditOle));
#endif
		SendMessage(getHwnd(), EM_AUTOURLDETECT, TRUE, 0);

		LRESULT mask = SendMessage(getHwnd(), EM_GETEVENTMASK, 0, 0);
		SendMessage(getHwnd(), EM_SETEVENTMASK, 0, mask | ENM_LINK);

		_defaultCf.cbSize = sizeof(CHARFORMAT);
		_defaultCf.dwMask = CFM_ALL;

		SendMessage(getHwnd(), EM_GETCHARFORMAT, SCF_DEFAULT, reinterpret_cast<LPARAM>(&_defaultCf));
		_defaultCf.dwEffects = CFE_AUTOCOLOR;
		wcscpy_s(_defaultCf.szFaceName, 32, L"Tahoma");
		SendMessage(getHwnd(), EM_SETCHARFORMAT, SCF_DEFAULT, reinterpret_cast<LPARAM>(&_defaultCf));

		SetWindowSubclass(getHwnd(), RichEdit::WndProc,
			0, reinterpret_cast<DWORD_PTR>(this));
		SetWindowSubclass(GetParent(getHwnd()), RichEdit::ParentWndProc,
			0, reinterpret_cast<DWORD_PTR>(this));
		HideCaret(getHwnd());
		_scrolledDown = true;

	}
开发者ID:mmuszkow,项目名称:wtwUpdate,代码行数:30,代码来源:RichEdit.cpp


示例7: DisplayCaret

void DisplayCaret( LPCLASSDATA lpcd, BOOL bShow )
{
	/*
	 *	Only when we have the focus.
	 */
	if ( lpcd->bHasFocus == FALSE )
		return;

	/*
	 *	Anything changed?
	 */
	if ( bShow != lpcd->bCaretVisible )
	{
		/*
		 *	Change it.
		 */
		if (( lpcd->bCaretVisible = bShow ) == TRUE )
		{
			int cy = ( Parser->nCaretType == CARET_HORIZONTAL && ! lpcd->bOverwrite ) ? Parser->szCharSize.cy - ( 2 * GetSystemMetrics( SM_CYBORDER )) : 0;
			SetCaretPos( GetMarginWidth( lpcd ) + GetLineMarginWidth( lpcd ) + (( GetCaretOffset( lpcd, lpcd->ptCaretPos.x ) - lpcd->ptViewPos.x ) * Parser->szCharSize.cx ), ( lpcd->ptCaretPos.y - lpcd->ptViewPos.y ) * Parser->szCharSize.cy + cy );
			ShowCaret( lpcd->hWnd );
		}
		else
			HideCaret( lpcd->hWnd );
	}

	/*
	 *	Send caret position message.
	 */
	SendCaretMessage( lpcd );
}
开发者ID:x2on,项目名称:NiLogViewer,代码行数:31,代码来源:caret.c


示例8: OnKillFocus

/*---------------------------------------------------------------------------*\
 |                                                                           |
\*---------------------------------------------------------------------------*/
void OnKillFocus(HWND hwnd, HWND hwndNewFocus)
{
    /*
     *  Eliminate caret when we lose keyboard.
     */
    HideCaret(hwnd);
    DestroyCaret();
}
开发者ID:venkatarajasekhar,项目名称:repo,代码行数:11,代码来源:CARET.CPP


示例9: ME_HideCaret

void ME_HideCaret(ME_TextEditor *ed)
{
  if(ed->bHaveFocus)
  {
    HideCaret(ed->hWnd);
    DestroyCaret();
  }
}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:8,代码来源:caret.c


示例10: MyKillCaret

void MyKillCaret( window_id wid )
{
    if( !caretKilled ) {
        MyHideCaret( wid );
        HideCaret( wid );
        caretKilled = true;
    }
}
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:8,代码来源:cursor.c


示例11: ITextHostImpl_TxShowCaret

DECLSPEC_HIDDEN BOOL WINAPI ITextHostImpl_TxShowCaret(ITextHost *iface, BOOL fShow)
{
    ITextHostImpl *This = impl_from_ITextHost(iface);
    if (fShow)
        return ShowCaret(This->hWnd);
    else
        return HideCaret(This->hWnd);
}
开发者ID:RareHare,项目名称:reactos,代码行数:8,代码来源:txthost.c


示例12: MyHideCaret

/*
 * MyHideCaret - HideCaret w/o additive effects
 */
void MyHideCaret( window_id wid )
{
    if( caretDisplayed ) {
        HideCaret( wid );
        caretDisplayed = false;
    }

} /* MyHideCaret */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,代码来源:cursor.c


示例13: HideCaret

void CChildView::OnKillFocus(CWnd* pNewWnd) 
{
	CWnd ::OnKillFocus(pNewWnd);
	
	// Caret 제거.
	HideCaret();
	DestroyCaret();
}
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:8,代码来源:ChildView.cpp


示例14: ImeUIClearData

//**********************************************************************
//
// void ImeUIClearData()
//
// Handler routine of WM_IME_SELECT message.
//
//**********************************************************************
void ImeUIClearData( 
    HWND hwnd )
{

    RECT            rect;           
    int             i;
   
    SetWindowText( hwnd, szSteTitle );

    //
    // If user switches to other IME, here we destroy all candidate
    // windows which has been opened and erase all composition
    // chars if any.
    //

    for( i = 0; i < MAX_LISTCAND; i++ )
    {
        if ( gImeUIData.hListCand[ i ] )
        {
            //
            // The i-th candidate list has already been displayed,
            // destroy it and free memory which stores candidate
            // strings.
            //

            DestroyWindow( gImeUIData.hListCand[ i] );
            GlobalFree( gImeUIData.hListCandMem[ i ] );

            gImeUIData.hListCand[ i ] =
            gImeUIData.hListCandMem[ i ] = NULL;

        }
    }

    //
    // Update client area.
    //

    GetClientRect( hwnd, &rect );

    InvalidateRect( hwnd, &rect, FALSE );


    //
    // Reset IMEUI's global data.
    //

    gImeUIData.uCompLen = gImeUIData.ImeState = 0;

    //
    // Reset caret to the original position.
    //

    HideCaret( hwnd );
    ResetCaret( hwnd );
    ShowCaret( hwnd );

}
开发者ID:nizihabi,项目名称:sdk71examples,代码行数:65,代码来源:ImeUI.C


示例15: CommandLineKey

static void CommandLineKey(int id, WPARAM wParam, int keytype)
{
	TCHAR code = (TCHAR)wParam;
	int len = (int)wcslen(commandLine);
	if (keytype == KEYCHAR) {
		if (!commandLineFocus && code == L':') {
			CreateCaret(g_hWnd, (HBITMAP)NULL, 1, FONTSIZE_CMD);
			commandLineFocus = 1;
			commandLine[commandLinePos++] = L':';
			commandLine[commandLinePos] = L'\0';
			CommandLineSetpos();
			ShowCaret(g_hWnd);
		}
		else if (commandLineFocus) {
			if (code == L'\r' || code == VK_ESCAPE) {
				if(code == L'\r' && LoaderRun(commandLine + 1))
					ErrorPrintf(L"CommandLineError: Cannot parse the command");
				commandLine[0] = L'\0';
				commandLinePos = 0;
				commandLineFocus = 0;
				HideCaret(g_hWnd);
				DestroyCaret();
				memset(KeyboardIsDown, 0, sizeof(KeyboardIsDown));
			}
			if (code < L' ' || len == MAX_COMMANDLINEBUFFER) return;
			MoveMemory(commandLine + commandLinePos + 1, commandLine + commandLinePos, (len - commandLinePos + 1) * sizeof(TCHAR));
			commandLine[commandLinePos++] = code;
			CommandLineSetpos();
		}
	}
	else if (keytype == KEYDOWN && commandLineFocus) {
		switch (code)
		{
		case VK_LEFT:
			if (commandLinePos > 1) --commandLinePos;
			CommandLineSetpos();
			break;
		case VK_RIGHT:
			if (commandLinePos < len) ++commandLinePos;
			CommandLineSetpos();
			break;
		case VK_HOME:
			commandLinePos = 1;
			break;
		case VK_END:
			commandLinePos = len;
			break;
		case VK_BACK:
			if (commandLinePos > 1) {
				MoveMemory(commandLine + commandLinePos - 1, commandLine + commandLinePos, (len - commandLinePos + 1) * sizeof(TCHAR));
				commandLinePos--;
			}
			CommandLineSetpos();
			break;
		}
	}
}
开发者ID:sunziping2016,项目名称:Escape,代码行数:57,代码来源:commonui.cpp


示例16: hugsprim_HideCaret_38

static void hugsprim_HideCaret_38(HugsStackPtr hugs_root)
{
    HsPtr arg1;
    HsBool res1;
    arg1 = hugs->getPtr();
    res1 = HideCaret(arg1);
    hugs->putBool(res1);
    hugs->returnIO(hugs_root,1);
}
开发者ID:xpika,项目名称:winhugs,代码行数:9,代码来源:Window.c


示例17: HideCaret

void CMagneticView::CaretOff(void)
{
  if (m_bCaret)
  {
    HideCaret();
    DestroyCaret();
    m_bCaret = false;
  }
}
开发者ID:DavidKinder,项目名称:Magnetic,代码行数:9,代码来源:MagneticView.cpp


示例18: HideCaret

// Hide and destroy the caret (probably due to losing focus).
void CScrView::caret_hide()
{
	// Is the caret currently displayed?
	if (caret_level_++ == 0 && caret_mode_ && caret_changes_ && caret_seen_)
	{
		// Hide and destroy it
		HideCaret();
		::DestroyCaret();
	}
}
开发者ID:KB3NZQ,项目名称:hexedit4,代码行数:11,代码来源:ScrView.cpp


示例19: set_update

/*----------------------------------------------------------------------------*/
void set_update(HWND hwnd) {

    void checkcomment(int oo, int yn);
    int nextcmt(int);

    static int ac; RECT rect;

    if (caret==3)
        HideCaret(hwnd), caret=1;

    if (edp==NULL) {
        InvalidateRect(hwnd, NULL, FALSE);
        return;
    }

    if (upd) checkcomment(fpga,pgy+2);
    setsb(hwnd);

    if (GetFocus() == hwnd)
        SetCaretPos(zx0+(curx-clft)*zx-My_CaretSize/2, zy0+cury*zy);

    //if (chg_0!=changed()) setwtext();

    rect.top   = rect.left=0;
    rect.right = cwx+FRM;

    switch (upd) {
    case 16:                        // color update
    case 4:                         // scroll up
    case 2:                         // scroll dn
    case 1:                         // update all
        rect.bottom = cwy+FRM;
        break;

    case 8:                         // line update
        if (langflg && ac!=nextcmt(fpos))
        {
            rect.bottom = cwy + FRM;
            break;
        }

        rect.top    = zy0+zy*cury;
        rect.bottom = rect.top+zy;
        InvalidateRect(hwnd, &rect, FALSE);
        rect.top    = 0;

    case 0:
    default:
        rect.bottom=title_h;
    }

    InvalidateRect(hwnd, &rect, FALSE);
    if (langflg) ac=nextcmt(fpos);
    upd=0;
}
开发者ID:Jmos,项目名称:bbclean-xzero450,代码行数:56,代码来源:edproc.cpp


示例20: DisplayResultString

void DisplayResultString( HWND hwnd, LPWSTR lpwStr )
{

    int         StrLen = lstrlenW( lpwStr );

    CopyMemory(ConvertLine, lpwStr, StrLen*sizeof(WCHAR)) ;
    HideCaret( hwnd );
    DisplayConvInformation( hwnd ) ;
    ResetCaret( hwnd );

    // gImeUIData.uCompLen = 0;

}
开发者ID:conioh,项目名称:os-design,代码行数:13,代码来源:consubs.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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