|
If the default editor does not work for you, can can change it by right clicking on any file icon in the Solution explorer (View->Solution Explorer) and then choose 'Open With....' to enter the location of your favourite editor.
Hope this helps
|
|
|
|
|
I love the original VS editor, its neat, tidy, clear, concise and has all the tools you need for debugging, what more could you possibly want?
|
|
|
|
|
Hi,
I am using CFormView and there is a situation where 2 ActiveX controls overlap
one on the other.
My problem is the first ActiveX control which is below the other is refreshed
every 1 second, due to this the second control which is on top gets hidden.
As I have used CRectTracker on the second control, the tracker gets erased.
What do I need to do so that the first control which is below the second control, gets clipped by the second control.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
Hi,
I have to read from very large files (> GBytes) and parse it (MPEG data, trick modes: FFW/FRw)in "real time" (about 10 MByte/S) on Windows XP system. In some cases I have to read and parse it forwards and in other cases i have to read it starting at the enf of the file and parse it backwarts. I did it in C++ and MFC. I have used the CFile class. In both cases I read small portions (about 64k) from the file, move it into a ringbuffer for later parsing.In the case of forward this works fine.
Backwards I jump back a specific length and read/move that portion of data into the ringbuffer. Repeating this steps i walk backwarts the file in 64k steps.
In the case of small files or for some seconds (dependante on system memory) this works also fine.
But in opposite to forward the system cache seems to increase dramaticaly. At a certain time the sytem starts pageing all other applications in the memory, what causes the system reaction time to become very slow and the reading stream from the file is interrupted.
It seems to me that the cache manager is not optimized to read from a file in backward direction.
Are there any ideas or experiences out there how i can handle reading backwards in a file in "real time" ??
Is there anything i can do, that the cache manager understands that i am walking backwarts ..
Thanks a lot for your help.
Eddie
|
|
|
|
|
I'd try doing this using a Memory Mapped File, which theoretically should give much better results, and far simpiler code.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Memory Mapped File, definitely the way to go, its just like a portion of memory then, you can read forward, back even jump through hoops and its still fast .
Alan.
|
|
|
|
|
There are two basic 'hints' you can specify to CreateFile to tell Windows how you intend to manipulate the file.
Specifying no hint indicates to Windows that you mostly intend to read the file forwards. This is what you have at the moment. It will perform some asynchronous read-ahead from the file, and drop the cache mappings fairly quickly after each read. When it does drop them, it adds the physical memory pages to the tail of the list of free pages, so if it needs to reload them again, it doesn't need to reload from disk unless the pages have actually been reused.
Windows actually tries to interpret your read pattern and guess where the next read might occur.
If you use the FILE_FLAG_RANDOM_ACCESS flag, read-ahead is inhibited, and the cache manager is less aggressive about unmapping recently used sections.
Finally, I'll quickly mention FILE_FLAG_SEQUENTIAL_SCAN where the cache manager assumes that you're reading the file from end to end, never going back, and so adds unmapped cache data to the head, not the tail, of the free list so it gets reused quickly.
In order to be able to pass the FILE_FLAG_RANDOM_ACCESS flag, you'll need to subclass CFile .
More complete information in Inside Windows 2000 from MS Press (Solomon & Russinovich).
|
|
|
|
|
Thanks for your hints,
I tried FILE_FLAG_RANDOM_ACCESS from CFile. There was the possibility to use that flag at the CFile constructor.
(CFile::osRandomAccess See FILE_FLAG_RANDOM_ACCESS in CreateFile in the Platform SDK)
But this was not enougth, the memory consumtion still increase.
So I use the FILE_FLAG_NO_BUFFERING flag to bypass the Cache Manager at all.
(CFile::osNoBuffer See FILE_FLAG_NO_BUFFERING in CreateFile in the Platform SDK). After I did some additional tuning on my rinbuffers this seems to be the solution. Memory usage keeps nearly constant and the transfe-rate is enough to do real time parsing on the mpeg stream.
Thanks for all your comments,
Eddie
|
|
|
|
|
I kept a CListCtrl in my application and inserting columns by picking up column captions
by parsing from a flat file . The problem is InsertColumn method is inserting a cloumn but not displaying column caption ?? Rest of the columns are fine and no pronlem with Inserting items.
How to get the first coulmn name displayed??
thanks in advance
Warm Regards,
KKRam
|
|
|
|
|
Use the LVCFMT_LEFT attribute while inserting headings, and also give the correct width required for the column to display the heading.
"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."
|
|
|
|
|
Thanks Jagadeesh,
I am done with that CListCtrl using that Attribute.,
Warm Regards,
KKR
|
|
|
|
|
I've looked thru as many articles as I could find on the subject of bitmaps and I still cannot find how to make a composite bitmap from a few individual ones. I want to do this in a memory dc then when finished adding each bitmap, bitblt the single one to the screen dc. My goal is to reduce or eliminate flickering and ,yes, I know about double buffering but everthing I read was blitting 1 single bitmap not multiple ones.
Basically, I have one large (400x550 pixels) background bitmap and about 38 smaller (30x150) bitmaps that I am layering over the background one. I have lots of flickering. So I thought that if I could combine all bitmaps into one single memory dc then blit to screen dc I would greatly reduce flicker.
Am I or dreaming??
Manufacturing Software Developer
|
|
|
|
|
You can create a new DC which is compatible with your application DC using CreateCompatibleDC( ... ). Then you can do all your layering operations in this newly created DC, and when your are finished, you can BitBlt the newly created DC to your application DC. This can certainly avoid the flickering you are talking about.
"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."
|
|
|
|
|
Yes, that was it exactly. I feel like an idiot because of how simple the solution was. Actually, just after I sent off this question I experimenting with the method that you ended up suggesting. I created a new memory DC, bitblt'd with SCRCOPY each bitmap into that same memory space. Then, finally, bitblt SCRCOPY the memory DC to the screen DC. It worked fine. There was no flickering.
I tend to exhaust all other means of possible solution paths before using common sense!
Thanks!
Manufacturing Software Developer
Hewlett-Packard Company
|
|
|
|
|
Where in VC++.NET do I change the name of the exe file? Thanks.
Matt (Padawan Learner)
|
|
|
|
|
Its in the project settings, in the Link section.. isn't it ?
Just trying to remember off the top of my tiny head.
|
|
|
|
|
Got it. Thanks.
Matt (Padawan Learner)
|
|
|
|
|
Please Tell me How to search and operate a device,such as USB device?
Use the functions such as "SetupDiClassDev() etc.," need GUID,and How can I Get GUID use windows'API functions?
I Use Windows XP OS.
Thanks.
ST!!
Njbull
Sep.12/2003,Beijing
|
|
|
|
|
I need to draw a selection box in a real time video. This box is created when i pressed the left mouse button and drag the outline of the box. However since my codes are not in MFC, i do not know of any way to draw this box.. Can anyone help??
|
|
|
|
|
I am trying to print out everything in Picturebox.
I can't print out anything except blank.
Here is my source in MyViewClass::OnPrint(CDC* pDC, CPrintInfo* pInfo ) and please help me how I am doing wrong?
CRect rect;
GetWindowRect(&rect);
//CDC* pTempDC = GetWindowDC();
CDC memDC;
//IGBMapViewCtrl d;
//d.GetDC();
memDC.CreateCompatibleDC( pDC );
// create bitmap with my window-pDC and set it in the memory-DC
CBitmap bitmap;
bitmap.CreateCompatibleBitmap( m_MapView.GetDC(), rect.Width(), rect.Height());
memDC.SelectObject(&bitmap);
// open printer dialog
// detach DCs
bitmap.Detach();
|
|
|
|
|
to print a bitmap, you need to use a device independent bitmap (DIB), not a device dependent bitmap
|
|
|
|
|
Thank you, I will test it.
Shin
|
|
|
|
|
Thank you, I will test it.
Shin
|
|
|
|
|
Hello,
I'm trying to write a Scene Editor for a 3d engine. In doing this, I have to use Direct3D which means all my surfaces and what not depend on the size of my view.
The only solution I have come up with so far is to create all my stuff, wait until the view is opened so I can get the correct size of it and in it's OnDraw method, initialize Direct3D with the size of the view. I would like to move some of the Direct3D stuff over to my Document class so that they can share this with other views but I'm not sure how to do this. The view hasn't been created by the time OnNewDocument is called so I can't get the right size.
Any ideas?
Thanks
Shawn
|
|
|
|
|
A customer emailed today asking why a combo box in our program sorted like this:
Item1
Item10
Item2
etc
Our combo box sorts alphabetically and it's a field of names which generally wouldn't have numbers in it.
In other words, they expect "Item10" to follow "Item2" which makes intuitive sense but seems to be difficult to program for.
Has anyone ever seen a combo box that sorts alphabetically and numerically, in any program? Any ideas on how to reliably do that? Is this a known problem with a known algorithm?
|
|
|
|