|
Check SuspendThread and ResumeThread
an article
http://www.codeproject.com/threads/pausep.asp
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You might be able to use SuspendThread and then ResumeThread, but I'm not sure if you can do this cross-process. Note that you might have to suspend all the threads of the process, not just the base one.
The only other alternative is to somehow pass a particular message to the app that you have a hook into. When the message is received you would do a sleep or something that doesn't return control till you need it to.
Joel Lucsy
|
|
|
|
|
Hi!
I have inserted an activex control in my Win32 API application, and when i try to compile it, my application doesn't have any errors and it's not visible....
What's wrong?....
|
|
|
|
|
Hi !
Are you sure your ActiveX is well registered and installed (not only added to the C++ compiler)?
I had the same problem when I ran my application on a computer wher the ActiveX was not installed.
Hope it helps!
|
|
|
|
|
Is there anything equivalent to DoEvents of VB in VC++ 6???
Mahesh
|
|
|
|
|
Mahesh Perumal wrote:
Is there anything equivalent to DoEvents of VB in VC++ 6???
I would assume it's along the lines of SendMessage[^].
-Nick Parker
|
|
|
|
|
More along the lines of a non-blocking message loop;
while (::PeekMessage(&msg,NULL,0,0,PM_NOREMOVE))
{
AfxGetThread()->PumpMessage();
}
or similar
Steve S
[This signature space available for rent]
|
|
|
|
|
It doesn't exist, but you can certainly write it:
void DoEvents()
{
for (MSG msg; ::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); )
{
::TranslateMessage(&msg);
::DispatchMessage(&msg);
}
}
Regards,
Alvaro
Quitters never win. Winners never quit. But those who never win and never quit are idiots. -- despair.com
|
|
|
|
|
Thanx a lot.
I have got it working...
|
|
|
|
|
I program by MFC. How to write an application that can open a web site? It is wonderful if I can do that by clicking on a button.
Thank you.
|
|
|
|
|
Look at InternetOpenUrl().
You should save yourself and your company years of grief by shooting yourself through the head immediately. Believe me, in the long run it'll turn out better for everyone. - Tyto (at arstechnica)
Awasu 1.0[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Try something like:
ShellExecute( hWnd, _T("open"), _T("http://www.mywebsite.com/default.htm"), NULL, _T(""), SW_SHOW );
The parameters are described in detail in MSDN.
Dave
|
|
|
|
|
You can use ShellExecute() function with the site address as argument.
|
|
|
|
|
I use MFC to program. I wan't to make an application that can become an icon on taskbar after click on a button.
Thank you!!!
|
|
|
|
|
Call ShowWindow( SW_MINIMIZE ) on your main frame.
Dave
|
|
|
|
|
Hi,
I am using VC++ 6.0 for multile PC's that using the same MS Access database table (DAO). I am encountered with one problem as the following:
- The first user comes in a table looking for a specific record then AddNew() then Update() record on it (if it has been emptied)!
- The next user comes in later (almost at the same time) looking the same one, but instead see it is NOT EMPTY ... it see it still EMPTY then do the same as the first user
- Then I had two different records instead of only one!
*) I tried different approaches to avoid this problem but not success very well (failed every three times)! Here what I did:
1) After AddNew() & Update() ---> I Edit() that record then Update() for the next user using Requiry() for fast ReFresh ... in hopping it now can see that record is done & doing NOTHING!
2) Using another table (only one data) and let the first user set a flag to it ... until it finish Addnew() & Update() record ... delay 1 second then remove that flag. The second user only can get in the same table when that flag is not set!
3) Low approach: Using Token methode (almost same as #2), instaed wrie to a table, the first user writes a simple character to a text file with Exclusive Open, after finish AddNew() & Update() then delay one second ... it will close that file! The second user will wait untill that Token is released in order to do the same and now can use the same table which the first user already complete its task!
I hope someone knowing better ways to let the next user knowing that record is NOT EMPTY (was set by the first user) by some way very fast, or block or any thing else!
It is a desperate request, I appreciate a lot any helps or suggestion here!
Many thanks
|
|
|
|
|
This is a hard question in general. Have you tried specifing any of the options in CDaoRecordset.Open (like dbDenyRead or dbSeeChanges)?
Joel Lucsy
|
|
|
|
|
I am going to draw some polygons with borders and filled with a color. From time to time I have to draw a border around two adjacent polygons.
Any suggestions to algoritms.
I have tried making two regions and combining these but when I draw the frame it makes a frame around the polygons I like to have the border in the edge of the polygons.
thanks a lot
|
|
|
|
|
Maybe I don't understant what you mean, but have you looed at PolyPolygon() ?
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I have tried, but this funktion draws the lines they have in common, i want to draw a border around the new polygon combined polygon.
Thanks anyway
Jørgeen Granbog
|
|
|
|
|
The other way to work is to consider building your polygon in reverse, by clipping out the areas that are not wanted anymore.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I'm guessing the concept of a 2 hour movie showing two guys eating a meal and talking struck them as 'foreign'
Rob Manderson wrote:
|
|
|
|
|
Thanks that might be a good suggestion - I looked for an algorithm. Else I will try to handle it this way.
Thanks for your interest
Jørgen Granborg
|
|
|
|
|
You mean you have two polygons with non 0 intersection
and you'd like the union of those?
Did you use CombineRgn with RGN_OR and then FrameRgn?
Or do you want the smallest single polygon cover? (i.e. no holes)
|
|
|
|
|
Yes 2 polygons with one or 2 adjacent sides.
The problem with Regions is that when I use FrameRgn, I get a Frame around the region, and just want to display the edge.
The problem is that I have som schematic teeths, divided into 5 polygons one center, with four surrounding polygons. You can have a defect in two adjacent polygons og just in one polygon.
When you have it in one polygon you have a frame around the polygon surrounding this polygon with a color inside indication the material the defect is filled with. When the defect extend into two polygons the I want to have a frame around both polygons filled with a color.
I might extend it to the hole teeth.
Thanks for your interest
|
|
|
|
|
is there a public dictionary HTTP service/XML web service?
thanks in advance
Roman Nurik
|
|
|
|