| | |
RichEdit subclassing problem, can't call Default Proc.
![]() |
•
•
Join Date: Jul 2008
Posts: 45
Reputation:
Solved Threads: 1
Hi,
I know how to subclass a RichEdit, and the messages I handle in my procedure work, but I want to know how to call the default procedure that would proccess a non-subclassed RichEdit Control. My problem is that when I subclass it, I want the default Procedure to take care of what my procedure doesn't.
I only handle a context menu and the commands from it, but, I can't use the defaut procedure because I don't know it's name. The RichEdit (RichEdit 3.0) is not doing anything because I can't call the procedure that handles the functionality because I haven't a clue to it's name. The RichEdit doesn't scroll, accept characters, paste, undo, or anything that the default RichEdit procedure should do. How can I go about calling the default procedure?
This is what I have (Not the exact code, just what needs to be seen):
------------------------------------------------------------------------------------------------------------------
;
Can anybody help me out?
I know how to subclass a RichEdit, and the messages I handle in my procedure work, but I want to know how to call the default procedure that would proccess a non-subclassed RichEdit Control. My problem is that when I subclass it, I want the default Procedure to take care of what my procedure doesn't.
I only handle a context menu and the commands from it, but, I can't use the defaut procedure because I don't know it's name. The RichEdit (RichEdit 3.0) is not doing anything because I can't call the procedure that handles the functionality because I haven't a clue to it's name. The RichEdit doesn't scroll, accept characters, paste, undo, or anything that the default RichEdit procedure should do. How can I go about calling the default procedure?
This is what I have (Not the exact code, just what needs to be seen):
------------------------------------------------------------------------------------------------------------------
C++ Syntax (Toggle Plain Text)
// Main Window Procedure switch(message) { case WM_CREATE: { // Declare RichEdit: hRichEdit SetWindowLongPtr(hRichEdit, GWLP_WNDPROC, (LONG_PTR)MyRichEditProc); // This works fine } break; default: return DefWindowProc(hwnd, message, wParam, lParam); // End Message Loop // MyRichEditProc switch(message) { case WM_RBUTTONDOWN: // Show ContextMenu, This works fine break; default: // Here is where I want to call the default RichEdit Procedure, This is where I'm Stuck. } // End Proc
Can anybody help me out?
Last edited by Ancient Dragon; Oct 11th, 2008 at 9:25 am. Reason: add code tags
First call GetWindowLongPtr to get a pointer to its defaultProc then call CallWindowProc() when appropriate. See the GWLP_WNDPROC option.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
![]() |
Other Threads in the C++ Forum
- Previous Thread: binary to decimal
- Next Thread: card game: just need to know why its not compiling...
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ char class classes classified code coding compatible compile console conversion count date delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file filewrite forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper homeworksolutions iamthwee icon if...else ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node object output play pointer problem program programming project python random read recursion reference rpg string strings struct symbol temperature template test text text-file toolkit tree url values variable vector video win32 windows winsock wordfrequency wxwidgets






