Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!zaphod.mps.ohio-state.edu!wuarchive!cec2!news From: dave@wucs1.wustl.edu (David T Mitchell III) Newsgroups: comp.windows.ms.programmer Subject: Custom Controls Message-ID: <1991Jan21.023735.26177@cec1.wustl.edu> Date: 21 Jan 91 02:37:35 GMT Sender: news@cec1.wustl.edu (USENET News System) Organization: Washington University, St. Louis MO Lines: 22 [ Anybody willing to send me (or post) one of their custom controls? A comlete example would be really useful. ] Either way, can anyone answer these two questions? 1. Handling a WM_SETTEXT should set the control's text pointer to (LPSTR)lParam. Looking at DefWindowProc included in the SDK, they do a call to DefSetText which I assume does this. WM_GETTEXT returns a copy of hwnd->hName. My question is, how does my custom control get access (read and write) to hName, the control's text pointer? 2. General question: Is there some way I can use subclassing to trap messages of normal controls? In other words, can I create a new class and end it with a CallWindowProc to a standard class' window proc? (Example: Create a windowclass with a cross cursor, check for WM_RBUTTONDOWN, and otherwise handle everything as if it were a "static" control). I've tried several times, but keep getting unrecov app errs. thanks, dave dave@wucs1.wustl.edu