|
Don't forget to zeroinit the structure.
How low can you go ? (MS rant)
|
|
|
|
|
Already tried that, didn't work thanks anyway man.
|
|
|
|
|
Hi !!
I like to develop application in VC++ to send email. But i neither want to use MAPI nor I want to use any SMTP server. There are excellent articles here by PJ Naughter to send maill using MAPI and without using MAPI. But i want my application not to use any SMTP server and I want it to send mail directly. I hope that it is possible if one is connected to internet. Is there any sample application you aware of present somewhere ????
|
|
|
|
|
Read the RFC's 821, 822 and 2045[^] .
Connect to the outside mailhost and communicate directly with it via TCP/IP using WinSock 2.
This can be done using telnet, by hand, if you know what you're doing
BTW, you will eventually use an SMTP or other type of mail server, just closer to your email destination.
"The greatest danger to humanity is humanity without an open mind." - Ian Mariano
http://www.ian-space.com/
|
|
|
|
|
I'm not following you. You can write your own class or application to send mail, but you're gonna have to connect to some kind of a mail server at some point. To my knowledge, the only way to NOT use an SMTP server (or other kind of mail server, as most internet mail is SMTP) is to be your own smtp server and become registered as such.
Why do you not want to use an SMTP server? You can write a class which talks directly to your outgoing mail server (just like every other email client in the world) with not too much work communicating directly with the CSocket class.
Paul Oss
|
|
|
|
|
He might be trying to get around the problem that many ISPs require you to be connected to them in order to use their SMTP server. It's not sufficient to just supply a username and password.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
He might be trying to get around the problem that many ISPs require you to be connected to them in order to use their SMTP server. It's not sufficient to just supply a username and password.
You're talking about the relaying issue, I assume. Yeah, it seems like trying to hit a finishing nail in with a sledgehammer to void using SMTP servers to deliver email.
Paul
|
|
|
|
|
"Sending mail directly" means talking to the recipient's SMTP server, so there's no way around the SMTP protocol.
|
|
|
|
|
Greetings,
I have modified the icon file for my program (res\myprog.ico) but I am still getting that old MFC "3 cubes" icon displayed in the title bar and as the icon for the executable file in Explorer. Is there some secret trick to getting that new icon used?
Oddly, if I right-click on the executable's icon in Windows Explorer and bring up the properties dialog, the new icon is displayed, so I obviously did something right. Just not enough.
Can some kind soul please point out the steps to fix this?
Thanks!
|
|
|
|
|
Heh, I remember this happened to me when I wrote my first MFC program. Ah, the old days...
Anyway, there are two common sizes of icons displayed. 16x16 pixels and 32x32 pixels. You have apparently changed only one of them, which is the reason why you see the updated one in the properties dialog box and the old on in the explorer view.
There is a small drop down right above the space where you edit your icon when you have it open, labelled "Device". Select the size you want from there and edit it. You can even insert icons of new sizes by clicking on the small "New Device Image" icon next to the drop down. Save and build, and lo and behold, your new icon shows up now.
Regards,
Rohit Sinha
|
|
|
|
|
Bless you!
That did it! Jeez! Once you told me the secret, it took me all of 60 seconds to fix it.
Thank you very much!
|
|
|
|
|
Icons come in different sizes (32x32, 16x16, etc.) and color depths (16 colors, 256, ...). Windows picks which one to display based upon what's needed. You need to make sure you change all of the versions in your resource.
Software Zen: delete this;
|
|
|
|
|
|
Hi All,
I've got a CFormView derived class which needs to provide tooltips for it's controls. Some of the controls are placed on the form through the resource editor, but some of the controls are created dynamically, in the OnInitialUpdate of the view. I've got a member function which is capturing the TTN_NEEDTEXT notification in my view. But, this only seems to work for the controls that were placed on the form with the resource editor. If I place the mouse over one of the dynamically created controls, I don't get a notification for the tool tip.
Anyone have any guessees as to what I might be doing wrong?
Thanks,
Aaron
|
|
|
|
|
Did you set the SS_NOTIFY style when creating these dynamic controls?
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
SS_NOTIFY? What's that? I can't find that style in MSDN.
What I've got is the MFC wrapper class for a home grown control. I am creating it like this, in a member function of my CFormView derived class:
CHEditDouble* CGraphView::CreateHEdit(const RECT& rc, const UINT& nID)
{
DWORD dwStyle = WS_VISIBLE|WS_CHILDWINDOW|WS_CLIPCHILDREN|WS_TABSTOP|ES_LEFT|ES_AUTOHSCROLL;
DWORD dwExStyle = WS_EX_LEFT|WS_EX_LTRREADING|WS_EX_RIGHTSCROLLBAR|WS_EX_NOPARENTNOTIFY|WS_EX_CLIENTEDGE;
CHEditDouble* pHEditDouble = new CHEditDouble();
ASSERT(pHEditDouble != NULL);
(void)pHEditDouble->Create("Edit", dwStyle, rc, this, nID);
return pHEditDouble;
}
I'm not sure how to see what the system does with this same control when it creates them from a dialog ersource, something must be different.
|
|
|
|
|
The SS_NOTIFY style is not welll documented in MSDN at all. If you do a search and not use the index it should turn up some references.
I use the TT_NEEDTEXT on formviews/floating windows. In the floating ones I create the controls like this:
m_LeakSensors[0].Create("?", WS_CHILD | WS_VISIBLE | SS_NOTIFY | WS_CLIPSIBLINGS, CRect(0, 0, 15, 15), this, IDC_LLEAK_SENSOR1) ;
This makes the tooltip work for that control as long as I map the correct control ID in the onTTNeedText function.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Well, that doesn't seem to make any difference. I tried adding the style, and nothing happened. There must be something else I'm not doing right.
|
|
|
|
|
This is a complete guess, but do you call EnableToolTips() before or after creating the dynamic controls?
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Well, they are created after the EnableToolTips call. It's a good guess, though.
|
|
|
|
|
It looks like it has nothing to do with the way I am creating the controls after all. I tried doing the exact same thing in another project, a simple dialog app, with the same dynamically created control, and it works fine.
I am putting the created controls inside a frame. I think this is messing things up. If I move the frame so it's around some of the controls and not others, then the ones out of the frame get the TTN's, and the ones in it don't.
But I don't want to get rid of the frames, cuz the make the dialog look pertty. Now what? DOes this mean the frame is on top of the controls? Both the frmae and the controls are direct children of the form.
Now I'm confused . . .
|
|
|
|
|
How can I start application, which name is starting from "home" using ShellExecuteEx()?
If I try to run "homesite5" it brings me an IE window with "homesite5" as an url. It does the same for all names, starting from "home". It isn't depends of such file existance and availability via %PATH%.
And as I found, "Start"->"Run..." acts the same way. Just type "home<something>" there...
p.s. I'm using win2k sp2. win98 seems to have the same bug (or feature?)
With the best regards, Vitaly.
|
|
|
|
|
i had never noticed this before.. it seems your best bet is to put it in quotes with an absolute path.. like "c:\homesite5.exe"
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
quotes will not help...
absolute path will, but i don't know it. the reason I'm using ShellExecuteEx() is cause I need to start different apps knows only their names not paths. winword, notepad etc...
With the best regards, Vitaly.
|
|
|
|
|
There are registry keys for installed apps : hklm/software/microsoft/windows/currentversion/app paths
How low can you go ? (MS rant)
|
|
|
|