|
Several articles here
http://www.codeproject.com/string/#Text+Conversion[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
renjith_sree wrote:
i just need a conversion like if i give 1200.25
the class must give a CString like
One Thousand Two hundred and twenty five..
I'm a bit confused. Wouldn't "One Thousand Two hundred and twenty five" be represented as 1225, or should the text read "One Thousand Two hundred dollars and twenty five cents" (assuming American currency here)?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I have been trying to get a simple Client/Server application running using the TAO Corba, but having building and then running problems.
Are they any simple
(Get you Started) examples for Visual Studio .Net out there.
I have found some examples on the web, but either cant get them built or dont run.
Thanks.
|
|
|
|
|
Hi!
I have this problem with vc++ 6, under windows XP:
Wher running my application (is a Dll!!) on Debug mode running ,in release mode don't work. The same application under windows 2000 don't have problem!!!
You know this problem?????
Tank's all!!
Hi! I'm very happy to talk with everybody about VC++.
|
|
|
|
|
The devil is in the details.
Your "application" is a DLL.
But you cannot simply run a DLL.
How is it run? Is it a com server, a DLL for
an EXE you've written?
How is it not running? Is it never being used?
That may be a security thing.
Does it start to run, then dies horrible?
Pepper your code with OutputDebugString (...) and look at DebugMon(?) on sysinternals[^].
etc.
|
|
|
|
|
Of course!
I have a EXE application that call a DLL!
Are two different applications.
The DLL application code when goes in execution i receive a message that "The memory cannot read".
Now, the same code under windows 2000 works without problem!
Tank's you!
Hi! I'm very happy to talk with everybody about VC++.
|
|
|
|
|
I would put a lot of OutputDebbugString s in your code, and run Dbgview from www.sysinternals.com[^].
That may help track down the problem.
It is likely to be bad initialisation.
In Debug mode, uninitialised memory gets filled with 0xCD [*], but its filled with NULL in release mode.
So they do behave subtly differently.
Iain.
[*] I'm not 100% sure of the value, but its close.
|
|
|
|
|
Hi Ian!
Tank's you for your disponibility. I have found a solution, but not the problem! I have try to create a new exe and i'have call a part of code.
Now running! I belive that part of the source code are written with "the feet" (sorry for my expression but in my country we say!!). Now i must found the different code from the first application and the new application.
I hope to talk with you again.
Patrizio.
Hi! I'm very happy to talk with everybody about VC++.
|
|
|
|
|
Iain Clarke wrote:
In Debug mode, uninitialised memory gets filled with 0xCD [*], but its filled with NULL in release mode.
No, in release mode uninitialised memory is undetermined. It can be anything that was at that memory location previously. For this reason you should always initialise memory within your applications.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Turning brain on, you're right.
If its any consolation, I don't trust uninitialised data anyway, so I haven't been caught
but my own misinformation. Hopefully other people ignore me too!
Iain.
|
|
|
|
|
Hey, im trying to write some C++ code that will monitor when a certain usb device is plugged in/ plugged out. I've been on the MSDN website and good idea of what i need to do. However, I'm having trouble with RegisterDeviceNotification. The RegisterDeviceNotification is always returning NULL. I would very much appreciate if someone could point out where ive gone wrong with this code:
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <dbt.h>
#include <setupapi.h>
int main()
{
bool result;
HWND hWnd;
char szMsg[80];
GUID InterFaceClassGuid;
void **hDevNotify=NULL;
//CLASSGUID FOR USB DEVICE
InterFaceClassGuid.Data1 = 0x8D948EE9;
InterFaceClassGuid.Data2 = 0xD0AA;
InterFaceClassGuid.Data3 = 0x4A12;
InterFaceClassGuid.Data4[0] = 0x9D;
InterFaceClassGuid.Data4[1] = 0x9A;
InterFaceClassGuid.Data4[2] = 0x9C;
InterFaceClassGuid.Data4[3] = 0xC5;
InterFaceClassGuid.Data4[4] = 0xDE;
InterFaceClassGuid.Data4[5] = 0x36;
InterFaceClassGuid.Data4[6] = 0x19;
InterFaceClassGuid.Data4[7] = 0x9B;
DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
NotificationFilter.dbcc_devicetype= DBT_DEVTYP_DEVICEINTERFACE;
NotificationFilter.dbcc_classguid = InterFaceClassGuid;
hDevNotify=(void**)RegisterDeviceNotification(hWnd,&NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);
if (!hDevNotify)
{
printf("RegisterDeviceNotification failure: %d\n", GetLastError() );
MessageBox(hWnd, szMsg, "ResisterDeviceNotification", MB_OK);
result= false;
}
result= true;
return 0;
}
Thanks
|
|
|
|
|
Hi
The first parameter to RegisterDeviceNotification wants a valid window handle to where a WM_DEVICECHANGE message will be sent - if that's all the code you have, this window is invalid.
HTH
Martin
|
|
|
|
|
I found various articles about creating and sending emails and about sending attachments.
However I need something simpler: I have an email address and want the resident mail system to create an email with the normal user interaction, i.e. my contribution is only waking the mail service and supplying the address.
It has to be in C++, dialog-oriented (non-SDI, non-MDI).
|
|
|
|
|
Have a look at Articles on MAPI. You can't guarantee that a MAPI client is available however.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Thanks, but my program does not have the message content to send.
In fact, I have only an email address in my hand.
|
|
|
|
|
The simpliest way is to use the ShellExecute() function, specifying the email address in the lpFile parameter
ShellExecute (NULL, "open", "mailto:who@where.ever", NULL, NULL, SW_SHOW); You can also specify the subject, cc, and bcc in the lpFile parameter
ShellExecute(NULL, "open", "mailto:who@where.ever&cc=you@them.org&bcc=them@you.org&subject=hello", NULL, NULL, SW_SHOW); If you want to add text or attachments then have a look at SIMPLE MAPI
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Thank you; this is obviously the simplest solution.
Exactly, what I needed in this situation.
One remark: the show comman flag (SW_SHOW, or whatever else) has no effect in this case.
The documentation states, that it is only for the case, then an executable file is specified.
I tested it with "mailto", and it makes no difference.
|
|
|
|
|
I'm quite partial to this. A good place to start, at least.
You left me high and dry and changed me
You lied to me and now i’m angry...
|
|
|
|
|
It appears to be an elegant solution, but it shoots a magnitude farther than I can use in the given context.
Thanks anyway.
|
|
|
|
|
Hi,
I am seeing "mouse up" messages disappear in the main event loop of my app and wondered if anyone's seen this problem before or has an idea what's going on?
Details:
The app has a custom event loop which gives time to some OpenGL display code and I have used PeekMessage with PM_NOREMOVE to see when there is a "mouse up" message in the queue. What I have found is that the calls to PreTranslateMessage and DispatchMessage can cause the "mouse up" message to vanish from the queue.
Summary of event loop for reference:
while(!quit)
{
while(::PeekMessage(&msgCur, NULL, NULL, NULL, PM_REMOVE))
{
if(!PreTranslate(&msgCur))
{
::TranslateMessage(&msgCur);
::DispatchMessage(&msgCur);
}
}
}
Any help appreciated.
Rob.
|
|
|
|
|
Hello.
I'm new in C++ Programming and want to write an application wich is able to process Bitmap files.
I try to use the MFC to get a Windows program.
I have a big Problem with my variables:
So I have a file called CADoc which loads the Bitmap in memory, a CAView which shows it in a Window and a CACutBmp (a modal Window) where the user should be able to give the top left corner and width amd height of the area he wants to process to cut a rectangle out of the bitmap.
CACutBmp is started in the CADoc file... so an Object of CACutBmp is builded and the source Data is given to the modal Window... But if i want to cut the Window it must be possible to give the data back to the CADoc Class...
Thats my problem. I dont find a way to do so.
Can somebody here explain me how to use global variables properly in a MFC Based Application ?
Is there a better way then global variables to pass Data from one Class to another ?
Excuse me if the question is unclear or too noobish, but i would really appreciate any suggestions to get this problem solved.
Best regards,
Crypt.
|
|
|
|
|
I just went through a similar problem.
Do an artical search for "sendmessage". The first artical listed is very good on how to use send and post message between classes, as well as using pointers for other classes.
Hope this helps
John
|
|
|
|
|
Hi John.
Thank you for the fast answer... but I don't find the article you mentioned... can you give me another hind how to find it ...
Helge.
|
|
|
|
|
Cant u pass a structure as a reference to the CACutBmp class from within th doc that the user modifies ?
|
|
|
|
|
Hi act.
Maybe that is what i should do... but i really do not know how to do it... Is it possible to find somewhere an example wich gives some further explanations on the how to ?
Helge.
|
|
|
|