|
how to convert time_t variable to formatted date
eg The long value [12345678900] to dd/mm/yyyy hh:ss
vineesh
|
|
|
|
|
Use the localtime function to convert time_t to struct tm .
Then use string formatting to get the required format.
«_Superman_»
|
|
|
|
|
Check the sample code at the end of this [^]documentation.
|
|
|
|
|
|
|
I have modeless dialog is derived from CDHTMLDialog that is hosted in DLL linked to MFC statically.
the problem is that keys such as tab don't work.
I have read Google documentation
1. for class derived from CDialog the solution in kb233263 work
2. for class derived from CDHTMLDialog this solution does not work
3. regarding the solution kb175502 PreTranslateMessage(MSG* pMsg) is not called for the dialog class, so I don't understand what to do there
Thanks for any help
|
|
|
|
|
Hi All,
I need to change border color of dialog window in MFC.
Please help me..............
Thanks Regards,
Anitha
|
|
|
|
|
The only way i can think of now is to draw your own border using WM_NCPAINT, but this can be a real pain in the rect.bottom...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
I have created one MFCAppWizard Exe application, there i have inserted ActiveX control (Media player OCX). I have changed the move slider position from starting to some wheere and able to recieve the correct postion through event.
Now i want to set the slider position to some number.
How can i set, which function i have to use..
Can any one please help me regarding this.. as it is very urgent requirement for me..
Thanks
Venkatesh.
|
|
|
|
|
Before answer this question I want to ask of you,can you use of MCI functions instead use activex's? its not hard to use and codeproject has articles about MCI(you can use of them like CMI or CSI). if you like to use of them see "A Basic Media Player" it uses of MCIWNd wrapper class and it contains a slider bar for you answer or see "Palying mp3s using MCI"(but its languae is C# but I think its very helpful for you if you know C#).
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,
Thanks for your response on this.. but i think only one function is enough to set the video scroll bar from one position to other right..?
I need which default function is available for getting this work done..?
Thanks
Venkatesh.
|
|
|
|
|
Hi Hamid,
I am very new to this ActiveX Environment, I don't know what is MCI functions.. I have insterted one windows media player activex control on my MFC dialog box. If i moved the movie slider position to some where i am able to get the slider position. Now what i want is i want to set the slider position to some where through my application.
Can you please tell me how it is possible. It's very urgent for me..
Thanks
Venkatesh.
|
|
|
|
|
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.
|
|
|
|