- HWND hWnd = GetHwnd();
-
- ::WinSendMsg(hWnd, EM_PASTE, (MPARAM)0, (MPARAM)0);
-} // end of wxComboBox::Paste
-
-void wxComboBox::SetEditable(
- bool bEditable
-)
-{
- HWND hWnd = GetHwnd();
-
- ::WinSendMsg(hWnd, EM_SETREADONLY, (MPARAM)!bEditable, (MPARAM)0L);
-} // end of wxComboBox::SetEditable
-
-void wxComboBox::SetInsertionPoint(
- long lPos
-)
-{
- HWND hWnd = GetHwnd();
-
- ::WinSendMsg(hWnd, EM_SETFIRSTCHAR, MPFROMLONG(lPos), (MPARAM)0);
-} // end of wxComboBox::SetInsertionPoint
-
-void wxComboBox::SetInsertionPointEnd()
-{
- long lPos = GetLastPosition();
-
- SetInsertionPoint(lPos);
-} // end of wxComboBox::SetInsertionPointEnd
-
-long wxComboBox::GetInsertionPoint() const
-{
- long lPos = LONGFROMMR(::WinSendMsg( GetHwnd()
- ,LM_QUERYSELECTION
- ,(MPARAM)0
- ,(MPARAM)0
- ));
- if (lPos == LIT_NONE)
- return wxNOT_FOUND;
- return lPos;
-} // end of wxComboBox::GetInsertionPoint
-
-long wxComboBox::GetLastPosition() const
-{
- HWND hEditWnd = GetHwnd();
- long lLineLength = 0L;
- WNDPARAMS vParams;
-
- //
- // Get number of characters in the last (only) line. We'll add this to the character
- // index for the last line, 1st position.
- //
-
-
- vParams.fsStatus = WPM_CCHTEXT;
- if (::WinSendMsg( GetHwnd()
- ,WM_QUERYWINDOWPARAMS
- ,&vParams
- ,0
- ))
- {
- lLineLength = (long)vParams.cchText;
- }