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 9:16am
Koolski1.3K
Edited 5-May-11 9: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)

  Print Answers RSS
0 OriginalGriff 278
1 Maciej Los 205
2 DamithSL 193
3 Nguyen.H.H.Dang 190
4 arvind mepani 187


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