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


C++ DestroyCaret函数代码示例

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


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

示例1: ToggleOverwrite

/*
 *	Toggle overwrite mode.
 */
void ToggleOverwrite( LPCLASSDATA lpcd )
{
	/*
	 * Toggle overwrite mode.
	 */
	lpcd->bOverwrite = ! lpcd->bOverwrite;

	/*
	 * Destroy the caret if we have focus and
	 * the caret type is not fixed at a block cursor.
	 */
	if ( Parser->nCaretType != CARET_BLOCK && lpcd->bHasFocus ) 
	{
		/*
		 * Destroy...
		 */
		DisplayCaret( lpcd, FALSE );
		DestroyCaret();
	}

	/*
	 * Update status.
	 */
	SendStatusMessage( lpcd );

	/*
	 * Create the caret if we have focus and
	 * the caret type is not fixed at a block cursor.
	 */
	if ( Parser->nCaretType != CARET_BLOCK && lpcd->bHasFocus ) 
		/*
		 * Create the caret.
		 */
		CreateTheCaret( lpcd ); 
}
开发者ID:jcbaar,项目名称:Brainchild,代码行数:38,代码来源:misc.c

示例2: WCUSER_ShapeCursor

/******************************************************************
 *		WCUSER_ShapeCursor
 *
 * Sets a new shape for the cursor
 */
void	WCUSER_ShapeCursor(struct inner_data* data, int size, int vis, BOOL force)
{
    if (force || size != data->curcfg.cursor_size)
    {
	if (data->curcfg.cursor_visible && PRIVATE(data)->hWnd == GetFocus()) DestroyCaret();
	if (PRIVATE(data)->cursor_bitmap) DeleteObject(PRIVATE(data)->cursor_bitmap);
	PRIVATE(data)->cursor_bitmap = (HBITMAP)0;
	if (size != 100)
	{
	    int		w16b; /* number of byets per row, aligned on word size */
	    BYTE*	ptr;
	    int		i, j, nbl;

	    w16b = ((data->curcfg.cell_width + 15) & ~15) / 8;
	    ptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, w16b * data->curcfg.cell_height);
	    if (!ptr) {WINE_ERR("OOM\n"); return;}
	    nbl = max((data->curcfg.cell_height * size) / 100, 1);
	    for (j = data->curcfg.cell_height - nbl; j < data->curcfg.cell_height; j++)
	    {
		for (i = 0; i < data->curcfg.cell_width; i++)
		{
		    ptr[w16b * j + (i / 8)] |= 0x80 >> (i & 7);
		}
	    }
	    PRIVATE(data)->cursor_bitmap = CreateBitmap(data->curcfg.cell_width,
                                               data->curcfg.cell_height, 1, 1, ptr);
	    HeapFree(GetProcessHeap(), 0, ptr);
	}
	data->curcfg.cursor_size = size;
	data->curcfg.cursor_visible = -1;
    }
开发者ID:NVIDIA,项目名称:winex_lgpl,代码行数:36,代码来源:user.c

示例3: GetDC

void CSelection::ResetCaret( HFONT hFont )
{
    HDC hDC = GetDC( NULL );
    HFONT hOldFont = ( HFONT ) SelectObject( hDC, hFont );
    TEXTMETRIC tm;
    VERIFY( GetTextMetrics( hDC, &tm ) );
    SelectObject( hDC, hOldFont );
    ReleaseDC( NULL, hDC );

    // caret height is the font height
    m_cyCaret = tm.tmExternalLeading + tm.tmHeight;

    // insert caret width is the font height / 6
    m_cxCaretIns = m_cyCaret / 6;
    m_cxCaretIns = max( m_cxCaretIns, 2 );

    if ( m_pCtrl->OvertypeCaret() && m_pCtrl->InOvertypeMode() )
    {
        m_cxCaret = tm.tmAveCharWidth;
    }
    else
    {
        m_cxCaret = m_cxCaretIns;
    }

    // recreate the caret in the right dimensions
    if ( ::GetFocus() == m_hWnd )
    {
        VERIFY( DestroyCaret() );
        VERIFY( CreateCaret( m_hWnd, NULL, m_cxCaret, m_cyCaret ) );
        ::ShowCaret( m_hWnd );
    }
}
开发者ID:GaoHongchen,项目名称:chromatic,代码行数:33,代码来源:EDITSEL.CPP

示例4: DestroyCaret

void CHexEdit::OnEditSelectAll() 
{
	m_selStart = 0;
	m_selEnd = m_length;
	DestroyCaret();
	Invalidate(FALSE);
}
开发者ID:YangJinWen,项目名称:H264BSAnalyzer,代码行数:7,代码来源:hexeditctrl.cpp

示例5: DestroyCaret

void CHexEdit::OnEditSelectAll() 
{
	m_selStart = 0;
	m_selEnd = m_length;
	DestroyCaret();
	RedrawWindow();
}
开发者ID:Garfield-Chen,项目名称:openlibs,代码行数:7,代码来源:HexEdit.cpp

示例6: hugsprim_DestroyCaret_41

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

示例7: HOTKEY_KillFocus

static LRESULT
HOTKEY_KillFocus (HOTKEY_INFO *infoPtr)
{
    infoPtr->bFocus = FALSE;
    DestroyCaret ();

    return 0;
}
开发者ID:AlexSteel,项目名称:wine,代码行数:8,代码来源:hotkey.c

示例8: HexEdit_KillFocus

static inline LRESULT
HexEdit_KillFocus (HEXEDIT_INFO *infoPtr, HWND receiveFocus)
{
    infoPtr->bFocus = FALSE;
    DestroyCaret();

    return 0;
}
开发者ID:howard5888,项目名称:wineT,代码行数:8,代码来源:hexedit.c

示例9: DestroyCaret

void CKaiView::OnKillFocus (CWnd* pNewWnd) 
{
    CView::OnKillFocus(pNewWnd);
    
    // TODO: Add your message handler code here    
    BOOL mfcb_ = DestroyCaret(); // MSDN says this is required

}
开发者ID:kbogatyrev,项目名称:Kai,代码行数:8,代码来源:KaiView.cpp

示例10: HideCaret

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

示例11: OnKillFocus

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

示例12: ME_HideCaret

void ME_HideCaret(ME_TextEditor *ed)
{
  if(!ed->bHaveFocus || ME_IsSelection(ed))
  {
    ITextHost_TxShowCaret(ed->texthost, FALSE);
    DestroyCaret();
  }
}
开发者ID:AmesianX,项目名称:wine,代码行数:8,代码来源:caret.c

示例13: ME_HideCaret

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

示例14: GoodbyeCursor

/*
 * GoodbyeCursor - we are losing focus, so get rid of our cursor
 */
void GoodbyeCursor( window_id wid )
{
    if( haveOldBlinkTime ) {
        SetCaretBlinkTime( oldBlinkTime );
    }
    MyHideCaret( wid );
    DestroyCaret();

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

示例15: HideCaret

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


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