|
|
Under several circumstances that will fail. The only reliable way of tracking when the mouse button is released is by capturing in on the down message.
One failure point is if you have an overlapping window or the user very quickly drags the mouse to another application.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Not quite sure what ya mean. It seems to work fine here when I drag the mouse out of the window? And I don't see how overlapping windows could occur?
|
|
|
|
|
Windows is message driven so using a loop to monitor where the mouse is is self-defeating. You incur a performance penalty for no reason.
If you simply need to know when a mouse leaves a window, use TrackMouseEvent with the TME_LEAVE option.
If you are monitoring the mouse with the button down, the prescribed method is to use mouse capture so that the mouse message will be sent to that window.
As for overlapping windows; this is windows. Unless you have taken over the screen, there are all sorts of overlapping windows present. Your app is guaranteed to receive mouse messages only if you are capturing the mouse with the button down. (What if an other app pops up over the window which you are monitoring?)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi!
I've started to write an Activex, in the Appwizard I have unchecked the option "visible at runtime". Now, (I few days later), I have realized that I need the activex visible at runtime.
How could I go back an change this option without starting a new Activex project?.
Thank you.
Demian.
|
|
|
|
|
Go ahead and create a new, temporary project with that option checked. Now compare the settings between the two projects.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hey,
I'm trying to read Integers from a binary data file. I've been using the CArchive Read(char[],int) function, then converting the byte using CString Format("%X",char[i]).
I'm testing all the values against a HEXeditor, and things work well, but when the byte i read has a 1 in the lefternmost position, the value that my char array holds is the 2's complement for that value.
EX. when it reads "B3"(1011 0011) from the file, my value at char[i] == "4D" (0100 1101)
A. why is this happening?
and ...
B. is there someway i can zap it back to the original number?
Thanks a lot,
Mike
"I bet Einstein turned himself all sorts of colors before he invented the light bulb." -- Homer J.
|
|
|
|
|
just a guess, but could it be a signed/unsigned conflict.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
If the values were written to disk as char , they need to be read as char . If they were written to disk as int , they need to be read as int .
Consider the following:
CFile file(..., CFile::modeCreate | CFile::modeWrite);
int nAge = 42;
file.Write(&nAge, sizeof(int));
file.Close(); The file contains 4 bytes that look like 0x2a000000. To read that same value back in, I'd use:
file.Open(..., CFile::modeRead);
file.Read(&nAge, sizeof(int));
file.Close(); The variable nAge contains the value 42. Had I used this instead:
file.Open(..., CFile::modeRead);
char str[4];
file.Read(str, sizeof(char) * 4);
file.Close(); The variable str contains the value 0x0000002a. I think the big/little endian concept might be messing you up. PJ's suggestion is plausible, too.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
is there a way to make them fullscreen when you open them?
|
|
|
|
|
I'm trying to Navigate a web browser ctrl to a url that uses basic HTTP authentication (username, pwd) without having the user to wait for the IE username/pwd dialog. Is there any way to package this info along with the request? I'm guessing I need to somehow pass this info in the Headers arg.
I'd be grateful for any pointers to code snippets or examples. Thanks!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
i think thats being depracated or default not-allowed in the new sp2 for xp so u might want to check that out before commiting to that solution
"there is no spoon" biz stuff about me
|
|
|
|
|
Thanks, Lauren.
More evidence that Ravi shouldn't boot up his PC before caffeination: just Navigate2 to http://user:password@host:port .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Wow, I knew that username and password could be specified in a ftp:// link, but I did not realize it could be used with http:// too. Thanks!
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
My c++ program when run on a different machine asks for MSVCP60.DLL which doesnt seem to be present on that machine. From my initial search I found that I will need this DLL if I use STL. I then removed all the STL references from my program but I still get the error. Does C++ 'string' require this DLL? Any other pointers?
Thanks.
|
|
|
|
|
string is STL too
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
You need this dll if you use Standard Library (anything from the std namespace) AND you link your libraries dinamically.
|
|
|
|
|
Hint: link statically to all libraries, and you should be OK.
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
Open the visual studio .NET command prompt (or open a new command propmt and run vcvars32.bat for VC6). Navigate to the directory that your binary is in and run:
dumpbin /DEPENDENTS <your_binary>
Alternatively you could just run dependency walker
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
any idea why this DLL is not present in a windows OS by default?
is there a way to detect from my EXE if this dll is present and show a meaningful message?
|
|
|
|
|
Because it's distributed with visual studio.
When you are preparing to distribute applications check the dependencies first. Your development PC should have all the required DLL's on it, which you can put in the same directory as your executable. You will however have to check the licensing conditions of the DLL's if you need to include them in software which will be sold.
For this reason it's important to always test software on a 'clean' machine that doesn't have visual studio installed.
Showing a meaningful message is a little more difficult - AFAIK you would actually have to load the DLL at run time rather than relying upon explicit linking. I would recommend against this, a proper testing procedure should remove the need for this type of message.
Good Luck!
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Just one last question in this thread (I have created a new thread for a related question).
Since STL is all templates, it should all be replaced inline in the code(not exactly, but kind of equivalent). So where does the question of having a seperate DLL for STL come into picture?
Thanks.
|
|
|
|
|
Don't quote me, but from what I can remember the largest part of of the STL that is in a separate DLL are the IOStream classes. Yes, you're correct the majority of the STL is contained in header files.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|