|
I'm trying to find out if there's a way that I can format a number with commas using sprintf() or CString::Format(). I know there's a way I can do it by parsing the string, but I thought there should be some type of format flag for this, but I can't seem to find it. So, returning a float, I'm getting this:
100209.00
but I want
100,209.00
thanks in advance
[insert witty comment here]
bdiamond
|
|
|
|
|
|
thanks!!
[insert witty comment here]
bdiamond
|
|
|
|
|
Hai,
I'm working on win32 vc++.I want to get the mouse coordinates when I click it.
I am wondering how can I do this without using the WM_LBUTTONDOWN...
Do anyone have some ideas...
Thanks a lot in advance...
|
|
|
|
|
Try
BOOL GetCursorPos(LPPOINT lpPoint);
Cheers,
Greg Ellis
|
|
|
|
|
Anttt wrote:
I want to get the mouse coordinates when I click it.
I am wondering how can I do this without using the WM_LBUTTONDOWN
Use WM_LBUTTONUP.
If you don't like that either then i have to ask how you expect to be notified of a mouse button event if you don't want to use the ones provided ?
The only other thing to do is install a hook e.g. SetWindowsHookEx(WH_MOUSE);
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Use GetAsyncKeyState() if you're not willing/able to use window messages to get notified when that happens. Be warned though that you might miss button clicks if you don't check frequently enough, since this function only returns a snapshot of the button state.
|
|
|
|
|
...actually, after reading the documentation, it's possible to determine if the button was pressed since the last call to the function. In other words, it's not only a snapshot you'll get.
Hope that helps.
|
|
|
|
|
Hello,
I have 3rd party Control(.OCX) which is running in VB without any problem.
Now i m using it in MFC. Class Wizard creates wrapper classes for it automatically. Now Problem is when i call a method object.Add(BSTR *,VARIANT*);
i use CComBSTR and CComVariant classes for sending the parameters to this Method. When I run the "Application 0xC0000005: Access Violation" a very bad ERROR message get flashed.for the sake of info that OCX is mcbarmenuv102.ocx i got from MCUNHA's ActiveX 's.
Please Help Me.
|
|
|
|
|
Hi,
There's No Problem With ActiveX.I believe U call The method With wrong data Type.
Try This
BSTR bstrYourstring
VARIANT vYourVariant
object.Add(&bstrYourstring,&vYourVariant)
by
baijumax
|
|
|
|
|
is there a way of do this:
example:
#define IDB_ABOUT 150
Have a string with "IDB_ABOUT" and get a int with value 150 ??
|
|
|
|
|
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number.
what exactly you want to do ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number
yes, i know, but i was looking for a way to use the res: protocol of HTML using the IDB_... instead of the numbers
example:
#2 = Bitmap
istead of
|
|
|
|
|
don't boder yourself... its a stupid question anyway
the soluction for this is probably harder than the use of numbers
|
|
|
|
|
Hello,
You can use a map as an associative array to achieve what you want. Exemple:
<br />
std::map<std::string, int> IDThings;<br />
IDThings["IDB_ABOUT"] = 150; <br />
int nValue = IDThings["IDB_ABOUT"];<br />
Hope this helps..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
what are the types the pair of you map is getting ????
TOXCCT >>> GEII power
|
|
|
|
|
The map is build from key value pairs. In your case the key would be a string and the value an integer declared like this: std::map<std::string, int>Resources;
Hope this helps
<small><i>
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
</i></small>
|
|
|
|
|
Hi,
I have a token (hAccessToken) belonged to a current user:
<br />
::OpenThreadToken(::GetCurrentThread(), TOKEN_QUERY, TRUE, &hAccessToken));<br />
Is it possible to determine whether a user is authenticated in domain or not? How?
Sincerely Yours,
RadioShark
|
|
|
|
|
RadioShark wrote:
Is it possible to determine whether a user is authenticated in domain or not?
Does LogonUser() help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
GetTokenInformation()
then
LookupAccountSid()
There is no spoon.
mail
|
|
|
|
|
Is it possible to use a Spin Control, but instead of incrementing by an integer value (e.g. 1) increment the value in the Edit Box by say 0.1.
Any pointers please.
|
|
|
|
|
don't autobuddy the control to an edit box. just put it with the text box and handle the spin control's events yourself.
[insert witty comment here]
bdiamond
|
|
|
|
|
My desktop application (MFC) will at runtime establish five to ten dynamically created matrices. They will all be of the same size, N x N and be filled with double values. The value of N will vary from run to run, but normally be between 10 and 30.
Some features:
- All matrices are symmetrical
- The diagonal has entries 0.0
- At low values of N it will be 60-70% filled
- There will never be more than 200-300 entries different from 0.0
- Very frequently there will be simple access
- Occasionally there will be inversion and multilication
So, finally to my question. There is ample oportunity to compress memory, but at value of N would you sacrifice the speed of double x = MyMatrix[i][j]to the slower double x = MyMatrix(i,j) with some fancy function? With 512 mB or 1 GB RAM in todays PC's, is there any reason to bother about memory?
Regards Haakon.
A sure cure for seasickness is to sit under a tree.
Spike Milligan
|
|
|
|
|
Hi,
I shouldn't bother about the memory for the following reasons:
- The size of your matrix in bytes will never exceed 4Kb. Therefore it'll fit in one page.
- If you access the block of memory frequently enough, windows won't put the page in virtual memory on the haddisk, leading to zero page faults and better performance.
- if your clients are not stuck on windows 95 machines, you'll be better off not compressing the memory..
Hope my opinion helps you decide what to do...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Thanks
Just what I wanted to hear. Makes my life easier in many ways.
Regards, Haakon S.
A sure cure for seasickness is to sit under a tree.
Spike Milligan
|
|
|
|