Click here to Skip to main content
16,008,075 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: standalone CHeaderCtrl: how to make text non-bold? Pin
ckorda5-Dec-03 4:45
ckorda5-Dec-03 4:45 
Answerthis is how to make a CHeaderCtrl non-bold (1 line) Pin
ckorda5-Dec-03 9:41
ckorda5-Dec-03 9:41 
GeneralLoading all the Icons name from the local or remote directory into a combo box Pin
Ravindran4-Dec-03 22:29
Ravindran4-Dec-03 22:29 
GeneralRe: Loading all the Icons name from the local or remote directory into a combo box Pin
фил5-Dec-03 3:44
фил5-Dec-03 3:44 
GeneralDisplay bmp file in windows Pin
suneetchandok4-Dec-03 22:08
susssuneetchandok4-Dec-03 22:08 
GeneralRe: Display bmp file in windows Pin
Monty25-Dec-03 1:49
Monty25-Dec-03 1:49 
GeneralObject-oriented design in a pure Win32 application Pin
Rickard Andersson204-Dec-03 21:57
Rickard Andersson204-Dec-03 21:57 
GeneralRe: Object-oriented design in a pure Win32 application Pin
Johann Gerell4-Dec-03 22:17
Johann Gerell4-Dec-03 22:17 
I presume what you mean is actually

"How do I encapsulate the HWND in a C++ class and make a proper class hierarchy?"

Otherwise stop read here.

How you design the hierarchy depends on your own ability to design - if you have done it in another area, then you can do here also.

The tricky part encapsulating the HWND and maintaining window procedures is to associate a class instance with a particular physical window, i.e., HWND with this. This can be done in many ways: ATL/WTL uses thunking and MFC a hash map, but it can be as simple as stashing the this pointer in the userdata section of the window with ::SetWindowLong() or setting this as a window property with ::SetProp() or even using a global variable (but that would not get us very far...)

I would, however, recommend WTL.

--
Human beings, who are almost unique in having the ability
to learn from the experience of others, are also remarkable
for their apparent disinclination to do so. (Douglas Adams)

GeneralRe: Object-oriented design in a pure Win32 application Pin
Michael P Butler5-Dec-03 2:37
Michael P Butler5-Dec-03 2:37 
QuestionMFC-Dialog based: Is ther something like "OnShow" ?? Pin
bjolletts4-Dec-03 21:57
bjolletts4-Dec-03 21:57 
AnswerRe: MFC-Dialog based: Is ther something like "OnShow" ?? Pin
forjer5-Dec-03 2:49
forjer5-Dec-03 2:49 
GeneralApplication/MFC C++ with graphics interaction Pin
Dennis_lyb4-Dec-03 21:41
Dennis_lyb4-Dec-03 21:41 
GeneralCFileDialog save as Pin
letymau4-Dec-03 20:57
letymau4-Dec-03 20:57 
GeneralRe: CFileDialog save as Pin
Mike Dimmick4-Dec-03 23:47
Mike Dimmick4-Dec-03 23:47 
GeneralRe: CFileDialog save as Pin
letymau5-Dec-03 1:59
letymau5-Dec-03 1:59 
Generalto change drawing size of SDI formview Pin
coda_x4-Dec-03 20:45
coda_x4-Dec-03 20:45 
GeneralUuidCreateSequential() does not work Pin
Smita Duraphe4-Dec-03 20:03
Smita Duraphe4-Dec-03 20:03 
GeneralRe: UuidCreateSequential() does not work Pin
Mike Dimmick4-Dec-03 23:53
Mike Dimmick4-Dec-03 23:53 
QuestionAnyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
badsocvol4-Dec-03 18:03
sussbadsocvol4-Dec-03 18:03 
AnswerRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
Prakash Nadar4-Dec-03 18:59
Prakash Nadar4-Dec-03 18:59 
AnswerRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
фил4-Dec-03 21:05
фил4-Dec-03 21:05 
AnswerRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
Abebe4-Dec-03 21:24
Abebe4-Dec-03 21:24 
AnswerRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
Roger Wright4-Dec-03 22:10
professionalRoger Wright4-Dec-03 22:10 
GeneralRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
KaЯl5-Dec-03 2:04
KaЯl5-Dec-03 2:04 
GeneralRe: Anyone here want to earn some money by writing a few small programs fhat i need for my introductary C++ class? Pin
Roger Wright5-Dec-03 4:58
professionalRoger Wright5-Dec-03 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.