 |
|
 |
Hi,
thsis application good working but how could i restrict the usrer from resizing the view. i tried with wm lbutton down and move but it will work only in the case of main window split. the sub view created form the main window will not get the mouse move and mouse down message.
how can i impliment this.
can i have some tips,ideas please?
|
|
|
|
 |
|
 |
Hi I am using this class, but i am not able to fix the size of the 3rd pane using PATTERN_1. I've used the following code also in the class but it only restricts the size of 1st and 2nd pane, I am still able to move the 3rd pane. Can anybody help me.
//Implementation file.
afx_msg UINT CExSplitter3Wnd::OnNcHitTest( CPoint /*point*/ )
{
return HTNOWHERE; // To disable the mouse activity on Splitter
}
Vikram Kashyap
Sr.Software Engineer
R & D Department
TechBooks India
A-193 Okhla Phase - I
New Delhi-110066
|
|
|
|
 |
|
 |
Hi,
Good article...I found it useful..
After splitting the window in 3 sections,
1) I have added a CView view to one of the panes,how to change font of the panes.
2) how to add controls in the panes and change its font and text settings
expecting ur reply
and thanks in advance !!
|
|
|
|
 |
|
 |
To add the controls to the panes you have to add more view class derived from CFormView, which will help you adding controls from the Resource Editor. Changing font size and other text settings will then be applied in a normal way as that for the Dialog based application or SDI application derived from CFormView.
Bye 4 now
Vikram Kashyap
Sr. Software Engineer
R & D Department
TechBooks India Pvt. Ltd.
New Delhi
|
|
|
|
 |
|
 |
Thanks for useful class!;)
|
|
|
|
 |
|
 |
Dear friends, How could I create a splitter window like the following use this article. -------------------------- - - - ---------- - - - - -------------------------- - - - - --------------------------
Please give me any suggestion. Thanks. Eric Lee
|
|
|
|
 |
|
 |
how to show (add) and hide (remove) panes at will at run time ?
|
|
|
|
 |
|
 |
Hi,
Your article is excellent, Thanks!. The application has got only one view(3views merged) displayed by default but what about having different views(windows) to display.i.e,
For example,
I've got a view(not splitted,actually a Dialog) to display by defualt when the application is executed. And
views(splitted, actually your Example)to be displayed when the button is pressed from the Dialog.
It is an MDI application, can i have some tips,ideas please?
regards,
mohan
|
|
|
|
 |
|
 |
Which acess a method of VIEW diferent...
view1::onButton(){
view2::print() -- ???
}
view2::print(){
AfxMessageBox("i dont speak english!!\n I am Brasilian");
}
Tiago Frazão / sMIL0n
|
|
|
|
 |
|
 |
I like wrapper class like this. I wanna be a developer even not coder. This kind of wrappers will help every programmers to be developer Thanx.;)
|
|
|
|
 |
|
 |
Hi,
Hint:
------
How to Transfer datas between different views In Splitter Window.
Desc:
-------
I dont know how to transfer data from one view to another in Splitter Window.
I have created three views in the splitter window as shown in the (pattern 6)
Here first and last view calsses are CMyListView which was derived from CListCtrl( It has customized like Grid).
And the Second view class is CMyView which is derived from CView ( It is used to draw lines )
NEED:
-------
I need to get Coordinate point when i clicked mouse button on the listView(first view) and i have to use that point in Second View(to draw lines)
PROBLEMS :
------------
i got datas in CMyListView but i dont know how to transfer these data to CMyView (Second view)
Since i have pass those class names only as CRuntimeClass* in "CreateView()" , I could not get the object of one view in another view
thanks
by
senthilkumar
hai all
|
|
|
|
 |
|
 |
you should store your data in the Document class.
then the views should call something like GetDocument() where you can then get all the data you need.
|
|
|
|
 |
|
 |
I want to switch views in the third pan dynamically. I would very much appreicate it if you could provide information about this.
Julia
|
|
|
|
 |
|
 |
Is it possible to have either nested splitting frames, or else just a multiplicity of frames in view at once(perhaps 20+)? And can frames be defined with curved boundaries, acute or obtuse boundaries, custom borders, etc... Could one say run video through one thread to the corresponding sub-frame, text to another,a paint program in yet another frame, and so on and so on?
S.E.McKelvy
|
|
|
|
 |
|
 |
You could try Zoran Todorovics VisualFX which provides a more flexible way to add views to a Frame:
http://www.scasoftware.com/Articles/Gui/VisualFx/VisualFx.htm
John Curtis.
Software guy.
Fatlab Software.
|
|
|
|
 |
|
 |
I prefer to go the old way and create two spliter,
one inside the other.
Using this class i am limited to 3 panes.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
 |
|
 |
Well, Duh!!!! Hey, no one is forcing you to use this. This is NOT a replacement for CSplitterWnd. If you need more panes, you CAN'T use it. I don't know the author, but I think the intent is to simplify coding a very common layout.
|
|
|
|
 |
|
 |
You can do all of these stuff with a normal splitter wnd. First two columns, then create another splitter that has two rows in the second splitter wnd.
|
|
|
|
 |
|
 |
you are right,but the idea is to "wrap" it up,
so you can awitch easily , i've developed it for a co-worker
who needed dynamic layout according to the data , and it was usefull
|
|
|
|
 |
|
 |
Ran,
These guys don't understand the concept of wrappers or code reuse. I think they like the old cut-and-paste. Check out DataCrime's (or was that Da-duh-Crime) post above and my response. I think it's crime for these guys to call themselves coders.
|
|
|
|
 |
|
 |
You are right. All the people who are only capable of copying and pasting the code, will never understand the advantage of framework, as they need to put little code in order to use it. Simple copy paste will not work with frameworks.
|
|
|
|
 |
|
 |
For those that don't want to re-use this example :
To create a 3 split pane SDI like this :
###########
#..#..............#
#..#..............#
#..#########
#..#..............#
###########
Add to MainFrm.h :
protected:
CSplitterWnd m_SplitterFirst;
CSplitterWnd m_SplitterSeconde;
Add with class wizard the methode OnCreateClient to the CMainFrame.
In that methode, replace :
return CFrameWnd::OnCreateClient(lpcs, pContext);
with :
CRuntimeClass* pClass = RUNTIME_CLASS( CProjectNameView );
// create different views if necessary...
m_SplitterFirst.CreateStatic(this,1,2);
m_SplitterFirst.CreateView(0,0,pClass, CSize(200, 200), pContext);
m_SplitterSeconde.CreateStatic(&m_SplitterFirst, 2, 1, WS_CHILD | WS_VISIBLE | WS_BORDER,
m_SplitterFirst.IdFromRowCol(0, 1));
m_SplitterSeconde.CreateView(0,0,pClass,CSize(200, 200),pContext);
m_SplitterSeconde.CreateView(1,0,pClass,CSize(200, 200),pContext);
return TRUE;
Add to MainFrm.cpp :
#include "ProjectNameView.h"
Add to ProjectNameView.h :
#include "ProjectNameDoc.h"
PS : I'm not the Anonymous guy that posted the first message.
PPS : Thank you for this article by the way.
|
|
|
|
 |
|
|
 |
|
 |
How very helpful, NOT! if think you found a problem, why not tell us where it is? Better yet, tell us the solution? Or did VC tell you there is a memory leak, and you have no clue on how to find it??
|
|
|
|
 |
|
 |
Think I found how to stop the mem-leak:
Put this in the destructor:
CExSplitter3Wnd::~CExSplitter3Wnd()
{
m_pwndSplitter->DestroyWindow();
if (m_pwndSplitter!=NULL)
delete m_pwndSplitter;
// CSplitterWnd::~CSplitterWnd();
}
and
if (m_pwndSplitter!=NULL)
{
m_pwndSplitter->DestroyWindow();
delete m_pwndSplitter;
m_pwndSplitter=NULL;
}
in every SetPattern class
Finally, put
if (m_pTopWndSplitter!=NULL)
{
delete m_pTopWndSplitter;
m_pTopWndSplitter=NULL;
}
in the mainframe destructor AND in the oncreateclient class.
Hope it will work for everybody, Lio.
ps: hey, anonymous, you're right, not everybody can call themselve coders,
but chill out man ;-|
to everybody: smoke weed, take XTC, make love and have fun...
Oh yeah, do some coding too, peace.
|
|
|
|
 |