开发者

How to print string C++ mfc

开发者 https://www.devze.com 2022-12-20 16:49 出处:网络
I开发者_开发问答 created project using VS2008 wizard SDI > CView How can i print some text from Cstring to my main window CView

I开发者_开发问答 created project using VS2008 wizard SDI > CView How can i print some text from Cstring to my main window CView

for example in dialog window with list box i use smth like this m_ListBox1.AddString((LPCTSTR)s);


To print it in the view (without any controls or anything like that), you can use something like pDC->Textout() or pDC->DrawText() inside your view class' OnDraw() function. Note that by default the pDC parameter has its name commented out -- you'll need to un-comment it before you can use it.

0

精彩评论

暂无评论...
验证码 换一张
取 消