各位大侠:请指教..如题,代码如下:
CDateTimeCtrl m_date;
m_date.Create(WS_CHILD| DTS_SHORTDATEFORMAT| WS_TABSTOP|WS_VISIBLE , CRect(0, 0, 0, 0),  this, 1006);
然后,
long lRow=m_FlexGrid.get_RowSel();
long lCol=m_FlexGrid.get_ColSel();

CRect rect;
m_FlexGrid.GetWindowRect(rect);
ScreenToClient(rect);
CDC *pDC2=GetDC(); int nTwipsPerDotX=1440/pDC2->GetDeviceCaps(LOGPIXELSX);
int nTwipsPerDotY=1440/pDC2->GetDeviceCaps(LOGPIXELSY);

long y=m_FlexGrid.get_RowPos(lRow)/nTwipsPerDotY;
long x=m_FlexGrid.get_ColPos(lCol)/nTwipsPerDotX; long width=m_FlexGrid.get_ColWidth(lCol)/nTwipsPerDotX+1;
long height=m_FlexGrid.get_RowHeight(lRow)/nTwipsPerDotY+1;
CRect rc(x,y,x+width,y+height);
rc.OffsetRect(rect.left+1,rect.top+1);CWnd *p_wnd
p_wnd=&m_date;
p_wnd->MoveWindow(rc);最后我测试时,这个日期控件可以在当前点击格显示;可是当我点击日期控件右边的下拉箭头时,总是不能下拉出一个日期列表.请各位高手多指教,最好能提供代码.