Languages C / C++ Controls/ Forms/ Dialogs/ Menus  

An MFC class to implement MFC sub classing

download download  
important code information
author:
PJ Naughter
minimum requirements:
An MFC class to implement MFC sub classing description

MFC class to support sub-classing of any CWnd instance. The problem it fixes is that you cannot have 2 CWnd instances attached to the one HWND at the same time. This becomes a problem when you want to derive one of your classes from 2 base classes which are both derived from CWnd themselves. An example is, suppose you have 2 classes namely CBitmapMenuFrameWnd which is derived from CFrameWnd and implements bitmap menus ALA Office 97 and CReBarFrameWnd which implements command bar menus ALA IE4. When you are implementing your own CMainFrame class you then have the problem that you can only derive from one of these classes and you must copy the source from the other one into your class. This class fixes this problem by subclassing the window before MFC gets to it using a plugin method. The code is based in part on a class developed by Paul DiLascia namely "CSubclassWnd" for the MSJ magazine. The zip file contains the CHookWnd source code and a simple SDI MFC application which demonstrates all the functionality of the class. For further details about the example program have a look at the view.cpp module.


File List:
Doc.cpp1Kb
Doc.h502b
HookWnd.clw2Kb
HookWnd.dsp11Kb
HookWnd.dsw1Kb
HookWnd.rc6Kb
MainFrm.cpp1Kb
MainFrm.h454b
StdAfx.cpp205b
StdAfx.h241b
View.cpp4Kb
app.cpp1Kb
app.h388b
hookwnd.cpp9Kb
hookwnd.gif417b
hookwnd.h2Kb
hookwnd.htm13Kb
res/0b
res/HookWnd.ico1Kb
res/HookWnd.rc2399b
res/HookWndDoc.ico1Kb
resource.h1Kb
view.h1Kb

Similar code
Console Menu Foundation Class (Popularity: ) : This is a console menu foundation class. This allows you to create menus in seconds! Methods include: AddMenu(int ID, char *Name); AddItem(int ID, char *Name, void (*Function)()); Draw(); Run(); ...
Classic Windows application (Popularity: ) : Show you how to manipulate with controls (checkbox,editbox,static text..).
A good class to make any Window (NO MFC) (Popularity: ) : This is a base class to build any window type. Its easy to use and support Dialogs and Windows in the same class. You need create your own class to heredate WindowClass , and you can create a windows with ...
Another Combo Box - No MFC! (Popularity: ) : This code illustrates the use of the combo box control with no MFC.
Screwjack.lsp (Popularity: ) : The Program Screwjack.lsp & its other supporting files Design and Draw the entire Assembly & Detailed drawing as well as its Bill of Material & design parameters as per specified by user in AutoCAD R14,2000,2002.
Color Take (Popularity: ) : This program gets the color of pixels from the desktop, saves the last five selected and copies the color value to the clipboard. It has a zoom window that can be set to 2X, 4X, or 8X.
Colored Controlable Console Menu (Popularity: ) : Use Experience Level required: Beginner! The User can create a colored, controlable Conosol Menu for their programs with it! It's easy! The Colors can be changed inside the Program! All Console Colors are avaible!! The Menu will be created with ...
User reviews

Write a review:
1 2 3 4 5 6 7 8 9 10
1=poor 10=excellent
Write review*
Your name*
Email*
  (Comments are moderated, and will not appear on this site until the editor has approved them)
 
Rate me
supported os
stats
downloads 72
version
size in Kb 18
popularity   2003/7913373
user rating 5/10
ad


New Code
Popular Code