本文整理汇总了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 );
}
示例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;
}
示例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 );
}
}
示例4: DestroyCaret
void CHexEdit::OnEditSelectAll()
{
m_selStart = 0;
m_selEnd = m_length;
DestroyCaret();
Invalidate(FALSE);
}
示例5: DestroyCaret
void CHexEdit::OnEditSelectAll()
{
m_selStart = 0;
m_selEnd = m_length;
DestroyCaret();
RedrawWindow();
}
示例6: hugsprim_DestroyCaret_41
static void hugsprim_DestroyCaret_41(HugsStackPtr hugs_root)
{
HsBool res1;
res1 = DestroyCaret();
hugs->putBool(res1);
hugs->returnIO(hugs_root,1);
}
示例7: HOTKEY_KillFocus
static LRESULT
HOTKEY_KillFocus (HOTKEY_INFO *infoPtr)
{
infoPtr->bFocus = FALSE;
DestroyCaret ();
return 0;
}
示例8: HexEdit_KillFocus
static inline LRESULT
HexEdit_KillFocus (HEXEDIT_INFO *infoPtr, HWND receiveFocus)
{
infoPtr->bFocus = FALSE;
DestroyCaret();
return 0;
}
示例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
}
示例10: HideCaret
void CChildView::OnKillFocus(CWnd* pNewWnd)
{
CWnd ::OnKillFocus(pNewWnd);
// Caret 제거.
HideCaret();
DestroyCaret();
}
示例11: OnKillFocus
/*---------------------------------------------------------------------------*\
| |
\*---------------------------------------------------------------------------*/
void OnKillFocus(HWND hwnd, HWND hwndNewFocus)
{
/*
* Eliminate caret when we lose keyboard.
*/
HideCaret(hwnd);
DestroyCaret();
}
示例12: ME_HideCaret
void ME_HideCaret(ME_TextEditor *ed)
{
if(!ed->bHaveFocus || ME_IsSelection(ed))
{
ITextHost_TxShowCaret(ed->texthost, FALSE);
DestroyCaret();
}
}
示例13: ME_HideCaret
void ME_HideCaret(ME_TextEditor *ed)
{
if(ed->bHaveFocus)
{
HideCaret(ed->hWnd);
DestroyCaret();
}
}
示例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 */
示例15: HideCaret
void CMagneticView::CaretOff(void)
{
if (m_bCaret)
{
HideCaret();
DestroyCaret();
m_bCaret = false;
}
}