-
August 4th, 2013, 12:32 PM
#1
edit control inside an edit control
I saw something that I'm trying to duplicate and I'm not sure how they did it. In a older application, Microsoft Mail 5.0, they embedded three edit controls into a multiline edit (MLE). At first, I thought MFC and a CDialogBar but given the date of the application (it carries an NE signature) it would be at best VC++ 2.0 and MFC 3.0 and I don't think the CDialogBar existed yet. Plus, going through the .EXE, it doesn't look like it links in a MFC*.DLL but it does use some vform.dll that I'm guessing is Visual Basic. So in short, it looks to be written in C/C++ with subclassing is my estimate but I could be wrong.
The app looks like this at start up:
But as stuff is entered, the single line edits move up and scroll with the MLE or the user can tab back to the single edits like this:
My edits either sit on top of the MLE and aren't part of it or when the MLE gets the focus, the cursor and whatever is being typed, is initially hidden by the "To" "Subject" and "Cc" controls. I've been making changes to the .RC and DialogProc but it not behaving as it should. Any ideas how they did this ?
René
-
August 5th, 2013, 01:43 PM
#2
Re: edit control inside an edit control
Originally Posted by René Vecchi
I saw something that I'm trying to duplicate and I'm not sure how they did it. In a older application, Microsoft Mail 5.0, they embedded three edit controls into a multiline edit (MLE). At first, I thought MFC and a CDialogBar but given the date of the application (it carries an NE signature) it would be at best VC++ 2.0 and MFC 3.0 and I don't think the CDialogBar existed yet. Plus, going through the .EXE, it doesn't look like it links in a MFC*.DLL but it does use some vform.dll that I'm guessing is Visual Basic. So in short, it looks to be written in C/C++ with subclassing is my estimate but I could be wrong.
Did you try to use Spy++ to detect the window class of those controls?
Victor Nijegorodov
-
August 5th, 2013, 03:24 PM
#3
Re: edit control inside an edit control
Originally Posted by René Vecchi
... they embedded three edit controls into a multiline edit (MLE)...
I think that all four of these edit controls are siblings (children of another window).
Vlad - MS MVP [2007 - 2012] - www.FeinSoftware.com
Convenience and productivity tools for Microsoft Visual Studio:
FeinWindows - replacement windows manager for Visual Studio, and more...
-
August 6th, 2013, 06:40 AM
#4
Re: edit control inside an edit control
I'll investigate VictorN's idea of Spy++ and see what class info there is. Also Vladimir's suggestion that they are WS_CHILD windows. Thinking about the application, it's more like when you write a toolbar form scratch and place it on the main window: it stays with the main window but it has its own WndProc(). And where the toolbar has child controls of PUSHBUTTON, the dialog here substitutes edit controls for the buttons. I'm not sure if the MLE will be the parent or if its a sibling ... but I'll see how it behaves when coded.
René
-
August 9th, 2013, 10:49 AM
#5
Re: edit control inside an edit control
The results from Spy++. These correspond to the the JPG above:
window E94 size 17 x 404 "Scrollbar"
window E94 size 509 x 402 message area
window E98 size 398 x 22 edit control
window E9C size 398 x 22 edit control
window EA0 size 398 x 22 edit control
window EA4 size 509 x 309 MLE
From the chart hierarchy, I assume that the message area (E94) is a
parent to four siblings: the three single line edit controls ("To"
"Cc" and "Subject") and the multi-line edit EA4. The message area is
in turn a sibling to the overall dialog "Send Note".
This makes sense, but what is odd is that the "Scrollbar" isn't also
a sibling of the message area but is instead under control of the
dialog. This seems to me that the scrollbar messages are passed down
to the message area (window E94) which does a ScrollWindow() or
ScrollDC() and moves up or down all four of its siblings.
I'll see what kind of code I can hack out to follow up on this idea
René
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|