1.vcç»å¾å
2.mfc单文档删除掉自动生成的单文档源mene后出现创建空文档失败
vcç»å¾å
åªè½æä¾ä¸é¨å代ç ï¼é¦å ï¼å建ä¸ä¸ªMFCâåææ¡£âçé¢ãå ¶ä»è®¾ç½®é»è®¤å³å¯ãååå设æ¯MyDrawã
æ¾å°CMyDrawViewéé¢çOnDrawå½æ°ãå¦æåæ°pDC被注éæï¼åå»æ注éã
å½æ°åå为ï¼CMyDrawView::OnDraw( CDC * pDC )
å¨â// TODO: å¨æ¤å¤ä¸ºæ¬æºæ°æ®æ·»å ç»å¶ä»£ç âä¹åæ·»å ä¸å代ç
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
ä¸è¿°ä»£ç å·²ç»å¨VSä¸éè¿ããç»çæ¯ä¸ä¸ªæ¡åã
mfc单文档删除掉自动生成的mene后出现创建空文档失败
在App的InitInstance()中,建立文档时需要资源:IDR_MAINFRAME
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,码线176传奇源码//这里包含多个资源的ID,你看看工程同名的文档搜龟网源码
...);
AddDocTemplate(pDocTemplate);
具体的你可以自己挖源码看
你要去掉菜单可以在下面使用
m_pMainWnd->SetMenu(NULL);或者取得框架指针AfxGetMainFrame()->SetMenu(NULL);
2024-12-22 13:51
2024-12-22 13:02
2024-12-22 12:49
2024-12-22 12:45
2024-12-22 12:32
2024-12-22 12:16