|
you can right click on the dialog and select Insert ActiveX Control and select the windows media player activex.
once its selected then create a member variable for it. you get all the wrapper classes that is required for the activex component to work properly.
|
|
|
|
|
i have done that.But can u tell me which all member functions should i call to play a file if i am having the url of that file.
|
|
|
|
|
use MCIWnd functions
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
If i can use CWMPPlayer4 class windows media player window i can use in my dialog .
I want just to know which functions should i call for opening and playing the file.
If somebody used it before or have any documentation,please help me.
|
|
|
|
|
|
do you mean MCIWnd class.It is helpful.But i need to have a windows media player window in my Dialog.
It is possible with activeX control windows media player.
|
|
|
|
|
I am really sorry.That link was not there previous.
Thank you very much.
|
|
|
|
|
The link I gave was related to Embedded Development... So I am not sure about usefulness...
- ns -
|
|
|
|
|
I just tried it...
I inserted the activex and created a control variable of class CWMPPlayer4. And called the the m_obj.SetUrl( "filepath" ). I could play an mp3 file.
But I am not sure about a good reference. But I found that googling the string "CWMPPlayer4" would guide you better.
- ns -
|
|
|
|
|
You can use of MCI functions for playing your audio but you can desgin your idea for it id you dont need to CWMPPlayer4.
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 working on a project intended to control the print flow on the network. User will not be allowed to print on the printer directly. In any case EMF spool file will be generated and parsed and then forwarded to the actual printer(any PS/PCL) printer.
For forwarding the print job , I am just taking the destination printer device context and playing the spool file on the destination printer using PlayEnhMetaFile function, so it is printing on paper. Every thing works fine up to this level.
But I am getting some problem. The output from print job forwarding and the direct printing to the printer is somewhat differ.
I want to get same out put from print job forwarding as I am getting direct printing.
For that reason I am counting RECT to play enhanced meta file on the destination printer using following formula.
float PixelsX, PixelsY, MMX, MMY;
RECT rect;
PixelsX = (float)GetDeviceCaps( dc ,HORZRES );
PixelsY = (float)GetDeviceCaps( dc, VERTRES );
MMX = (float)GetDeviceCaps( dc, HORZSIZE );
MMY = (float)GetDeviceCaps( dc, VERTSIZE );
rect.top = (int)((float)(pEMRHeader->rclFrame.top) * PixelsY / (MMY*100.0f));
rect.left = (int)((float)(pEMRHeader->rclFrame.left) * PixelsX / (MMX*100.0f));
rect.right = (int)((float)(pEMRHeader->rclFrame.right) * PixelsX / (MMX*100.0f));
rect.bottom = (int)((float)(pEMRHeader->rclFrame.bottom) * PixelsY / (MMY*100.0f));
Here "dc is Device context for the destination printer" .
But each time I am getting somewhat big print from the printer.
Is it right way to calculate the RECT?
It would be help me if you can look into the problem please.
Thank you.
Regards,
MAhendra
|
|
|
|
|
The easiest way to do something like this is to take a slightly different approach:
- Use Windows 'Print to file' to produce a file containing the printer driver's output
- Copy the file to the 'printer port'. This can be a networked printer.
For example, on the LAN I'm using, there's a printer called 'mint' that's served through a print server called 'greenhouse'. If I print to a file, 'd:\test.prn', the following will cause the file to be correctly printed:
copy d:\test.prn \\greenhouse\mint
|
|
|
|
|
I have 3 values "number name and value" for different parameters in a notepad..
My Question:
Suppose a notepad say A contains the above values in the following manner
number1
name1
value1
number2
name2
value2
.
.
.
.....and so on till say 500 parameters..Now I have a notepad B which is empty.I am using a listbox which contains the list of all parameter names.So if I click on a particular name,it must automatically take the corresponding number and value of that parameter name from the notepad A and store them along with the parameter name selected in notepad B.The listbox is a multiselection listbox.I want to execute this using VC++ MFC classes.Can anyone pls help me how to do this?
Thanks,
modified on Wednesday, January 21, 2009 5:40 AM
|
|
|
|
|
And what is your doubt about?
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]
|
|
|
|
|
notepad to me means notepad.exe, a simple text editor.
I assume you mean a text file?
So you many small problems you can work on one by one.
1/ How do I read a file,
2/ I need to take 3 lines at a time, and fill a structure with: Number,Name and Value. I don't know if value is text, floating point or integer
3/ Make an array or list of these structures as they come in
4/ Have a list box, and populate it with this information - I'd suggest a ListCtrl in report view; but if you could do that, you'd be asking different questions. Keep it simple first!
5/ Detect a click on the list box
6/ Write the contents of the correct array entry to a file.
You problem sounds intimidating at first - so don't swallow it whole, try bite sized nibbles.
Each of the above stages should be solvable with your favourite book / msdn.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain Clarke wrote: You problem sounds intimidating at first - so don't swallow it whole, try bite sized nibbles.
Ah, the classic "How do you eat an elephant?" approach.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: Ah, the classic "How do you eat an elephant?" approach.
Isn't the answer "Lots of ketchup"?
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
My doubt is:
What code should I use to get the information stored from notepad A to notepad B,when I doubleclick on the parameter name given in the listbox.How to do this using VC++ MFC classes?
|
|
|
|
|
i have created a simple project in Visual studio 2008 after installing the feature pack.
i found that there are new classes for toolbar, menu etc viz: CMFCToolbar, CMFCMenuBar, ...
now if i want to use the old class CToolBar and create a toolbar, then DockControlBar() function fails.
is there no way to use CToolBar class?
sample code:
after i create the toolbar, i dock as follows
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);
thanks
|
|
|
|
|
me too running with the same issue ple ase help
|
|
|
|
|
Hai !
I have an button in my dialog i want to make it invisible, is there any function to it ??
for ex> to disable a button i do : myButton.EnableWindow (FALSE);
thanks !
|
|
|
|
|
|
You can use of ShowWindow(SW_HIDE) or you can set visible option to false of your control on the property window.
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 )
|
|
|
|
|
The previous answers were correct but remember that a hidden button is still enabled.
|
|
|
|
|
i have an image n i want to set it as my Application Icon how can i set it ?
|
|
|
|