|
I have since tried this and was able to load the video, but the playback is VERY choppy. It seems that it pauses about once a second as if it caching more of the video.
Any suggestions as to why this happens?
|
|
|
|
|
Could you load other formats like avi or Mpeg?
|
|
|
|
|
Hi,
I have a Windows service that I had running yesterday, but today I can't get it to start. I have gone back to my old code that ran yesterday, but it still doesn't start. How can I get an error code that will give me some hint of what the problem is? The failing code is shown below:
<br />
if( ::StartService(schService, 0, 0) ) <br />
{<br />
Sleep(1000);<br />
<br />
while( ::QueryServiceStatus(schService, &m_ssStatus) ) <br />
{<br />
if( m_ssStatus.dwCurrentState == SERVICE_START_PENDING ) <br />
{<br />
TRACE( "." ); THIS LOOP NEVER EXITS, SO I CAN'T GET AN ERROR CODE<br />
Sleep( 1000 );<br />
}<br />
else<br />
break; <br />
}<br />
I found an event in the application event log with the following description, but I don't know what it means:
The description for Event ID ( 0 ) in Source ( AutoFileHandler ) cannot be found. The local computer may not have the necessary registry information or message DLL files to
display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following
information is part of the event: Service installed.
Can anybody help me with this?
Any help greatly appreciated.
|
|
|
|
|
What happens whey try to start the service using the Standard Windows Services MMC snap in?
led mike
|
|
|
|
|
RoyceF wrote: ...but today I can't get it to start.
If StartService() is failing, have you tried calling GetLastError() to find out why?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
When I try to start it from the services panel, it just hangs for 2 or 3 minutes before the system shows a dialog indicating that the service failed to start.
StartService() doesn't fail, nor does QueryServiceStatus(). QueryServiceStatus() puts zeros in the exit code variables dwWin32ExitCode and dwServiceSpecificExitCode of the SERVICE_STATUS struct. It just never exits the loop waiting for the m_ssStatus.dwCurrentState to change from SERVICE_START_PENDING. GetLastError() always returns 0.
|
|
|
|
|
RoyceF wrote: it just hangs for 2 or 3 minutes
Are you sure your service application is starting correctly
(particularly, SetServiceStatus() to SERVICE_RUNNING)?
Have you tried attaching to the service process with the debugger to see
what's going on?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, I have tried starting the service from the services snapin, then attaching the debugger. It is always stuck in this loop waiting for a change in the current state. I have also stepped into the code from the Winmain entrance and it goes directly to this wait loop. However, I will have to wait until Monday as I can't uninstall the service remotely in order to restart it and I am not at my workstation. So I will pursue this then.
Thanks for your help.
|
|
|
|
|
Hi guys. I need to put a web browser control into an application. I don't care what language I do it in, but I want to get events when a DOM event fires ( such as a mouseover or a click on a link ), and I want to get an event that tells me they are about to fire, which allows me to cancel the event. Is this even possible ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: Is this even possible ?
That is all determined by the DOM. I don't do much DHTML any more but my memory is that not all events can be canceled. I would also not believe that all events have an associated preXXXX event or whatever they are called. So basically you just have to dig into the DHTML documentation. Bummer eh?
One other thing is the potential browser version variations of course. Unless you can control/demand version.
led mike
|
|
|
|
|
I cannot control the version, although I can enforce a minimum. Basically, yes, I want to hook into the DOM. That is, allow a user to display an arbitrary web page, and without injecting any script of my own, to get these events.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: without injecting any script of my own, to get these events.
Yes you can do that. It's all COM interfaces so if you have any experience with events in COM that will be helpful. If you don't I will tell you that I don't think it is pretty.
led mike
|
|
|
|
|
Are you sure ? I've been looking at this stuff and I didn't think these DOM events were exposed.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Christian Graus wrote: I don't care what language I do it in, but I want to get events when a DOM event fires
Hey Christian, when you initially asked this in VC++ I limited my searching to that language. Just in case you are interested in a .NET solution you might find this interesting.[^] If I ever need this in future projects I would seriously consider this route.
led mike
|
|
|
|
|
Hi all,
I am new to VC++ programming...My requirement is to develope a text editor...where do i find open source text editor developed in VC++...
Thanx and regards
Sanjeeva
|
|
|
|
|
if u r talking of notepad like application, then simply run the VC++ wizard for SDI, select appropriate classes, & u will have an editor without typing a single line of code.
|
|
|
|
|
Sanjeeva Kumar K wrote: I am new to VC++ programming.
How "new" are you ? because, developing a text editor is not an easy task (unless CEdit or CRichEdit is good enoug for you).
Sanjeeva Kumar K wrote: My requirement is to develope a text editor...where do i find open source text editor developed in VC++...
Isn't this a contradiction ? you either develop it or you don't.
Anyway, Google might be able to help you there.
Good night and good luck.
|
|
|
|
|
|
Did you search on the codeproject?
|
|
|
|
|
No........sorry i did not search.
|
|
|
|
|
No problem lets start.
|
|
|
|
|
Hello,
I have an existing application that I'd like to modify.
The part of application that I'd like to change is a modal CDialog.
It currently has 15-20 CEdit and Combo boxes. I have a requirement to increase this number to 25.
I thought about adding a CPropertySheet/CPropertyPage affair, but the user has requested that the specific controls should be in a scrollable region.
I have found code to make the entire dialog scrollable, but what I would really like to do is make just the middle region scrollable, whilst the OK/Save and Cancel buttons stay in the same place at the bottom of the dialog.
I have looked at CFormView as well, but that doesn't seem to be exactly what I need.
Maybe my approach is flawed and there's a more obvious way to do this. I would appreciate any feedback and/or suggestions.
Cheers.
|
|
|
|
|
What I've done in a similar circumstance is to have two dialog boxes.
One - the parent dialog box (BoxA), with the OK, Cancel and scroll bar.
It also has a placeholder static control.
I then replace that placeholder with a CWnd descendant custom control (ControlA). (Though you could just create it directly - I prefer to use the dialog box resource editor for ease of layout).
THAT child window that creates a modeless dialog box, which has your 25 odd controls on it (BoxB).
Then the scroll bar sends WM_xSCROLL messages to BoxA, which then pass to ControlA - which moves BoxB about. ControlA clips BoxB, and tada!
Simple, eh?
Needless to say, when it got a bit more complex I replaced the lot with a wizard like you want to do...
Iain.
|
|
|
|
|
Hi Everyone.
How does one make a program always run when a computer is started without doing it manually. For example when a person installs a program, how do they make it appear in the system tray and run automatically every time the computer is started.Is it part of the coding how is this achieved. Please help.
Wamuti: Any man can be an island, but islands to need water around them!
Edmund Burke: No one could make a greater mistake than he who did nothing because he could do only a little.
|
|
|
|