tags:

views:

545

answers:

6

What on earth is a caret in the context of a CSplitterWnd class? I can't find any documentation relating explicitly to CSplitterWnds...

EDIT: Specifically, what do these functions actually do:

CWnd * pCurView = m_wndSplitter2.GetPane(2, 0);
pCurView->ShowCaret()
pCurView->HideCaret()

EDIT2: Please note, I know what a caret is, I am specifically asking about the functions within the context of the CSlitterWnd Class. I have seen the MSDN documentation and it offers no real explaination.

+1  A: 

It's a caret in the normal sense. Applies only when you're splitting two CEditViews in the same window.

DannySmurf
A: 

Perhaps they are referring to the cursor, the blinking vertical bar on the screen.

DOK
+1  A: 

In the Windows SDK world the cursor is actually the mouse pointer, and the caret is the flashing bar you see in text controls etc...

Sean
+1  A: 

Specifically;

CWnd * pCurView = m_wndSplitter2.GetPane(2, 0);

Get a pane, as in a CView derived class, surrounded by your splitter window

pCurView->ShowCaret()

Show the littler vertical bar at the text editing position in that view. This is the cursor used in any text editing control such as a CEdit

pCurView->HideCaret()

Hide the caret / vertical cursor.

Shane MacLaughlin
A: 

It's the text cursor.

In early versions of windows, the text cursor was like a proofreader's caret mark (like ^ only on the baseline). This makes some sense, as that mark is what proofreaders use to indicate where text should be inserted.

Still seems bizarre to call it the caret, but they did, possibly because they'd already decided to use the word "cursor" for what everyone else calls the mouse pointer.

Mark Baker
But there is no caret displayed in a CSplitterWnd class!?!?
Konrad
It has nothing to do with CSplitterWnd. As soon as you call GetPane you've got a pointer to whatever CWnd you happend to create as the pane. The calls to ShowCarent and HideCaret are completely irrelevant to being a CSplitterWnd pane.
Aidan Ryan
+1  A: 

Any CWnd can have a caret, but only CWnd inheritors that CreateCaret first actually display one. @DannySmurf gives you one example - CEditView - of a CView that creates a caret that you can show and hide.

Depending on the specific kind of CView you've got on your pane, ShowCaret is probably irrelevant. It has nothing to do with CSplitterWnd.

Aidan Ryan