- #1
- 10,303
- 1,474
Are there any good sites for MFC programming help? (THat's Microsoft Foundation Classes - C++ version 6.0 to be specific).
In case anyone here can help:
I'm trying to find the width of a MFC CView window, so I can do line-breaking in the ondraw() function, so that my displayed text lines fit the window.
Unfortunately taking the device context pointer pDC and evaulating pDC->GetWindowExtent() gives me a size of 1,1. Since I was in the default mode MM_TEXT, I thought I should get a window size in pixels. I don't know if I'm using the wrong function, or have set anything up wrong in the window (but most everything about the window the APPwizard default for SDI (single document) application).
In case anyone here can help:
I'm trying to find the width of a MFC CView window, so I can do line-breaking in the ondraw() function, so that my displayed text lines fit the window.
Unfortunately taking the device context pointer pDC and evaulating pDC->GetWindowExtent() gives me a size of 1,1. Since I was in the default mode MM_TEXT, I thought I should get a window size in pixels. I don't know if I'm using the wrong function, or have set anything up wrong in the window (but most everything about the window the APPwizard default for SDI (single document) application).