|
Thanks, that helped a lot. I looked at that page and it showed me better ways of starting and ending the thread nicely. I wanted to use a timeout somehow before I knew about the event handles and signals so this solution works out very nicely. Deriving my class from CWinThread would have been overkill because I don't need that much control but knowing I can do that is good to know. I ended up making 3 handles to signals, one to signal a good start from the thread to the main app, one to signal from the main app to the thread to stop, and one last signal to tell the main app the thread finished and it works nicely. Thanks again for the excellent link, Nate.
|
|
|
|
|
Dear Friends,
I want to write an application which monitors all opened TCP/UDP ports on the local computer. Also i want to map those ports to owning applications, in order to determine which process has opened which port. There is an IP Helper API function GetTCPTable() , but it does not tell about the process. In Windows XP there is an undocumented API AllocateAndGetTCPExTableFromStack() which suits my needs. But i also want to support Win2K Operating system.
Please tell me is there any API which can helps me or any suggestion.
Imtiaz
|
|
|
|
|
hi,
how to load an image in the mainframe window's client area in a MDI application.
thanks
Cool Ju
|
|
|
|
|
|
|
Hi
I am working with FormView in SDI VC++ application. On my CForm view, I have many graphs and data displayed on it. I have to save the entire contents that are displayed on the CFormView as it is into .jpg or a .bmp file. Can any one suggest a method to do this.
Thanks
Madhavi
|
|
|
|
|
Draw your graphs and data onto a memory DC. That memory DC has an HBITMAP that can be saved to a file, there are articles on this site that explain how. You can then also BitBlt that memory DC to a control on your form for display.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I have some buttons and list controls on the view. I should be able to save all that is displayed on the form view to bmp or jpeg file, in order words the bmp or jpeg file should just be a snaposhot/printscreen of the CFormView. By using memdc, I can just save the drawings. Can you please suggest a method to do this.
|
|
|
|
|
Thanks for the suggestion.
By using memdc, I can only save all that is drawn using the DC.I have some buttons and list controls on the view. I should be able to save all that is displayed including the controls on the form view to bmp or jpeg file, in order words the bmp or jpeg file should just be a snaposhot/printscreen of the CFormView. Can you please suggest a method to do this.
|
|
|
|
|
Search this site for "Screen capture", there are many articles that cover the topic.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
who has this head file,pls send it to me,thanks a lot!
My E-mail: sfm_rat@163.com
|
|
|
|
|
Sure - let me just whip it up for you.
Seriously, I am concerned how often people ask a question like this.
1. where does this file come from ?
2. don't you realise that a header file is just the beginning of the food chain ? This header will probably need a .cpp file to actually do anything, and more likely is distributed with a .lib file that you'll need to link to in order for your compiled code to actually be able to link to the functionality the header is describing.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
But CG, first error is always blabla.h not found . They will start looking for lib once they find header
"Aerodynamically, the bumble bee shouldn't be able to fly, but the
bumble bee doesn't know it so it goes on flying anyway." - Mary Kay Ash
My Articles
|
|
|
|
|
|
|
I'm trying to write a program in C, which encode an image (ex: *.Jpeg) into DICOM (Digital Imaging and Communications in Medicine) file and decode image data from Dicom file to an visible image, but I donot know the algorithm to do this. Could you tell me about this algorithm. Thanks alot!
Sincerely
Thangnvhl
|
|
|
|
|
DICOM is more than an image, it stores metadata about the image as well. There are specs that are easily found with google, but the fact that several libraries charge between $2000 and $5000 for code to read/write DICOM, I'd imagine a really compliant library is a fairly big job.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks for your reply. I known DICOm is more than an image. But now i'm trying to put an jpeg file into a DICOM file. So i want to know how to do this. Do you know any document which tell about this? Show me please! Thanks!
Sincerely
Thangnvhl
|
|
|
|
|
|
Hi guys, I'm writing a Spell Checker Add-in for Microsoft Word. Does anyone have any hints or tips. Is there any algorithm available or stuff like that?
|
|
|
|
|
erm.... Word comes with a spell checker. Thanks for the laugh tho.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
http://www.codeproject.com/editctrl/SpellEdit.asp[^] has info on using a spell checker in an edit control. It also has a link to a spell checker engine. It may be of some use to you.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Please tell me about source or component for convert video type 3gpp to mpeg1.
|
|
|
|
|
somebody would tell me how to change the CScrollBar control's color?
Thanks!
just do it
|
|
|
|
|
Hi all,
I was hoping for some advice regarding multiple inheritance. In my application I have two interfaces (abstract classes), ICamera and IOrientation. I also have a class C3DCamera, which inherits from both interfaces:
public class ICamera
{
public:
virtual ~ICamera()
{}
virtual ICamera *CreateClone() const = 0;
};
public class IOrientation
{
public:
virtual ~IOrientation()
{}
};
public class C3DCamera : public ICamera, public IOrientation
{
ICamera *CreateClone() const;
}
Now, I need to modify IOrientation's interface by adding a IOrientation *CreateClone() const method, but of course I can't because C3DCamera can't have two methods with the same signature. I was hoping I could dis-ambiguate between the two like you can with interface method implementations in C#, but it seems you can't (right?).
So what I'm looking for is some advice on what the best way to proceed is. I need both interfaces to expose some form of CreateClone() functionality, so that clients can create local copies of classes that implement those interface.
Here are the options I see:
- simply rename the interfaces' methods to CreateICameraClone(), CreateIOrientationClone, etc.
- Use the technique I read about in Item 43 of Effective C++ - create CCamera and COrientation classes that declare pure virtual CreateICameraClone()/CreateIOrientationClone() methods and define a n overrideable default implementation of CreateClone which calls the appropriate pure virtual method
- ????
Option 1 would be the simplest, but seems a little messy to me. Option 2 is the 'recommended approach', I guess, but seems a little forced.
Anyone have any other options, or advice in general?
TIA,
Pete
|
|
|
|