|
|
I have used Windows Media Player 10 in my vc++ application...i can play mp3 and avi files but not vob files...when i rename the vob files to mpg, the application plays them...but it does not do the same with vob files...please help...
thanks
Sanjukta
-- modified at 6:51 Tuesday 31st January, 2006
|
|
|
|
|
How are you loading the files ? Please post a small code snippet.
~RaGE();
|
|
|
|
|
Hallo
I have written some class
<br />
#if !defined(_COMPLEX_H_)<br />
#define _COMPLEX_H_<br />
<br />
#include <stdio.h><br />
#include <iostream.h><br />
<br />
class Complex <br />
{<br />
public:<br />
Complex();<br />
Complex(const Complex&);<br />
Complex(double a, double b) : re(a), im(b) {}<br />
<br />
virtual ~Complex();<br />
<br />
const Complex& operator+= (const Complex&);<br />
const Complex& operator+= (const double);<br />
friend Complex operator+= (double&, Complex&);<br />
<br />
Complex operator+ (const Complex&) const;<br />
Complex operator+ (const double) const;<br />
friend Complex operator+ (double, const Complex&);<br />
<br />
const Complex& operator-= (const Complex&);<br />
const Complex& operator-= (const double);<br />
friend Complex operator-= (double, Complex&);<br />
<br />
Complex operator- (const Complex&) const;<br />
<br />
Complex operator- (const double) const;<br />
<br />
friend Complex operator- (double, const Complex&);<br />
<br />
Complex operator! (void);<br />
<br />
friend ostream& operator<< (ostream&,const Complex&);<br />
<br />
private:<br />
double re;<br />
double im;<br />
};<br />
<br />
#endif<br />
How to change this operator to global calling and then referencing in the class complex ???
THX T
|
|
|
|
|
tbrake wrote: global calling
What do you mean ? What do you want to achieve ?
~RaGE();
|
|
|
|
|
Hello,
Does the following help:
Complex operator!(const Complex& This);
This operator is not a member function, but a global one.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi
i'd like to achive that there are not that many functions so changes might be easier to make
I know that it is possible to get the same behavior by using 4 global funktions and torefere by using friend. But i dont know hoe to manage
T
|
|
|
|
|
tbrake wrote: I know that it is possible to get the same behavior by using 4 global funktions...
In addition to, or in lieu of, the class methods?
tbrake wrote: ...and torefere by using friend.
Doesn't your class already have friend functions?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Year your right !?!
But whenever i try something like
<br />
Complex operator! (double&, Complex&);<br />
class Complex<br />
{<br />
...<br />
};<br />
I receive some errors!
And second isn't ist possible to combine all "+" or "+=" ... functions so that there is only one to modify and not like the class i posted changeing always 3 methods ??
T
|
|
|
|
|
tbrake wrote: I receive some errors!
What errors?
class Complex
{
...
};
Complex operator!( double&, Complex& );
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
Hello,
I want to implement something similar to map colouring (Not the famous problem but actually filling). Let us say, i have a picture of a continent, and i want to select a country and fill it with a colour and also in a list view, i want to highlight that country with some additional info.
At first, i thought i could get points (borders of a country), and use triangulation or polygon filling and define bounding rectangles or polygons (simple way, not using any tree implementation), but this approach needs lots of data generated by me. (using OpenGL)
my question is, is it feasible to implement this with a picture, detecting boundaries (i saw threads about edge detection) automatically for each country name and store them for hit testing and use filling algorithms (flood vs.)? (I am a real beginner on Image Processing, Bitmap Handling, GDI etc. )
How would you solve this?
Thank you,
Bekir Turkmen.
|
|
|
|
|
beko wrote: us say, i have a picture of a continent, and i want to select a country and fill it with a colour and also in a list view, i want to highlight that country with some additional info.
do you already know the boundaries of the countries ? if so, how are the boundaries stored ?
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
i dont know the boundaries initially.
However, i can find them manually and store them as point vectors for using input to Delaunay Triangulation (i have implemented one or two parts this way, without using any info from any picture) and display it with OpenGL.
I do not need any information about boundaries actually other than hit testing, so i thought i could retrieve those boundaries(using edge detection algorithms) from the picture directly and display the picture as the view.(In data preparation stage, for example, when i click Canada, i will generate the boundary data and define it as Canada and write to a file (perhaps with some processing to reduce number of points) to read it later for hit testing.)
Note that in the picture, boundaries are clearly given.
Thanks.
Bekir.
|
|
|
|
|
Way too little information to make a decent recommendation. If the area under the different regions have similiar features, look into doing some kind of connected component analysis.
Quran
Lectures (updated 1/3/06)
"They are MUSLIM. It does not matter how you split it up: all msulims (so they say) see every other muslim as a brother, regardless of origin or nationality." -legalAlien. Alhamdullah for the blessing of Islam
|
|
|
|
|
I suggest brute-force and pig-ignorance. It's not pretty, but it always works for me!
Assuming the map is static (because the countries / areas don't change) you could colour a bitmap image of the map offline, using some graphics package, so that all countries use different colours. If you use 24-bit colours, the difference could be in a single LSbit, which would un-noticeable.
Then display the map as a bitmap image. When you click on a point, get the colour under the cursor, and match that to the country, in order to get country-specific information. To change the colour you could (using brute force) loop through all the pixels in a copy of your original bitmap, replacing all pixels of the matching colour with a new colour, then display the updated bitmap.
|
|
|
|
|
Thanks for the suggestion,
I think that is quite practical, i will try to implement the way you suggested.
Thanks to all replies.
Bekir.
|
|
|
|
|
Great!
It's a lot easier to use the brute force approach and get the computer to work hard, rather than to have to learn how to implement complicated edge-detection algorithms.
Of course, if the map changes frequently, my suggestion would not be useful.
|
|
|
|
|
I want my MFC application will check whether another instance of it is already running or not. And if another inst. is running then it will kill the prev process. I want to know how get the information whether another instance is running and not? and how to get the process id of that one?
|
|
|
|
|
|
|
I have a multiple desktop application in which I am trying to set a different wall paper when you switch between different desktops. I am setting the wallpaper as:
<br />
SystemParametersInfo(SPI_SETDESKWALLPAPER,0,(void*)m_WallPaper,SPIF_UPDATEINIFILE|SPIF_SENDWININICHANGE)<br />
This seems to set the wall paper correctly, but after I call SwitchDesktop the wall paper vanishes a few seconds later. I create a seperate explorer.exe per desktop.
1. Does any one know if there is any other way to set the wall paper?
2. Is it possible to identify what causes the wall paper to change? I mean, who has changed it?
3. Is the wall paper set by the system or windows explorer?
4. Any ideas to debug why the wall paper vanishes?
thanks!
|
|
|
|
|
Brundiez wrote: SystemParametersInfo(SPI_SETDESKWALLPAPER,0,(void*)m_WallPaper,SPIF_UPDATEINIFILE|SPIF_SENDWININICHANGE)
This won't work when ActiveDesktop is enabled. You need to use IActiveDesktop COM object to solve this.
http://www.codeproject.com/tools/wallpaperq.asp[^]
Jesus Lives Forever - Amen <marquee direction="up" height="40" scrolldelay="10" step=".5" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner drawn
--An eye for an eye makes the whole world blind.
--If you find my post helpful then do rate it.
--Jesus is Lord
|
|
|
|
|
1. From the look of my desktop, I dont think I have ActiveDesktop enabled. How do I confirm if it is enabled?
2. Does the IActiveDesktop COM object's way of setting the wall paper help in both the cases - ActiveDesktop is enabled and disabled?
3. FYI, I downloaded Virtual Desktop manager from http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx. I can change the wall paper in a desktop, but when I switch between desktop it doesnt seem remember and restore the wall paper that I changed. Have you used this, any idea why it doesnt work, is it a bug?
thanks!
|
|
|
|
|
convert char[] to cstring
Thanks in Advance
|
|
|
|
|