为什么我切分完窗口之后 pDC->TextOut就不能显示字符串了啊? 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void CCarViewView::OnDraw(CDC* pDC){ CCarViewDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); pDC->TextOut(20,20,"fdsfds"); // TODO: add draw code for native data here}BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { // TODO: Add your specialized code here and/or call the base class if (!m_wndSplitter.CreateStatic(this, 1, 2)) return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(250, 100), pContext) || !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CCarViewView), CSize(100, 100), pContext)) { m_wndSplitter.DestroyWindow(); return FALSE; } return TRUE;} 刚才试了一个,可以显示的,我觉得原因可能是,因为有两个CView类(左右窗口各一),你的OnDraw()函数是在其中一个定义的,另一个没有定义。 BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) { // TODO: Add your specialized code here and/or call the base class if (!m_wndSplitter.CreateStatic(this, 1, 2)) return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(250, 100), pContext) || !m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CCarViewView), CSize(100, 100), pContext)) { m_wndSplitter.DestroyWindow(); return FALSE; } m_wndSplitter.GetPane(0,0)->SetWindowText(TEXT("..."))//用这个代码显示文字 return TRUE;} openGL画图停顿 Opengl读取3DS文件重现模型的问题 小弟第一次写Access数据库程序,遇到了点小麻烦 散分 - No.1 下载了MYIE的源程序,在release下有错误,注释后可以通过,但在debug下编译能过,但不能执行,大家有什么办法? 怎么把汉字翻译成拼音啊 请问:在proxy/stub(ATL)中,使用nmake 编连 *.mk文件中,总是不成功 请问那位大吓知道那有编译、打包ASP程序的工具! 敢问如何给FormView的窗口设置背景图案?给点儿提示就成。。。 一个弱问题 菜鸟提问:com中包容,聚合 和继承之间的联系和区别 怎么实现互斥机制?
{
CCarViewDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDC->TextOut(20,20,"fdsfds");
// TODO: add draw code for native data here
}BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(250, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CCarViewView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
} return TRUE;}
{
// TODO: Add your specialized code here and/or call the base class
if (!m_wndSplitter.CreateStatic(this, 1, 2))
return FALSE; if (!m_wndSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(250, 100), pContext) ||
!m_wndSplitter.CreateView(0, 1, RUNTIME_CLASS(CCarViewView), CSize(100, 100), pContext))
{
m_wndSplitter.DestroyWindow();
return FALSE;
}
m_wndSplitter.GetPane(0,0)->SetWindowText(TEXT("..."))//用这个代码显示文字
return TRUE;
}