|
Hi together,
is it somehow possible to get the current type of the mouse cursor?
I'd like to check whether the current cursor is the context help cursor (IDC_HELP) or not.
However, I have no idea how to accomplish that
Thank you very much for your help,
Marcus.
|
|
|
|
|
GetCursor() or GetCursorInfo()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi Ryan,
thank you very much for your hint. I got it working! However, for me it wasn't that straightforward to get it run. If anybody is interested in the solution, here it is:
HCURSOR hHelpCursor = LoadCursor(NULL, IDC_HELP);
CURSORINFO ci;
ci.cbSize = sizeof(ci);
if(GetCursorInfo(&ci))
{
if(ci.hCursor == hHelpCursor)
cout << "Context help cursor active!" << endl;
} Any hints for improvement are welcome!
Thanks again,
Marcus.
|
|
|
|
|
khb wrote: Any hints for improvement are welcome!
It's exactly what I'd do
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How to check the CListCtrl's column resize cursor. I don't know that resource id.
|
|
|
|
|
I have a dll file written by MFC6.0. Now, I want to use it in MFC8.0, but I don't know how to import it to my project MFC8.0.
Can anyone help me?
|
|
|
|
|
Does LoadLibrary help?
Nibu thomas
Software Developer
|
|
|
|
|
<br />
int bignum = 123123425364347456758696679;<br />
The compiler says: intger to big for int type (or something like that)
How do i make the bignum work? (i'm guessing this is a simple question soooo be gentle )
|
|
|
|
|
Try __int64
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 even close to being large enough. The largest value for __int64 is 263, or 264 if unsigned.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
The pattern of his number indicated to me that he had just semi-randomly typed them to indicate he needed something larger than an int.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
As he was not very specific, that's always a possibility.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
_int64
Does that mean a int thats 64 numbers long or is that defined the standard library?
nevermind........ 2 to the power or 64. I see.
Is LARGE_INTEGER in the standard library too? <--- is that C style programming?
"If you try to talk sense to a fool, he'll think your foolish"
-- modified at 14:06 Wednesday 26th April, 2006
|
|
|
|
|
__int64 is 64-bits long. I assumed you had simply typed gibberish indicating you needed a long number. If, however, the number you typed earlier (123123425364347456758696679) actually needs to be stored, __int64 isn't long enough.
LARGE_INTEGER is a Win32 thing, but it may be defined by other headers.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
you could also use LARGE_INTEGER
|
|
|
|
|
Which also has the same 263 limitation as __int64 .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Thanks for pointing that out Mr Crow. Though might I say, it has taken you two replies to say that those of us who are trying to help the OP are wrong. But you have yet to suggest an answer yourself.
|
|
|
|
|
waldermort wrote: But you have yet to suggest an answer yourself.
To suggest a way not to do something is in itself an answer. On a similar note, by eliminating all the wrong/incorrect ways of doing something, what we should be left with is the correct way. This was a philosophy used by Thomas Edison.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
waldermort wrote: Though might I say, it has taken you two replies to say that those of us who are trying to help the OP are wrong. But you have yet to suggest an answer yourself.
childish...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
You'll need to use something like the DECIMAL data type, which supports 296. If that is not an option, the only other thing I can think of is to store it as a string. I created a class once that did this, and it had basic math operations (+, -, /, *, !) so you could add, subtract, divide, etc very large numbers.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
The bigger question would be "what are you trying to accomplish?" In other words, do you need to simply store the digits or mathematically manipulate them? If the latter, do you really need a number this big?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
The reason is if i were to create a program that reqiures a digit password. But the password would be huge number (harder to figure out).
Or is this a bad way to make a password number?
Thanks for the answers everybody!!!
"If you try to talk sense to a fool, he'll think your foolish"
-- modified at 14:33 Wednesday 26th April, 2006
|
|
|
|
|
My gut feeling is that it's a terrible idea. Beyond that, an __int64 would be sufficient or simply a random string.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
If you need a large numeric password then the better way to do it is store it as a string a restrict its contents to characters from '0' to '9'. This password can be arbitrarily long if stored as a string.
You would only need it to be represented as an integer if you needed arithmetic or mathematical manipulations. Note that checking if the password is correct does not need mathematics, a simple strcmp() will do the trick.
Anyway, if you needed to represent as an integer that fits in 64 bits, then I would sugest _int64 instead of LARGE_INTEGER. The _int64 is a compiler feature, and LARGE_INTEGER is a Windows feature. I would always prefer the compiler feature, for the implementation to be as platform independent as possible. If you need manipulation as an integer and it it larger than 64 bits, then I would sugest you created a class for that.
Rilhas
|
|
|
|