|
so how i pass this argumet in the erase()?
i am getting the whole value of the list in the ClipEntry *pClip which i want to remove.
RemoveClip(ClipEntry *pClip)
|
|
|
|
|
As Stuart said, std::list::remove is the function you should use as it expects a reference to an instance of the type controlled by the container.
In code it should look something like this:
std::list<ClipEntry*> m_Clips;
....
void ClipPlayer::RemoveClip( ClipEntry* pClip )
{
m_Clips.remove( pClip );
}
Is your m_Clips really declared as above? I.e., does it store pointers to ClipEntry s?
If it does, you shouldn't need to write a comparison operator for ClipEntry since std::list::remove() would simply compare the pointers in order to find a match. (Referring to you ongoing discussion with Stuart.)
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
thanks Roger Stoltz for reply
now problem is solved
|
|
|
|
|
You want std::list::remove, not std::list::erase.
m_Clips.remove(*pClip);
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
when i use m_Clips.remove(*pClip);
then i got error
'operator==' not implemented in type 'ClipEntry' for arguments of the same type
while i already implement the operator== like this
bool ClipEntry::operator ==(const ClipEntry &r)
{
if(m_tOffset != r.m_tOffset) return 0;
if(m_pGraph != r.m_pGraph) return 0;
if(m_pSinkFilter != r.m_pSinkFilter) return 0;
if(m_strName != r.m_strName) return 0;
if(m_tStart !=r.m_tStart) return 0;
if(m_tStop != r.m_tStop) return 0;
if(m_bPrimed != r.m_bPrimed) return 0;
return 1;
}
then what should i do for this
|
|
|
|
|
bool ClipEntry::operator ==(const ClipEntry &r)
should be
bool ClipEntry::operator ==(const ClipEntry &r) const
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
thanks Stuart Dootson
now problem is solved
|
|
|
|
|
Hallo! I am desperatly in need of examples of a source code that shows the opc(ole for process control)communication written in c++
modified on Friday, May 8, 2009 3:54 AM
|
|
|
|
|
Hi all,
I have an Application in which i am recovering Images from some devices.
now i want to display these image in vc++ application in such manner that when i recover an image then i save this image in a "Temp" folder, then i need to display this image into any list ctrl and then delete it, again i recover a image i save it it and display it and so on but i dont have any idea how to display image like this .
please help
thanking you
|
|
|
|
|
|
You can use of CImage class for save and display images/you can use of a ImageList for clitctrl for show these images on the list for make a folder you can use of CreateDirectory .
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
Facing a problem friends.... plz help
I have a windows application with several executable and Dll's, and I am trying to make an installer to packge them all together and generate a Setup program.
For this I am using Setup and Deployment project of MSVC 2005. The Installer I am making is working perfectly except It cannot create a desktop shortcut Icon and add a shortcut to the users program menu.
The project has an option to select the short cut, but it only allows you to select the folder where the shorcut is and not the executable file for which you want to make the shortcut
How do I select the executable file for which I want to make adesktop short cut and Icon ?
Thanx in advance
Plz Help
|
|
|
|
|
Ranojay wrote: How do I select the executable file for which I want to make a desktop short cut and Icon ?
By all means click on any such folder, you may see exes and other stuff!
If you can't find any in Application Folder, first select your exes and dlls to File System of Setup project. Then do the following steps.
1. Open File System
2. Select User's Desktop
3. Left click on left pane
4. Click on Create Shortcut ...
5. Look in : File System on Target Machine
you can see some folders listed as
Application Folder
System Folder etc
Click on the folder.
6. Select the EXE for shortcut.
|
|
|
|
|
Thanks a lot friend.....can u be more specific.. I can do the steps u have mentioned but not these steps
5. Look in : File System on Target Machine
you can see some folders listed as
Application Folder
System Folder etc
Click on the folder.
6. Select the EXE for shortcut
In my case, after clicking on the create shortcut ... I see the shortcut and the aproperty window... where I cannot select any file as executable...It only gives you the option to browse through folders. I mean I have the shortcut but how do I make it link to the executable file.
I am using MSVC 2005
thanks again
|
|
|
|
|
Ranojay wrote: I see the shortcut and the aproperty window... where I cannot select any file as executable.
Let me confirm your actions;
You clicked on User's Desktop icon at the left pane/splitter window of File System tab, to pop-up a submenu and clicked on Create Shortcut on User's Desktop. The result was a new entry, named something like Shortcut to User's Desktop on the right pane/splitter. Is that right ?
If so, you just set the Target property of the new shortcut with your desired file name. (No need to specify the folder) - any way am not that much sure about this way. I will give you another fool proof way.
Just click User's Desktop, the right pane might be empty now. Click on the right pane so that you get a pop-menu like the one you seen in the previous steps. Select Create New Shortcut , the result will be a File Open Dialog (Step 5 on previous post) and continue the other steps which I described in previous post.
If this one doesn't worked, tell me your personal e-mail id, I will send the screen shots. (I don't know whether I can upload a zip file to Codeproject)
|
|
|
|
|
It works but ... The Icon cannot launch the executable,
actually I have a "Bin" folder under application folder where I keep the Binaries... I can select the executable from it..but in the runtime it does'nt serve the purpose
and all the file stays even after uninstalltion ... how to deal with that ....
here is my email id sen_ranojay@email.com any suggestion and help invited
thanks a lot
|
|
|
|
|
|
I can Install... I mean I can copy the files and folder on to users system but not prperly.
the system is not working perfectly...
The user icons are not geting created and ...start menu entries are not added properly...
but it surely creates the files and folderd I want to create on users system...
and deletion of the files is also not working... Half working ...half not
what to do ...I need the proper steps for creating an installer prperly
|
|
|
|
|
Hai!
I am having the image data of an JP2 image in a byte array, i want to convert this byte array into JPG image's byte array!!
How can i do it Any Clue or suggestion?
Thanks!
|
|
|
|
|
search for JPEG tag in jp2 image and save that portion as a .jpeg
|
|
|
|
|
Convert the JP2 to a neutral format (I'd read it into a CxImage[^]) then save it to a new file as a JPEG?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
See here[^].
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 )
|
|
|
|
|
In 8 bits bitmap, i learn that it has a color table in the file and the region
of bitmap data are indexes of the array. I want to get a part of image from the
orignal 8 bits bitmap, but i don't know the relation between bitmap data and
color table.
If someone know it, please tell me.
you may send it to my email.my email is: shuhua_song@sina.com
Thank you very much!
|
|
|
|
|
songhunhun wrote: but i don't know the relation between bitmap data and
color table.
Since the bitmap is 8 pixel the maximum color it can represent is 256. so the color map will be holding a list of 256 RGB values.
If we want to display the 0th pixel of a bitmap, will take the value present in the data for 0th pixel( the value will be 0 to 255 ), for instances say 75. This means in the 0th pixel, show the color in 75th index of color table.
|
|
|
|
|