Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
I'd like to create a CWnd object that gets keyboard and mouse input, but I don't want to use the WNDCLASS of "EDIT" because this won't always be an edit. I want it to be owner draw.
    // Something like this, but don't want to use "EDIT"
    CRect Pos(50,200,200,220);
    MyWnd.Create(_T("EDIT"),_T("MyInputWnd),WS_CHILD | WS_VISIBLE, Pos, this,1);
 
AfxRegisterClass() seems pretty complicated (am I wrong?), but is this the only way to do this?
 
Any ideas? Better yet any code snippets?
 
Thanks in advance.
Posted 5-May-11 10:16am
Koolski1.4K
Edited 5-May-11 10:37am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It really is not that complicated. Here is an editor based on CWnd: CUltraPadWnd - A Simple Syntax Coloring Control Based on the MFC CWnd Class[^]
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.150301.1 | Last Updated 5 May 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100