|
You might have better luck using WaitForMultipleObjects (MSDN). Make an array of your thread handles and pass that into WaitForMultipleObjects with the bWaitAll parameter set to TRUE.
That will be cleaner and much easier to debug than working with a Mutex in this case.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
MFC CDatabase and CRecordset (ODBC baby!). but that's because I don't know any better.
I'm one of those stubborn mules who is usually the last on on the bus so don't take my advise but feel free to contemplate it all you want. (Disclaimer for the person who will follow my post with "why not just use ADO?")
-- modified at 15:28 Tuesday 8th August, 2006
|
|
|
|
|
My favourite API for using *ANY* database is OTL.
http://otl.sourceforge.net/
|
|
|
|
|
Hi all
I am doing Win32 based C programming.
How to use _TrackMouseEvent to track mouse movement over a button. ie, I need one signal when mouse moves over the button and another one when it moves away from the button
I am calling _TrackMouseEvent in WM_INITDIALOG message handler...like this
track.cbSize = sizeof(TRACKMOUSEEVENT);
track.dwFlags = TME_HOVER;
track.hwndTrack = handle; // Handle to the Button
track.dwHoverTime = HOVER_DEFAULT;
_TrackMouseEvent(&track);
Then, I am not getting WM_MOUSEHOVER message.
I am not getting how to use these functions.
Any kind of suggestions are welcome..thanks
Manjunath S
Bangalore
|
|
|
|
|
I think the TrackMouseEvent function is to be used only when you receive a WM_MOUSEMOVE message for your button. Therefore try this function in OnMouseMove handler of your button. (I suppose you have to derive your own control from CButton ). After this you should be able to receive WM_MOUSEHOVER and WM_MOUSELEAVE messages inside your button class.
I hope it helps.
|
|
|
|
|
I am trying to create a client that connects to a server on TCP port 80. The connect() is successful. I can also send and receive some packets successfully. After I send a few packets recv() returns error WSAECONNRESET. If I use any port other than port 80 the same problem does not happen. Any ideas on why this could be happening?
|
|
|
|
|
The server is more and likely hanging up on you as you are violating the http protocol. Web servers work best by handling lots of little transactions for many people quickly, if you are debuging it might be timing out on you.
|
|
|
|
|
Thanks for replying. I am not using http web server. It's my own server which listens and accepts connections on port 80!
|
|
|
|
|
lol - well, first, don't use 80.... that port is expected to talk to a web server at the given ip address. I know, I know, it's your machine, but it's bad form .
Now, the part that makes me chuckle is that *your* server is sending this response... Usually, the server is some box out in the network cloud that you have 0 control over. So I'd take a look at what the server is not happy about. I'd guess you are not completely transferring all the data, but it's just a guess.
Charlie Gilley
Will program for food...
Whoever said children were cheaper by the dozen... lied.
My son's PDA is an M249 SAW.
My other son commutes in an M1A2 Abrams
|
|
|
|
|
MS MSDN says that a pattern bitmap brush larger than 8x8 pixels can be created by LOGBRUSH and CreateBrushIndirect on Win98.
My purpose is to fill a rectangle using the pattern brush.
but as I tested, the rectangle is not filled on Win98 because the pattern brush is not created properly.
have u used larger patten brush on Win98?
|
|
|
|
|
includeh10 wrote: My purpose is to fill a rectangle using the pattern brush.
I think you first have to create your pattern brush using CreatePatternBrush function. MSDN says that in Windows 98 brushes can be created from bitmaps larger than 8 by 8 pixels.
|
|
|
|
|
Hi All,
Can anybody tell me the exact "Difference between C++ Structures and C++ Classes".
I came to know that, apart from the access specifier Public(Structures) and Private(Classes) there is no other difference. Is that so?
In that case why do they have 2 difference entities namely Structure and Classes with similar functionality??
Kindly clarify.
|
|
|
|
|
I guess people who created C++ like the name "class".
|
|
|
|
|
Subramaniam s.V. wrote: In that case why do they have 2 difference entities namely Structure and Classes with similar functionality?
'struct' allows for backwards-compatibility with C
edit: what about this deserves a '1' vote?
-- modified at 15:09 Tuesday 8th August, 2006
|
|
|
|
|
Then why class were created?? struct itself is enough ..na?
nave
|
|
|
|
|
but c++ structure can have visibility declarators (public, protected, private), and member functions too..
nave
|
|
|
|
|
that's why i explicitely said C structs , not C++...
|
|
|
|
|
toxcct wrote: that's why i explicitely said C structs, not C++...
So you deliberatly set him on a wrong track?
Not very nice...
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
|
toxcct wrote: are you stupid ?
No. Are you?
toxcct wrote: C is a subset of C++, and you cannot do C++ hiding C totally
Absolutly totaly not.
Out modern C++ is derived from a old version of K&R-C by people with a deep understanding of and a great liking for C.
But C is in no way a subset of C++.
In many cases C++ can be considered a superset of C, but not in all.
And IMHO you really *should* not know too much of C to write good style C++.
toxcct wrote: C structs are different from C++ structs
Yes.
But C-structs were not what we others were talking about, and you were introducing them in a way carefully crafted as to not draw the attention.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: is in no way a subset of C++.
yes it is. Read Bjarne Stroustrup about this.
jhwurmbach wrote: And IMHO you really *should* not know too much of C to write good style C++.
agreed, and i never said the opposite.
jhwurmbach wrote: C-structs were not what we others were talking about
i only talked about them because only introduced their purpose into the C++ language : compatibility
|
|
|
|
|
jhwurmbach wrote: Out modern C++ is derived from a old version of K&R-C...
More specifically, it is a superset of ANSI C, which is, in turn, a superset of K&R C.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote:
[Our modern C++] is a superset of ANSI C, which is, in turn, a superset of K&R C.
Hmm, really?!?
I was under the impression that the C++-Standard predates ANSI-C.
But i am much too lethargic to double-check that.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: I was under the impression that the C++-Standard predates ANSI-C.
I think they are roughly nine years apart. The ANSI C standard was completed in 1989. The ANSI-ISO C++ standard was completed in 1998. The next C++ standard is expected out within the next 3 years.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|