|
Seems like defining the splitters in the correct order should do it.
Split the main frame into s1 and s2 vertically
--------------
|s1 | s2
| |
| |
| |
| |
| |
| |
--------------
Split s2 into s3 and s4 horizontally
--------------
|s1 | s2
| |
| | s3
| |---------
| | s4
| |
| |
--------------
Split s3 into s5 and s6 vertically
--------------
|s1 | s2 | s2
| | s3 | s3
| | s5 | s6
| |---------
| | s2
| | s4
| |
--------------
split s4 into s6 and s7 vertically
--------------
|s1 | s2 | s2
| | s3 | s3
| | s5 | s6
| |---------
| | s2 | s2
| | s4 | s4
| | s7 | s8
--------------
So An outline view clarifies the nesting of the splitters
s1
s2
s3
s5
s6
s4
s7
s8
Hope this helps,
Bill
|
|
|
|
|
Hi Bill,
Thanks for your response. Yes, I think this would work for splitter windows but will it work for Docking windows as well? I wanted to use docking windows so that the user could move the windows around if they like or make them go away all together.
Thanks again for your help,
Craig
|
|
|
|
|
Sometimes a picture is worth a 1000 words. In this case, I was so busy looking at the picture, I missed the word "docking".
I'm not especially experienced with docking windows. But I would think, if you have the scheme you showed working, this one should work also. It should be a simple re-arrangement of the calls.
|
|
|
|
|
Sometimes a picture is worth a 1000 words. In this case, I was so busy looking at the picture, I missed the word "docking".
If you have the scheme you showed working, this one should work also. I'm not especially experienced with docking windows.
Good luck,
Bill
|
|
|
|
|
I need a Instant Messenger type control that allows different entries (word-wrapped lines) to be in different colours.
I thought about extending CEdit, but couldn't work ou t how to have different colours for different lines
Any suggestions on the best approach to code my own or has anyone done it already?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
What about RichEdit Control ?
See: RichEdit.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Sometimes you just look too hard!
After tearing my hair out and then finally finding the fact that I needed to call AfxInitRichEdit() I have got a rich edit to partly work.
My question now is: What is the best way to programmatically add text to a rich edit control?
The user doesn't actually edit text into the control directly (it's a messenger type window) so I have used a CString member variable for the Rich Edit Control and then just done a += on that variable to extend the text and then called UpdateData(FALSE). In between I have tried using SetDefaultCharFormat and SetSelectionCharFormat to change the colour, but it's always black. So where am I going wrong?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Hello all,
I need to split/unsplit the main window in a SDI app using a menu command. I have the splitter window set up in the OnCreateClient function so that it checks a bool flag to decide whether to split or not to split, but I cant figure out how to recall the OnCreateClient function after changing the flag so that it will redraw the desired state.
Any suggestions?
Thanx
I miss the beach!
|
|
|
|
|
Another question that may help me, who calls OnCreateClient, when is it called, and how do I call it?
Landlocked in Atlanta . . .
I miss the beach!
|
|
|
|
|
Hi,
Don't know enough about splitters to really help, but I think chasing the route of 'recalling OnCreateClient' is the wrong way to go. I think MFC calls this to divide the available client area of a frame window up before creation (then it knows how to create the relevant views).
I made a class that could replace views, and it could split an existing view, so I would have thought it was possible to do the opposite.
I am probably wrong, but maybe try:
1. splitting the main window into 1 (sound stupid, but then you have a splitter created and attached to the frame window)
2. divide the main splitter pane up when splitting
3. replace the main splitter pane with just the single view when unsplitting.
This would be how I would approach the problem, though I admit it seems completely unelegant.
Sorry I couldn't be of more help,
Simon
|
|
|
|
|
hi all,
A little background...
My app processes data received on a serial port and creates a graph based on the data received. I do all processing and thread creation (to do the processing) in the Doc class. The Doc class also captures the message sent when the Start button is clicked. I do this because I need to change the views depending on how the user wants to see the data displayed, so a way to keep the threads from getting destroyed when the view changes is to put them in the Doc class (maybe not best solution, but I'm no guru either Anyway, when the start button is clicked I set a bunch of Timers in the Doc class, but the Timer gets used in the View class for updating a graph.
However, the timers are being set, but the view is not updating. I guess the view is not receiving the timers adn thus doesn't even know they have been set. How can I overcome this??
Thanks
-MDP
|
|
|
|
|
Check UpdateAllViews .
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
No good for my purposes.
The updating of the view is not dependant on the data (ie. the update needs to occur even if the data has not changed).
|
|
|
|
|
I don't see why not..
When the user click the Start button call UpdateAllViews, this way you get rid of the timers and all the views are notified
or
If you need to set the timers cause you want to update the views periodically, then set the timers on views, not the Document.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
The only purpose of the timers is to refresh the views every so often then. In that case, you might as well set the timer in the view itself, probably start it in OnInitialUpdate() and kill it in OnDestroy() . This way, OnTimer() in the view will get called and you can perform the refresh. If the update frequency needs to be adjusted by the document, you can provide a public member function in the view to achieve this.
And if words were wisdom, I'd be talking even more. The Offspring, I Choose
|
|
|
|
|
c:\windows\desktop\project3\linkedlist.h(147) : error C2676: binary '==' : 'class Partition' does not define this operator or a conversion to a type acceptable to the predefined operator
C:\Windows\Desktop\Project3\Partition.cpp(188) : while compiling class-template member function 'class Partition &__thiscall LinkedList<class partition="">::find(class Partition &)'
Error executing cl.exe.
HERE IS SOME CODE:
void main()
{
Partition* tempPartition;
MemoryManager* tempManager = new MemoryManager();
LinkedList<partition> L;
bool firstInputLine = true;
int processNumber;
int memoryDesired;
cout << "------------------------------------------" << endl;
cout << "PROCESSING " << endl;
cout << "------------------------------------------" << endl;
do
{
cin>> processNumber >> memoryDesired;
if (firstInputLine)
{
if (memoryDesired <= tempManager->memoryLimit)
{
tempPartition = new Partition(0, memoryDesired-1, false, processNumber);
L.insertAt(*tempPartition, 0);
tempManager->addProcess(*tempPartition, 0);
firstInputLine = false;
}
else
cout <<" THIS PROCESS NEEDS MORE MEMORY THAN WHAT I GOT.";
<\pre>
When i click on that error it takes me to the LinkedList template class
I'm very confused. thanks for unconfusing me.
:confused:
|
|
|
|
|
Compiler Error C2676
binary 'operator' : 'type' does not define this operator or a conversion to a type acceptable to the predefined operator
The specified operator could not be used in its predefined form. To use the operator you must overload it for the apropriate type, or define a conversion to a type for which the operator is defined. If you’ve encountered this error on code which compiled with an earlier version of Visual C++, please read Technote: Improved Conformance to ANSI C++ for more information.
The following is an example of this error:
class C
{
public:
C();
} c;
class D
{
public:
D();
D operator <<( C& );
} d;
void main()
{
d >> c; // error
d << c; // OK, operator << defined
}
--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
1. This is not the code that is causing the problem. The error is found on the line you are shown when you double click on the error message.
2. The reason you get the error is that == is not a defined operation for one or both of the things you are comparing.
e,g,
CString s1, s2;
if (s1 == s2) ...
this works because the CString class has a method named == that performs the comparison. The compiler doesn't know what to do in your case. Basically you need to tell it how to compare two objects of your class.
Look at the CString class definition for hints on how to do this.
|
|
|
|
|
Help me. !I have an exercise:
Build an Active X that allow communicate with COM Ports:
-Allow user choosing port (COM1, COM2, COM3, COM4)
-Allow setting parameters: speed, parity, data bit, stop bit…
-Have methods: Open, Close, Flush ports
-Have method: Send & Receive data (char or string) through ports
-Allow setting time for end of transfer data (time-out transfer)
-Allow setting time for testing port (loop-back tested time)
-Auto enabled when there's an event from ports.
Can you help me !
Hung Son
|
|
|
|
|
I'm trying to find a good way to change the saturation of an image.
I've tried the HSL/T/V colorspace tricks, but they don't really work very well; because of the way things work out when going back to RGB space, increasing S tends to make images more red. Unfortunately, most image procesing packages seem to use some variation on the HS* trick, because they all show this tendency towards red at high saturation levels (and those that you can get the source to, like The GIMP and ImageMagick definitely use HSL).
Of course, Photoshop does an excellent job of preserving hue while increasing intensity/saturation - it has none of that red effect and is able to saturate colors to much higher levels than anything else i've seen. So, there's definitely a way to do it - but how?
Anyone have any other ideas? i've searched google for days and can't find anything but "RGB -> HSL -> RGB".
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
Sorry, I can't help. I just wanted to say I *hate* those Photoshop guys for doing everything so much better. I have spent hours in front of Photoshop applying filters and trying to replicate them.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm thinking of getting married for companionship and so I have someone to cook and clean." - Martin Marvinski, 6/3/2002
|
|
|
|
|
|
The verdict:
It's faster and uses (infinitely) less memory than the RGB->HSV->RGB method. And the results are by-far better.
The thing is, the results aren't exactly the same as Photoshop. What I'm struggling with now is: is that a bad thing? The output is almost more natural than PS - things don't get as blown-out as they can in PS, so that's good. But sometimes you really want things to get crazy; it's half the fun!
Regardless of the fun factor, I'm definitely going to use it for a while, to see if people like it.
Thanks!!!
B.T.W., the algorithm actually came from SGI (http://www.sgi.com/grafica/matrix), the PDF you linked to just repackaged the SGI stuff.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
i have a mfc application.
i create a modal dialog with a button.
when i press that button, i want the modal to send an user message to the mainframe and the mainframe - in response to the user message - to create a modeless dialog.
strangely, it works on debug configuration but fails on release.
wish for help!
rechi
|
|
|
|
|
(I don't know whether sending a message to a blocked parent should work or not (my guess is it shouldn't), this is only a workaround.)
If your user message is say WM_CREATE_MODELESS_DIALOG and the associated handler OnCreateModelessDialog , just call this method directly with ((CYourMainFrmWnd *)AfxGetMainWnd())->OnCreateModelessDialog() . Maybe this works.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|