|
Does this help?
"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
|
|
|
|
|
I am not trying to draw a button, I am simply trying to load a bitmap on a screen to show them things.
Instead of having 20 variables each with only 1 BMP that it shows, I want to be able to have 3 or 4 and have them be able to switch to different BMPs to load up. However, when I do that and call the ShowWindow(1) function, nothing happens.
|
|
|
|
|
I'm (yes, finally) going to give GMail a try.
Can someone send me an invitation?
Thanks
Warren
|
|
|
|
|
|
toxcct wrote: (i say it explicitely so that you don't receive tons of invitations )
but from where you get his EMail address???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
toxcct wrote: do you see the little [Email] link at the bottom of each post ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
toxcct wrote: do you see the little [Email] link at the bottom of each post ?
But it doesn't contain the Email of that author there
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
toxcct wrote: not anymore, but i sent him mine without anybody can see it
oops you giving invitation to spam.. beware!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Warren D Stevens wrote: Can someone send me an invitation?
there used to be gmail invite forum here! but it no more! so you don't get any email invite frm here!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
This is what I did to download a gif image from codeproject but ::recv will return after about a minute and return 0, can you help me out? I have not posted the whole code but everything goes fine except when it reaches ::recv
sockaddr_in server = {0};
pHostent = ::gethostbyname(_T("www.codeproject.com"));
server.sin_family = AF_INET;
server.sin_port = ::htons(80);
server.sin_addr = *(in_addr *) pHostent->h_addr;
nErrorTest = ::connect(socket, (SOCKADDR *) &server, sizeof(server));
::_stprintf(szSendData, _T("GET /info/stuff/codeproject_w2k_bg.gif\r\n"));
nErrorTest = ::send(socket, szSendData, ::lstrlen(szSendData), 0);
nErrorTest = ::recv(socket, szRecvData, sizeof(szRecvData), 0);
|
|
|
|
|
Asesh wrote: ::_stprintf(szSendData, _T("GET /info/stuff/codeproject_w2k_bg.gif\r\n"));
That is not a valid HTTP request. Try using the WinInet API or the MFC wrappers for it. They will keep you from having to deal with much of the protocol level coding.
|
|
|
|
|
|
Asesh wrote: his is what I did to download a gif image from codeproject
Is URLDownloadToFile() is of any use???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
My application needs to store a float number into to a byte array at the specific location. i.e. at byteArray[0] to byteArray[3] will store that float number. wrote :
byteArray[0] = ((byte*)&floatNumber)[0];
byteArray[1] = ((byte*)&floatNumber)[1];
byteArray[2] = ((byte*)&floatNumber)[2];
byteArray[3] = ((byte*)&floatNumber)[3];
but after write into a file and read back then
cout << (float) byteArray[0] << endl;
doesn't get the correct answer.
How to modify above code???
|
|
|
|
|
union FloatToCharArray {
float f;
char c[4];
};
then, you use it like this :
FloatToCharArray ftc.f = 4.12;
cout << "chars are : " << ftc.c[0] << " " << ftc.c[1] << " " << ftc.c[2] << " " << ftc.c[3];
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I stored ftc.c[0] to byteArray[0];
ftc.c[1] to byteArray[1];
ftc.c[2] to byteArray[2];
ftc.c[3] to byteArray[3];
then output:
cout << (float)byteArray[0] << endl;
doesn't give the correct number.
|
|
|
|
|
of course, it can't work, you are converting only the first char into float, not the 4 chars...
use ftc.f (in my union) to retrieve the float...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
This will work a bit better:
cout << *((float*)*byteArray[0]) << endl;
However, using the union described above, you could write much more clear code:
union FloatWrapper
{
float myFloat;
unsigned char myBytes[4];
};
FloatWrapper someValue;
someValue.myFloat = 1.23;
cout << someValue.myFloat << endl;
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
|
|
|
|
|
Oh you should show the result to us.
union good
www.codeproject.com is a good web for our programer.
I like life and I think it is living.
|
|
|
|
|
I worked on it for 3 months.But i can't write a SMTP server.Any help? Thanks a lot.
Things like that don't last long.
|
|
|
|
|
Well, one could question why you would want to do that. I think you can get tons of SMTP servers (with code), can't you?
Anyway, even so, I think you could start off by telling us what knowledge you already have to contribute to this project. You would need skills on these areas:
1) TCP/IP, as a server, to receive SMTP connections. Possibly, also multithreading, if you want your server to be able to handle several requests simultaneously.
2) Command parsing. For this you would need to investigate the SMTP protocol details. Checkout http://www.ietf.org/rfc/rfc0821.txt[^]. I bet you will find it to be a gigantic task to implement a fully compatible SMTP server. But you could settle for starting small, maybe allowing for plain text (no attach) SMTP, and progress from then on. A good design would be the key for your project to be able to evolve in small steps.
3) Relay protocol (I think it is diferent) to be able to deliver e-mails to the destination.
4) Some form of UI, to configure accounts and things like that.
5) Some form of testing. This could be the simpler task, because you probably have an e-mail client. However, it could be easier to develop your own light-weight client to make sure your test conditions are under control. A network sniffer (like Ethereal) could be used to troubleshoot the software.
Do you feel confident on these topics? If not then I would sugest you start with a simpler project. POP3 is usually simpler than SMTP, and doesn't require relay. And you would act as a client instead of a server. Of course, POP3 is not what you asked for...
I hope this helps,
Rilhas
|
|
|
|
|
I have a SDI application with 2-views. I can flick between the
2-views and there are many edit and check boxes on each view.
Its neat.
If I go to File/New, how can I make the data clear out of there?
Or, is there a way from CMainFrame to get a handle on CForm1 and
CForm2 which are both CFormViews and call the New() which clears
out all that data respectively? I cant figure out any resolution.
I tried lots of different things and nothing is working.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|