You are sure wrong! :) Here you are: CString CDictView::GetClipData() { CString vocab = ""; if (IsClipboardFormatAvailable(CF_TEXT)) { if (OpenClipboard()) { vocab = (char*)GetClipboardData(CF_TEXT); EmptyClipboard(); } CloseClipboard(); } return vocab; } Good luck!
Are you sure your m_hWnd represents edit or combobox control? Only these window classes respond to WM_COPY message. Tomasz Sowinski -- http://www.shooltz.com
Thank you very much. I've already send WM_COPY message but it doesn't work. There's nothing in the clipboard. ::SendMessage(m_hWnd, WM_COPY, 0, 0); I don't know why it doesn't work. Did I forget something? Guide me, please. :confused:
Thank you very much. But there's a problem. I didn't get highlighted text from edit box but i want to get highlighted text from anywhere on screen (ex. in browser, spreadsheet, notepad, etc.). How can I get it? Guide me, please. :-O
In MFC you're not using CheckMenuItem etc. Instead, you add special ON_UPDATE_COMMAND_UI handler which gets the CCmdUI object on input. One of the methods is SetCheck, which is all you need to have menu items checked. Tomasz Sowinski -- http://www.shooltz.com