|
|
I am developing an application where you can open multiple documents (data and log files) and for each document you can open up to 60 different views.
First i've limited it to one open document because multiple views of different documents on the same MDI workspace is not a good idea. This would also require that always at least one view is open for each document because otherwise it would be unclear which document receives the commands.
Now i've added a tabbed MDI interface to the app and misused it a little bit. Normally they are used to switch between single views of each document, what i'm doing now is hiding all views of the one document and show all for the other one. But i guess that might be confusing for the users.
My next idea would be multiple top level windows (main frames) which might be better and then one document per main frame and multiple views inside the MDI workspace.
I don't know any other app where you have multiple documents and multiple views. How have others solved this problem?
André
|
|
|
|
|
ABuenger wrote: This would also require that always at least one view is open for each document because otherwise it would be unclear which document receives the commands.
Using MFC ( I assume you are...? ), when the last view of a document closes, so does the document. Any commands go first to the active view, then to the document of the active view, then to the frame. So there should be no technical problem.
If you can hide all views of DocTypeX , and show all views of DocTypeY, then I would use two separate top level frames. That was the user has a well understood method of switching between them. Or can tile them next to each other, etc. Unless there is some *really* strong reason not to, I'd make them two separate applications - it'll make your coding simpler too.
Is there some reason for the two doc types living together? Does the data have an associated log file? If so, then maybe a modeless window which shows the log of the currently selected data doc? Your current-log-window can be docked, and the user switches between view / docs.
There are lots of ways to deal with the question, but the answers really depend on the details of what you are doing.
I hope this has given you some thinking ammunition an least!
Iain.
|
|
|
|
|
Iain Clarke wrote: Using MFC ( I assume you are...? ), when the last view of a document closes, so does the document. Any commands go first to the active view, then to the document of the active view, then to the frame. So there should be no technical problem.
Yes, i am using MFC, but i've disabled the auto-deletion of the document if the last view is closed because the user won't understand why he always has to have at least one of the 60 possible views open.
The app is used to tune engines, to be more precise, the engine control unit (ECU). The ECU has more than 100 settings, for cranking, for temperature/pressure/... changes.
Please click here for a screenshot[^]
You can make changes in realtime, while the engine in running. You can also monitor and log all engine parameters at the same time.
Now lets say you monitor and log data and you see knocking, so you turn off the engine, save the log and start analyze it. After you've made changes to the settings you go for a drive again and then you want to compare the two log files.
You may also want to open several data files and compare them and copy from one file to the other.
I also need some kind of splitter window, with a list of all settings on the left and then the views for data file 1 and data file 2 on the right. Differences between the two files should be highlited.
I've also tested to put a splitter window in the MDI client and then main frames (without menu and toolbars) inside each splitter, but i guess that's overkill.
André
|
|
|
|
|
Dear friends,
I would like to know what is Network Shutdowner. If any information regarding this issue, kindly give me a reply.
( any websites regarding this topics ) pls that also inform me.
Regards
kedar Bhagwat
Girish
Software Developer
|
|
|
|
|
vcforums wrote: I would like to know what is Network Shutdowner.
Given the capitalization, I suspect it is the name of an application. Is this something that you have seen, used, or just heard about?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hi
How does the one dynamicly allocate some CDialog and some controles wich are also allocated, and where do I set position on say like CButton?
TNX
|
|
|
|
|
|
Hi,
I send SB_THUMBTRACK with WM_VSCROLL message to ListCtrl, but ListCtrl does not respond to it. But same to a TreeCtrl does not make any problem.
Do anybody know why?
- NS -
|
|
|
|
|
Sending SB_THUMBTRACK, SB_THUMBPOSITION, SB_ENDSCROLL messages will not work for CListCtrl in Win2K and XP. These messages will works only in 95/98 and ME. I believe the problem is with implementation of some Win32 API functions for different versions of Windows.
You can probably try this alternative...
Call CListCtrl::Scroll with the X and Y coordinates.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Oh I see...
Could you tell me the reason?
- NS -
|
|
|
|
|
NS17 wrote: I send SB_THUMBTRACK with WM_VSCROLL message to ListCtrl, but ListCtrl does not respond to it.
What does the call to SendMessage() look like?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
List controls do not respond to WM_HSCROLL or WM_VSCROLL messages. They use their own LVM_SCROLL message.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I use a custom scrollbar derived from CWnd. This scrollbar can send WM_VSCROLL message to the list control directly, because the list control window handle is with the scrollbar. All other messages except SB_THUMBTRACK can be processed by the list control. But this same for tree control is working fine.
Then what could be the best solution for this problem?
Thank you.
- NS -
|
|
|
|
|
hai,
I m having a problem with msxml2.lib in debug mode compilation. Its just puzzling me. I installed xml sdk3.0 version in my system. when i tried to compile a simple code in vc++ 6.0( Just com object creation of xmldomdocument )
i got this error "msxml2.lib(msxml2_i.obj) : fatal error LNK1103: debugging information corrupt; recompile module
Error executing link.exe"
I had included msxml2.h , msxml2.lib in library options also. I am having visual studio 6.0.
Can anyone give suggestions for this, i need to call those apis in debug mode only.
Advanced thanks for giving any kind of suggestion
manu
|
|
|
|
|
I'm pretty sure the last version of the Platform SDK compatible with VC6 was Feb 2003.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
Hi!
I have a problem with dll programming. I am programming dll's for the micorosft flightsimulator.
Anyway in DEBUG mode i have the strange problem that i get a assertion in ntdll.dll telling me that a incorrect adress is passed to RtlFreeHeap when the sim wants to unload my module...so the problem is only on closing my dll. The error occours in the fs9.exe and not in my dll but i pass many (correct) pointers to the exe of course and its working with them.
I had found that the invalid adress that is passed to the RtlFreeHeap function is a pointer to a constant character string "xxxxxx" located in the .rdata section of my dll. When i remove the constant for my code the problem is still present but points to antoher adress also somewhere in the .rdata area of my dll.
Has anybody a idea what could be wrong with my heap setup and/or dll compilation that causes a problem with my .rdata memory area. Is there maybe something that i do not know about constants in dll's or resources in dlls.
My dll needs much memory, but still in the minimal configuration the error is present.
Again the problem is only on closing where the fs9.exe wants to free my memory? ans is not present during normal operation. Additional i could find that error when compiling in release mode.
Is there somewhere a tutorial about "do nots" in dll code programming...
hope somebody can help me
regards
Florian
|
|
|
|
|
Don't know much details about FS, as I never program anything for that, and I just hope this will not be complete OT
My rule for dll programming is: Do not release memory allocated in another module.
This means if you allocate something in your dll (eg the malloc/new is called inside your library) the corresponding free/delete should be called also in your code inside the same library.
Maybe you have some situation when you passed something you allocate to the fs9.exe and it tries to release it for whatever reason or vice versa - you're releasing something allocated in fs9.exe or another module.
|
|
|
|
|
Hi!
Everthing solved and cleared, i have changed a char* of the exe instead of copying my string to this pointer...so when the exe tries to clean up its char* it pointed to a constant memory location of my dll and so causes a conflict...
thank you anyway
florian
|
|
|
|
|
Hi
I want to add a range to rand() function
How can i do it
is it possible to produce a negative number out of it
uzma
the more u give the most u receive
|
|
|
|
|
From MSDN:
The rand function returns a pseudorandom integer in the range 0 to RAND_MAX . Use the srand function to seed the pseudorandom-number generator before calling rand .
#include "stdlib.h"
#include "stdio.h"
#include "time.h"
int main( void )
{
int i;
srand( (unsigned)time( NULL ) );
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
}
Owner drawn
Jesus Loves
|
|
|
|
|
To complete owner drawns response :
If your range is, say [x;y], then use the following formula:
random_nb = (((rand()*(y-x))/(RAND_MAX))+x;
should work with negative values as well.
~RaGE();
|
|
|
|
|
Hi,
I am using ReadFile() method passing OVERLAPPED structure for reading from a socket in Asynchronous mode. Also i am using IO Completion ports for I/O notification. Is it possible that the ReadFile() can fail due to timeouts?.ie. If the packet that i am reading takes a lot of time to arrive, in that case will the ReadFile() fail?.
If indeed ReadFile() fails due to timeouts, how can i get that error information?.
Thanks in advance,
Pradeep
|
|
|
|
|
Hi,
You can use GetOverlappedResult(...)to retrive status of an OVERLAPPED operation
Or try loking af GetQueuedCompletionStatus(...)
Thomas
|
|
|
|
|
Hi,
Thanks for your help.
Also can any one pls let me know where i can find the documentation on OVERLAPPED structure.
typedef struct _OVERLAPPED {
DWORD Internal; // [out] Error code
DWORD InternalHigh; // [out] Number of bytes transferred
DWORD Offset; // [in] Low 32-bit file offset
DWORD OffsetHigh; // [in] High 32-bit file offset
HANDLE hEvent; // [in] Event handle or data
} OVERLAPPED, *LPOVERLAPPED;
In Programming Server Side Applications for Win2k by Jeffrey Richter, there is explanation about the OVERLAPPED structure. But, it doesn't explain more about the variable "DWORD Internal; // [out] Error code" and especially what values it can take.
Pls let me know where i can find the information. I have already searched msdn but of no use.
Thanks in advance,
Pradeep
|
|
|
|