mfctlist.txt

来自「一个进程管理的源程序.zip」· 文本 代码 · 共 33 行

TXT
33
字号

This sample provides an MFC (and C++!) conversion of the SDK's TLIST
sample. The sample has a couple of flaws:

First, it's not a very good C++ design. It would be good to put some
smarts into the CTaskListEntry class so that there were less global
functions. Instead, I pretty much stole the SDK sample's COMMON.C
function wholesale. I didn't even give CTaskListEntry a real constructor.

Second, the code is a miserable mismatch beteween the half-baked coding
styles used in the SDK samples (eg, goofy indenting, flowerbox comments,
inconsistent Hungarian usage) and MFC coding conventions (as written by my
own bad self and the AppWizard).

The sample has some benefits:

First, it works around a couple of bugs in the SDK smaple.

Second, rebuilding with MFC turned STRICT on, and that noticed a few bad
typecast which the sample did indiscriminantly. They weren't a big deal,
but they are fixed in this version.

The conversion uses a CTypedPtrArray to hold the list. This is a vast
improvement over the fixed-length array that the original TLIST sample
used.

This sample was provided by me, Mike Blaszczak (mikeblas@nwlink.com). It's
not intended for redistribution outside of my own website, and there's no
warranty about the fitness or quality of the sample for any purpose
whatsoever. The sample is not supported by Microsoft.


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?