|
Ok see A Basic Media Player. Free source code and ...[^] for MCI and if you like to use of them your answer I think its better than use of Activex.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi Hamid,
Whatever you have given the example is looking good.... but i don't have much time to implement that kind of scenarios. And one more thing i don't want to play the video as well, simply i need to play audio only.
So using events i am able to get the exact position of slider in activex, now i want to know how to set slider position through application..
your immediate help will be appriciated on this, as it is very urgent requirement for me..
Thanks
Venkatesh.
|
|
|
|
|
Hi Hamid,
Thanks for providing me good resource... i am implementing media player features using MCI functions. I am able to play the call on my dialog box. but the slider bar is not moving..
I am creating slider dynamically. The call is playing but slider bar is not moving..
Can you please tell me why it is happening like this..?
Please help me regarding my problem....
Thanks in advance..
Thanks
Venkatesh.
|
|
|
|
|
Did you see that example I think it has sider bar? I made a media player two or three years ago with MCI functions and my problem was extacly like you I needed to position and time of movie like Media Player.You need to calculate total time of your media(movie or audio) for example its 2 minutes=120 second or you can use of Frames instead minutes on the MCI functions aftrer it you need to set silder bar to this number.It has a formula for it if you can get this formula then it will be easy for you.I think you can find it on the codeproject its not serious problem.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi Saadi,
Thanks for your reply, I have gone through the entire sample application,but not getting any idea. I need to play audio only, no need display video screen, for that i want only slider bar.
In your example your setting handle like this
myPlayer.SetParent(c_Static.GetSafeHwnd());
so i also created one static control on my dialog and made it is unvisible, and below that i have created one slider bar dynamically.
below i am providing the slider bar pixels information.
(18,63,614,87)
Is there any constraint that slider bar width and static control image equal, if so please let me know, till now i haven't tried with that..
Please help me where i am going wrong.. because it is very urgent requirement for me..
Thanks in advance
Thanks
Venkatesh.
|
|
|
|
|
First of all Im never saadi (He was iranian poet ) and then I said if you use of MCI you can show video I didnt say you want to show video file I understood your request you want to play audio file with slider bar.
why your static control is not visible can you show your code did yo set WM_VIIBLE for it and also you need to inset Notify for this control.for second question do you have a image control and you want to set size of silder bar with it? if yes please show your code?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi Hamid,
i am able to move the slider position while call is playing. i am able to get that with your help. thanks for that.
now i want to move vertical line along with slider position, i mean along with the call...
can you please suggest me with your hint..as it is urgent requirement for me.
thanks in advance...
|
|
|
|
|
Why do you need to vertical slider?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I am trying to uninstall applications installed using msiinstallproduct function by giving REMOVE=ALL in the cmdline .I am passing the .msi file name to the function . And it returns the errorcode ERROR_UNKNOWN_PRODUCT
please suggest me how to remove applications
vineesh
|
|
|
|
|
Hello,
I have been trying to get currently running user application same as task manager in which first tab "Application" shows all currently running user applications.
I have used EnumWindows() API to find current open windows so i thought i could be able to find all the application running.
But problem with EnumWindows() is it gets all windows such as task bar, any services running as well as user application windows such as my computer or outlook.
Finally problem is i want to find all windows explorer windows opened by user.
EnumWindows() can get exe path of the window as well as title of the window.
But for any explorer window exe name is always C:\Windows\explorer.exe and it is same for any explorer window whether it is opened by user or by operating system as a service.
So how to find whether the window that is opened is a explorer window that is opened by user.
How to differentiate between explorer windows opened by user or windows service windows whereas the exe path is same C:\Windows\explorer.exe.
I need urgent help in problem.
If any body have any clue please share.
Any body has clu
vicky
|
|
|
|
|
You can use IsWindow and IsWindowVisible to check if it is a visible window.
To get the title bar text call GetWindowText on the window handle.
«_Superman_»
|
|
|
|
|
Sure, use these APIs; You will get the user name for each process (EXPLORER)
OpenProcessToken<br />
GetTokenInformation<br />
LookupAccountSid
|
|
|
|
|
There is an API called "GetInstalledPath".Search on net and use it.Its working fine for my application.It will get the installed path.
|
|
|
|
|
Thanks
It worked!!
vicky
|
|
|
|
|
Hi,
I tried to compile a VC++ application using Visual Studio 2005 IDE on a 64 bit platform.
I get the error below:
Error C2011: '_CONTEXT' : 'struct' type redefinition C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\winnt.h 3437
Can anyone please advice me how to get rid of this error?
"Always Expect the Unexpected"
-Krista
|
|
|
|
|
Is your application redefining such a struct?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Nope...
The redeclaration is done (ofcourse with different #if defined) is winnt.h which is a standard header file and not created in my application.
If the same winnt.h worked fine in 32 bit compilation, why should the 64bit compiler throw error?
Any ideas?
"Always Expect the Unexpected"
-Krista
|
|
|
|
|
Well, if winnt.h re-declares, what declares it?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
KristaK wrote: If the same winnt.h worked fine in 32 bit compilation, why should the 64bit compiler throw error?
I ran into this same problem and tracked it down. When the ported project was copied to the x64 environment, there was still a 32 bit define in the preprocessor definition: _X86_
Remove that and it works.
|
|
|
|
|
There obviously is a redefinition, so the question is where. The first thing to determine is what .CPP or .C file is being compiled when the error message occurs. This is a obviously a simple matter. Then use the The next step is to use the /P[^] compiler option to dump the pre-processor output. Finally search the generated file and look for the definitions.
Steve
|
|
|
|
|
I am working for an application where i am supposed to display the latest data on a list box from a XML. I got the datetime node from the XML and saved it into a string.
which is the format of str = "2009/12/3|19:04:43" & str1 = "2009/12/3|19:05:23"
My only concern is how is it possible to compare these two strings by date & time and display the one which is latest.
Please let me know the simplest way to compare them.
Thanks in Advance
|
|
|
|
|
You could use the COleDateTime::ParseDateTime[^] function in order to "convert" the strings into COleDateTime objects which are comparable. But your string has to be a standard format. Is the format in the xml fixed or could you adapt it a bit ? In yes, then I would suggest to use a standard format and then use COleDateTime objects.
|
|
|
|
|
No we are not supposed to change the format. I will be happy if you could provide me the sample code for parsing the date & time from the string and do the comparision.
Thanks in advance
|
|
|
|
|
you need not to change the formate... just change the formate for comparision purpose .. and retain the existing formate....
vikas da
|
|
|
|
|
Looks like your strings are in year/month/day|hour:min:sec format.
The 19 hour indicates you are using 24 hr notation (rather than 12 hr + am/pm) - good.
The only change you need to make is format your day as 03 instead of 3.
After that why can't you just do a normal string compare ?
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|