I have a Multiple Document Interface app with an edit control within one of the documents and I want it to have it's own msg procedure. How would I do this with a MDI? I'm new to the Win API so if anyone can help, that would be good.
I have a Multiple Document Interface app with an edit control within one of the documents and I want it to have it's own msg procedure. How would I do this with a MDI? I'm new to the Win API so if anyone can help, that would be good.
i think it is the same as an SDI, similar procedures.
If you dont know how to use an MSG box then here is the solution:
AfxMessageBox("string goes here");
make sure StdAfx.h is include in the .cpp file.
tudehopet uses Borland Compiler 5.5
and Visual C++ 6.
It is'nt. I've tried.i think it is the same as an SDI, similar procedures.Why did you tell me that?If you dont know how to use an MSG box then here is the solution:
AfxMessageBox("string goes here");
make sure StdAfx.h is include in the .cpp file.
WNDPROC OldEditProc;
LRESULT CALLBACK NewEditProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {
switch (message) {
...
}
return CallWindowProc (OldEditProc, hWnd, message, wParam, lParam);
}
hWndEdit = GetDlgItem (/* MDI child window handle */, /* Edit window ID */);
OldEditProc = (WNDPROC) SetWindowLong (hWndEdit, GWL_WNDPROC, (LONG) NewEditProc);
Or register a seperate WNDCLASS for each child of the frame and set a different winproc in the struct.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill