Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

DockingPane with Splitter and RichEditctrl not returning GetSelText

$
0
0

I have a CDockingPane, with a SplitterWnd in it, and in both panes I have RichEditctrl in each.
When I ask it, if there is text in the window after I type text  with m_wndRightRichEditCtrl.GetTextLength()  it returns length and works fine...

IF I ask it, to tell me if the RichEditCtrl has Selected Text in it when I select text, it fails.. it keeps showing nothing??

If (m_wndRightRichEditCtrl.GetSelText().GetLength())TRACE("SELECTED***Text in SecoundPane \n");

CString strText=m_wndRightRichEditCtrl.GetSelText();

if( strText.GetLength() )
TRACE1("SELECTED***Text in SecoundPane is %s\n", strText);

Layout looks like this:

CToolbar
{
}

CSplitterWnd
{
}

CDockPane
{
   CSplitterWnd pWnd;
   CRichEditCtrl leftctrl,rightctrl;
   CToolbar toolbar;
}

Why is it failing to tell me the selected text when I ask the rightctrl directly?  When GetLength works fine? I tried splitter getpane, I tried EM_EXGETSEL, and EM_GETSELTEXT and all fail...?



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>