communication between different views and WM_CHAR handling
Hello
I had send previous posts related to bits or parts of my project. Well adding one more bit/ query to get solution from you experts..
My application is SDI - Multiview application
On UI there are three views seperated by Splitter windows in three rows.
1.0 View is my Class view
2.0 CListView
3.0 CEditview
My problem is
1.0 To get the TEXT entered in CEditView i.e. thirdview at bottom in my window ,, after user press OK and then make the content of CEditView as blank/clear.
2.0 Can i restrict no. of lines of text to be entered in ceditview to be "1"
3.0 Once user enters text in Ceditview and press Enter, the same text has to be appended to my Clistview
4.0 And in addition to step 3.0 I must be able to notify my main view i.e. View no. 1 that some command has been entered. So that my main view (no. 1) can be updated.
Re: communication between different views and WM_CHAR handling
2.0 Can i restrict no. of lines of text to be entered in ceditview to be "1"
Why not make the view a FormView and add an edit box without the multiline capability?
3.0 Once user enters text in Ceditview and press Enter, the same text has to be appended to my Clistview
In the Enter message handler I'd store the data in the Document. Then I'd call UpdateAllViews. In the Clistview I'd handle the OnUpdate(?) message where I'd then get the data from the document and display it (or do whatever with it).
I know how to build. What to build is a completely different story.
Re: communication between different views and WM_CHAR handling
Well, this is higher level of customization; question for a 1000 points.
How splitter knows that cursor is over splitter bar?
It has HitTest function that check where cursor hit.
It is even virtual; therefore the solution is to override HitTest.
For this I have derived new class from CSplitterWnd and did just that, fooling splitter into thinking that hit is nowhere when cursor is over first row.
Attached is modified sample.
There are only 10 types of people in the world: Those who understand binary and those who do not.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.