|
If I was doing it I'd use a SAX2 parser to do the job.
Steve
|
|
|
|
|
|
fatal error C1001: INTERNAL COMPILER ERROR - I started browsing and came across this[^].
This article was previously published under Q195738<br />
SYMPTOMS<br />
When template classes or template class header files are included in a precompiled header file, the compiler may generate the following error for files that use the precompiled header:<br />
fatal error C1001: INTERNAL COMPILER ERROR<br />
(compiler file 'msc1.cpp', line 1786)<br />
-or-<br />
fatal error C1001: INTERNAL COMPILER ERROR<br />
(compiler file 'msc1.cpp', line 1188)<br />
This error occurs only on machines with the Windows 95 or Windows 98 operating system.
My question is, how do you "include a precompiled header file" from Visual Studio? We're using Visual Studio 6.
Thanks
Norman Fung
|
|
|
|
|
I think it's just bad wording, they mean when you do those things in the header file that is used to generate the PCH file. Usually that is stdafx.h
|
|
|
|
|
I've have similar problems when trying to include some Boost headers in the precompiled header (MSVC6). I found no solution other than not to precompile the headers in question. MSVC6 is getting really long in the tooth.
Steve
|
|
|
|
|
Is it possible, in VS2005, to view my apps main window while VS is halted at a breakpoint? IE, I want to be able to switch between the two windows while execution has halted.
If the answer is no ( which I guess ), can this be easily configured using dual monitors?
|
|
|
|
|
As long as you can position your app's window away from VS' window it should work. Since
the app's threads are halted there's no way for repaints.
Mark
|
|
|
|
|
Mark Salsbery wrote: Since
the app's threads are halted there's no way for repaints.
I figured this was the case, but in Vista, hovering the mouse over the taskbar button produces a small preview screen for that window. So I was kinda hoping there would be a similar feature, or even 3rd party tool, to do something similar only fullsize.
|
|
|
|
|
Hello,
I would like to make a simple DVD Player using Wins API. I was wondering if anyone can point me to a book or an online tutorial?
Thanx so much in advance.
Khoramdin
|
|
|
|
|
|
There's no "simple" APIs but DirectShow can make it realatively simple.
DVD Applications[^]
To use DirectShow you'll need to supply your own MPEG-2 decoder filter - there's some available
free on the net.
Mark
|
|
|
|
|
|
Hello Mark,
Thanx for the advice. I actually wish to add a Button which captures the exact time of the played DVD once it is clicked.
I started reading about this and base on my limited knowledage I believe that is next to impossible; unless I am able to do hooking in order to gather information "Time" from a third-pary software (commercial DVD playback Applications)! I am not even sure if I have to look into API hooking or Kernel Hooking as I am still reading and learing.
Based on the believe that it is impossible to add a Button which can be visual during the DVD playback and can capture the DVD play time once it is clicked I devided to explore the idea of making a simple DVD playback with the additional button used for capturing the time.
Base on the goal of my project what approach do you suggest. Thank you very much for your help.
Have a great day.
Khoramdin
|
|
|
|
|
Hi Khoramdin,
I don't know of any Windows APIs that could be hooked. Software DVD players are software that
read standard DVD files and extract and render the various streams of data. There may be third
party libraries that can help make developing a player easier but I've only worked with Windows
DirectShow (the SDK is included with the latest Platform SDK, not the DirectX SDK). There's
decent sample code included, including a DVD player.
What is the time you need to capture? The "wall clock" time or time from a audio/video stream?
Mark
|
|
|
|
|
Hello Mark,
Regarding the Windows APIs hooking which I mentioned, I have been reading many posting which was posted here in "codeproject.com". Here is the link to one of many posting that I have read:
http://www.codeproject.com/system/hooksys.asp[^]
What I mean by The Time in my message is the Frame that DVD Playback was showing at the moment of clicking on the Button which I wish to add. I am not sure what to call it, therefore I used the word Time since on the DVD-Playback there is a time representitive of howlong the DVD has been played so far.
Personally I prefer to create my own DVD-Player software. I guess that allows me to have other options than standard Commercial DVD-Player Software. But I was not sure if that is possible with my level of knowledge. But I am for sure going to explore your great suggestion.
I hope I managed to make sense.
Thank you so much for taking the time and helping me out on this project.
-- modified at 13:44 Tuesday 30th January, 2007
Khoramdin
|
|
|
|
|
I suppose you can use hooks to monitor system messages. Finding where the DVD play time is in a
3rd-party app may take a little digging - and it could change at any time. There's no specific
system message or API associated with a DVD's play time. That is part of the media files that
are on the DVD.
If you choose to make your own DVD player, then DirectShow is one way to go. The DVDSample
application that comes with the SDK is a good starting point. It provides all the functionality
of a stand-alone DVD player plus more. It took me about 10 minutes to get it up and running - I
have no idea how many hours or days it would have taken me to figure out how to get the play
time from a 3rd party app.
What version of Visual Studio do you use? I have a 2003 project for the DVDSample that builds
and runs that I can send you. Like I mentioned previously, you need a MPEG-2 codec - this is
not something Microsoft can legally provide so it has to be 3rd-party. I have Nero installed so
it uses Nero's codec filter but I also have an open-source codec found online.
|
|
|
|
|
Hello Mark,
Thank you for taking the time to help me out, mate. I have decided to go ahead with your suggestion and build a new DVD Player Software Application. The question would be, would I be able to add the Button “Time Capturing of DVD Play Time” to it's GUI if I chose to build my own DVD-Player software?
Lat night I took the time to look at the DVD-Video APIs and the DVDSample application that comes with the SDK as you suggested. I spend few good hours and I have to say that I ended up without dinner as I was trying to make sense out of it. Good old take-away Pizza did the job for the dinner but I still have got long way to go before I can make the DVD-Player Software.
I am using Visual Studio 2005 Express Edition. I am not sure if I can simply run your codes on it but I am sure that is going to be very educational. So, would you be kind enough to send me your early project on the DVD? I am going to leave you my email address if you wish to do so.
Email: babak_khoramdin@hotmail.com
You mentioned in your message “It took me about 10 minutes to get it up and running”. I truly envy you, mate but I guess on the other hand I fee privileged for having your assistance. I am truly grateful that you are taking the time and helping me on this DVD project.
Thanx very much and have a great day.
Khoramdin
|
|
|
|
|
Since you have all the sorking souce code there should be no problem adding to the UI.
I found the DVD background stuff in the SDK very educational. I had no idea what kind of
information was stored on DVDs.
Khoramdin wrote: You mentioned in your message “It took me about 10 minutes to get it up and running”. I truly envy you, mate but I guess on the other hand I fee privileged for having your assistance.
Wasn't me. It's Microsoft sample code. Just took a little tweaking to remove some VC++ 6 related
items and build a project for it (the samples only come with a makefile).
It should import to 2005 express fine but if you haven't done so already, you may want to follow
the steps here: Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK[^]
I'll email the project!
Mark
|
|
|
|
|
Hi Khoramdin,
I made a VS 2005 Express project/solution and sent it to you.
You may want to remove your email address from your last message so you don't get extra spam
Mark
|
|
|
|
|
Hello Mark,
Thank you so much for all the help and the information.
I am going to take sometimes to check these and hopfully be able to build a DVD-Video Software Application.
I hope you don't mind me bothering you once in a while when I cannot make sense out of some of the stuff.
Thank you very much and have a great day.
Babak
|
|
|
|
|
( with VC6, MFC, and using the CMultiTree class from the CodeGuru site which support multiselection )
I have a large-ish complex tree hierarchy. Each leaf item in the tree has pointer to its corresponding "object".
Each of those object knows when it's selected or not; i.e. I can select objects in other UI parts of the application, and the selection must be reflected in the tree.
Now, I will loop everything to do a SetItemState( hItem, 0, TVIS_SELECTED ); on all items to deselect them. followed by another SetItemState( hItem, TVIS_SELECTED, TVIS_SELECTED ); to actually select the items.
This is not very effective.
I'm looking for better suggestions.
I've been trying to store each object's HTREEITEM item in the object itself to be able to change the state directly on the items. but that means the Tree must be known ( in some fashion ) to others unrelated places in the software.
I also tried to completly "override" the tree selection mechanism and keep it "external" to the tree itself, and use CustomDraw ( NM_CUSTOMDRAW ) on the tree to manage the selected state of the objects, but that causes other kind of side effects, mostly bad refresh and flickering and some selection management issues.
Any other ideas ?
Thanks
M.
|
|
|
|
|
Maximilien wrote: I've been trying to store each object's HTREEITEM item in the object itself to be able to change the state directly on the items. but that means the Tree must be known ( in some fashion ) to others unrelated places in the software.
This is what I usually do, with the disadvantages you describe. I have a layer (a class) between the TreeCtrl and the Data, which contains only a pointer Data and the HTREEITEM.
|
|
|
|
|
I have created a dynamic splitter with:
CSplitterWnd clientSplitter;
..
clientSplitter.Create(this, 2, 2, CSize(200, 200), pContext, WS_CHILD | WS_VISIBLE | SPLS_DYNAMIC_SPLIT, AFX_IDW_PANE_FIRST);
How do I add a view to it? This code ..
clientSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(100, 100), pContext);
.. causes an ASSERT.
cheers,
Neil
|
|
|
|
|
And the assertion is....?
|
|
|
|
|
Sorry, assertion is in WINSPLIT.CPP:
if (GetDlgItem(IdFromRowCol(row, col)) != NULL)
{
TRACE2("Error: CreateView - pane already exists for row %d, col %d.\n",
row, col);
ASSERT(FALSE);
return FALSE;
}
cheers,
Neil
|
|
|
|