|
I have a second thread in my application, created like this:
Thread* secondThread;<br />
ThreadStart* second = new ThreadStart(this,my_method);<br />
secondThread = new Thread(second);<br />
secondThread->Start();
This thread does not close when I close down the application.
I tried with "Abort".
I guess I need some try-catch, but sot sure how to use it...
tried with this in the generated dispose method...
try{<br />
secondThread->Abort();<br />
}<br />
catch(char* szException){}<br />
components->Dispose;
...this didn´t work.
Any suggestions as to how to close the thread. (doesn´t need to be "proffesional" as I´m just building a test app with really dirty coding...)
Also...is the creation of the thread the "best" way to create a thread (I have seen a couple of different solution, though this was the one that I found easier imediately.
regards,
doneirik
|
|
|
|
|
Try ExitThread or TerminateThread but read the doc before you use it!
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi, I'm not sure if this is the right place to ask such a question, but I couldn't find a DirectX forum.
Is it possible (and how?) to add several audio files to one filter graph which already contains a video file and control their volumes independently?
As far as I understand is the "IBasicAudio Interface" only able to control the entire volume of the graph? I couldn't figure out how to access the DirectSound Interface from the filter graph.
Or do I need to construct a second graph and synchronize the playback of the two graphs?
Any help would be great!!!
Thanks,
Knut
|
|
|
|
|
I need to display two "nested" controls side by side. The main control e.g. CCustWnd constains another CMembWnd control as a member variable. It is not problem to display the main CCustWnd control however I don't know how to display the member control CMembWnd which is created dynamicaly when the main control is created . Probably the member control is clipped by the main control. I played for while with styles without any results. Probably it is not problem to display the member control inside the area of the main control however I need to display the member beside the main control (out of its drawing area) .
Is it possible at all? If so how?
Thanks,
|
|
|
|
|
What parent window are you using when creating the CMembWnd? How are you creating CMembWnd in code?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
The parent window can be either CDialog or another complex control like CGrid control. The main control is usually created dynamically. In the main control CCustWnd::OnCreate method I do the following (simplified):
m_pMemb = new CMembWnd;<br />
m_pMemb>CreateEx(WS_EX_TOOLWINDOW, "xxx", NULL, WS_CHILD | WS_BORDER | WS_VISIBLE, rcWnd, this, 0);
Thanks,
|
|
|
|
|
Is it possible to convert a string to a char?
Or is there a way to do something like this:
strcpy(char str[512], string str2); ?
Any help would be appretiated
|
|
|
|
|
string str;
_tcscpy(c,str.c_str());
suhredayan There is no spoon.
|
|
|
|
|
var.c_str()
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I want to write a MFC program that do the same thing as MATLAB imread() function. That is read in the image file, get the RGB value of each pixel.
Is there efficient library to load the image and get all the pixel values, resize the image, and convert to gray scale?
Or I can do that in MFC?
|
|
|
|
|
MSDN: HBITMAP structure and CBitmap class. (only bitmaps)
Also look on stuff like Image, jpg,... in C++ in google, MSDN, CP, ...
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
there are many libraries to do what you need (there's even a link to one at the bottom of this message). there are some here on CodeProject, too - look in the Bitmaps and Palettes section .
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
how can i get the properties of a window(not created by a user application) by using the Window Handle?
i know the Window Handle....which function to use to get the properties?
regards,
kedar.
|
|
|
|
|
It depends on what properties you're looking for
GetWindowText will give you the name in the titlebar
GetWindowRect and GetClientRect will get size
GetWindowLong can be used the see what styles the window has...
you can enumerate all the child windows with EnumChildWindows
There are lots of things you can do, so maybe you should check the msdn docs
hope this helps
Don't think you are, know you are...
|
|
|
|
|
how to send file with tcp/ip?
|
|
|
|
|
|
See the Reference for TransmitFile in your Local Documentaion
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
How we can get handle to other applications window
please help.
|
|
|
|
|
try using EnumWindows....and the corresponding CALLBACK function ... i think it is EnumWindowProc...
be sure to go thru the MSDN before u use the above mentioned..
|
|
|
|
|
|
|
|
Hi All,
I want to write a program, which could monitor the IP Address which is trying to ping me. For example my system IP is 44.33.22.1 and other systems Ip is 44.33.22.2. If the other system trys to ping me using command
"ping 44.33.22.1" then i should be able to track the IP(44.33.22.2) which pinged me.
Regards,
Prax.
|
|
|
|
|
tgprakash wrote:
I want to write a program, which could monitor the IP Address which is trying to ping me. For example my system IP is 44.33.22.1 and other systems Ip is 44.33.22.2. If the other system trys to ping me using command
"ping 44.33.22.1" then i should be able to track the IP(44.33.22.2) which pinged me.
But how effective it can be, as there are many sites that does the pinging for its users. like :http://www.t1shopper.com/tools/[^].
suhredayan There is no spoon.
|
|
|
|