Prev: Posting 60 messages per second to CView locks up UI (animation continues...)
Next: Turning on ClearType for TextOut() ???
From: Peter Olcott on 19 Mar 2010 12:59
"Joseph M. Newcomer" <newcomer(a)flounder.com> wrote in
>I agree. I have many slide disbributed through my Systems
>Programming course, which cover
> what happens when the Win32 API meets MFC, and it is not
> not always obvious what happens
> unless you understand both the API and MFC. And not at a
> superficial level.
> You can't really understand MFC unless you understand the
> concept of handle maps and
> temporary objects. Yes, I successfully worked in it for
> two years before I got the deep
> insights, but I found that they were critical to my future
> success. Now I teach how to
> use both STL and MFC collections at the interfaces.
> On Fri, 19 Mar 2010 03:39:55 -0700 (PDT), Goran
> <goran.pusic(a)gmail.com> wrote:
>>On Mar 18, 7:43 pm, "Peter Olcott" <NoS...(a)OCR4Screen.com>
>>> Since I have no idea what an HFONT is (other than a
>>> to a font) or how it works, knowing this does not help.
>>> Learning MFC programming in terms of Win32 programming
>>> works if you know Win32 programming.
>>That's a silly thing to say, and thinking that way won't
>>get you far
>>MFC really is a rather thin layer over Win32. That
>>much how it's made and what it does. And indeed, if you
>>look at docs
>>for MFC, there is often corresponding Win32 function link
>>at the end,
>>and doc for it is pretty much the same then.
>>For example, you work with LOGFONT. That has nothing to do
>>and all to do with Win32. So you in fact do Win32, not
>>programming, when you handle it. Your trouble here with
>>stuff into DC stems from poorly understanding both Win32
>>and MFC in
>>that area. What's worse, your "functional requirements"
>>around are wrong because of that.
>>You just shouldn't be doing this. There's no abstraction
>>leak (see http://en.wikipedia.org/wiki/Leaky_abstraction),
>>and MFC is
>>indeed an abstraction that leaks a lot, probably more than
>>it has to.
>>If you want stronger abstractions, use a better framework.
I will be porting my system without the need of a framework.
As long as LibPNG does not leak, I should be good to go.
> Joseph M. Newcomer [MVP]
> email: newcomer(a)flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm