解决方案 »
- MFC单文档视图应该程序不能接收到另一个进程发来的WM_COPYDATA消息。
- function does not take 1 parameters???
- 急急急!!!关于大整数乘法的问题
- 各位大侠,怎样设置对话框的标题?小弟谢过了
- 怎样清空CMemFile对象的内容?
- 绝望中,紧急求教:有没有用过 CPPToolTip 的兄弟大侠来指点一二。
- [求助]如何用VC实现Email的附件收,发
- CButton有没有MouseDown和MouseUp消息?
- 请问vc如何在应用程序中调用宁一个程序?
- 从内存中打开word文档
- 如何获得ListCtrl控件滚动条的长度
- winsock api的阻塞与非阻塞
可能还没解决好
{
CPoint point;
GetCursorPos(&point);
// ScreenToClient(&point);
// MapWindowPoints(&m_Combo,&point,1);
point.x-=70;
point.y+=60;
HWND hWnd=::WindowFromPoint(point);//(hWnd != m_ListInCombo) &&
if((hWnd != this->m_hWnd))
{
RECT rc;
::GetWindowRect(hWnd,&rc);
afxDump << rc << " imm\n";
::MoveWindow(hWnd,rc.left,rc.top-((rc.bottom-rc.top)+30),
rc.right-rc.left,rc.bottom-rc.top,TRUE);
}
}
//
CListBox m_ListInCombo;
//Get list in combo
HBRUSH CListCheckDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(pWnd->m_hWnd != m_LBox.m_hWnd)
{
if (nCtlColor == CTLCOLOR_LISTBOX)
{//ListBox control,It is a COMBOLBOX,not a normal listbox.Besides,
//It is not a child window of combobox.
if (m_ListInCombo.GetSafeHwnd() == NULL)
{
m_ListInCombo.SubclassWindow(pWnd->GetSafeHwnd());
}
}
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
IMM是输入法管理器,IME是输入法。
代码如下: CString msg;
POINT pt, *ppt;
ppt=&pt;
hImc=ImmGetContext(m_com.m_hWnd); //取得输入窗口的上下文
ImmGetStatusWindowPos(hImc, ppt); //取得输入法状态的窗口位置
m_xy.Format("%d, %d", ppt->x, ppt->y);
UpdateData(FALSE);
但无论我把工作窗口移动到哪,取得的都是一个固定的点:2,970;
是不是我哪写的不对啊?
CPoint point;
GetCaretPos(&point);
// ScreenToClient(&point);
// MapWindowPoints(&m_Combo,&point,1);
point.x+=16;
point.y+=32;
HWND hWnd=::WindowFromPoint(point);// no hide window
if((hWnd != 0)&&(hWnd != this->m_hWnd))
{
RECT rc;
::GetWindowRect(hWnd,&rc);
afxDump << rc << " imm\n";
::MoveWindow(hWnd,rc.left,rc.top-((rc.bottom-rc.top)+30),
rc.right-rc.left,rc.bottom-rc.top,TRUE);
}
//不必hImc=ImmGetContext(m_com.m_hWnd);的