|
How to know that a dialog is completely charged?
because I have an action which lasts few minutes and I want to start it automatically when it dialog is charged.
Thanks a lot..
|
|
|
|
|
What do you mean by completely charged??
Explain
|
|
|
|
|
completely charged : I mean that the dialog appears on the screen.
I tried to add my action in OnInitDialog but the dialog doesn't appear as much as the action isn't finished ..
|
|
|
|
|
if you want the code to run after the dialog appears you could set a timer in the initdialog, or start a second thread.
Michael
|
|
|
|
|
If I understood you, you want to get hold of the very moment the dialog appears on the screen. For what is said in this article, the way to go is having an OnWindowPosChanged() handler like this:
void CYourDialog::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) {
if(lpwndpos->flags & SWP_SHOWWINDOW){
}
CDialog::OnWindowPosChanged(lpwndpos);
} Tell us it this works.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I am trying to send an email through connecting to SMTP Server.
It establishes the connection successfully with the server but when i issue RCPT To:<someone@somedomain.com>
it returns an error with code number 571 and a text "<someone@somedomain.com>....we do not relay!
I could not find this error code within any document related to SMTP Errors.
Does anybody know anything about it?Can you please put some light over me?
I am tearing my hairs!
with greetings from Germany
Özgür
|
|
|
|
|
Sounds like the SMTP server won't let you specify a "FROM" belonging to a different domain. If the SMTP server is smtp.foo.com , it looks like you'll have to be username@foo.com and not username@bar.com .
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I guess they really mean error 551-5.7.1 (RFC2034, RFC1893). 5.7.1 would mean:
5.x.x = permanent failure (retrying won't help)
x.7.x = security or policy status
x.7.1 = delivery not authorized, the sender is not authorized to send to the destination
|
|
|
|
|
Sorry, I may have misled you by my earlier reply. The 571 error code can also be returned when the FROM domain doesn't match that of the SMTP server. This is configurable by the ISP.
Getting back to your problem: try the issuing the RCPT command without relaying information - i.e. use a direct destination of the form user@foo.com instead of @host.com:user@foo.com (which requests that host.com relays the mail to user@foo.com ). Does this help?
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi Ravi,
It does not work...
May be i should consult my netswork administrator..
thanks for your help
|
|
|
|
|
This is definitely an anti-spam measure.
Many SMTP servers are now configured to avoid relaying email from unknown sources to avoid spam and malicious attacks.
The SMTP may server may allow you to log in with a valid account, in which case it would then permit relaying.
Failing that it probably expects the email to originate within its own domain, try setting the reply address to a user on the same domain as the SMTP server.
The following link may be of use:
http://www.mailabuse.org
--
The Obliterator
|
|
|
|
|
Hi,
I am definitly trying to send e-mail through my SMTP Server.
I used nslookup to detect my SMTP Server.
The IP address is like: blabla.somecompany.de
And my email address is like :ozgur@blabla.somecompany.de
and my host name is like : blablacomputer.somecompany.de
more help?
greetings from .de
Özgür
|
|
|
|
|
If the SMTP server resides with an ISP I would ensure you are connecting to their network via that ISP rather an another ISP.
You must use the SMTP server of the ISP you are actually connected with, thus even for somecompany.com you may have to use smtp.btopenworld.com if you connect via BT openworld for example.
If the SMTP server resides within a corporate network, check you are sending the email from within that network.
Short of that I would contact the administrator of the server for help.
You may need to login to SMTP server via secure sockets (STARTTLS) or whatever to actually be granted permission to send email.
Otherwise I would try to locate an alternate SMTP which supports relaying.
--
The Obliterator
|
|
|
|
|
I have no problem obtaining the MAC address of a client, given the IP of the client.
IP Helper API under Windows 2k allow the retrieval of the MAC address given the
IP address.
The question I'm having is, if the IP of the client is not given, and only its MAC address is known. Can Winsock send a packet to the client based on the client's MAC address? Likewise, can the client listen for this packet?
I am currently looking into NDIS for possible solution, but hopefully there is an easier solution than NDIS.
|
|
|
|
|
Hello, the codegurus around the world.;)
I'm not the TCP/IP guru, but when I took the advanced Networking class,
I remember that we need IP address assigned the comp as well as the MAC address of the network interface card if the pakcet arrives to the destination.
IP address is only idenitfication which the packet travels around the world
beyond both the originating network and the terminating network for the packet.
After the packet arrives to the destination LAN, the packet also needs MAC
address of the destination network interface card, I guess.
Actually, I don't remember when the pakcet need MAC address very well.
If someone is TCP/IP guru, he or she will answer this.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Thank you very much for the reply. But correct me if I'm wrong.
When sending TCP with Winsock, doesn't Winsock package the packets with extra headers once it reaches the Link Layer of the OSI model. Actually, at every stage a corresponding header is append to the packet, i.e. IP layer, IP header is added to the packet? Once the packet reaches the Link or Hardware Layer, the system performs an ARP cache lookup to see if the destination IP resolves to a mac address. If it does, the system sends the packet off. If not, it performs a mac address broadcast (ARP lookup) and wait for a reply to who this packet belongs to.
If this is true, then can't we create a raw package with all the correct headers, except the IP address section which is set to NULL and send it off? On each client, have it listen for incoming messages and have it do some packet verification at the Network Card Driver level (NDIS).
I have looked into NDIS, and believe it is the solution to this problem. The only thing I'm not sure of is, upon a TCP/IP send in general, is this packet broadcast or sent directly to the destination? If it is sent directly to the destination, how does it know where to go, without having to go through every other non-destination hosts?
The Internet or Intranet consist of more than one PC. As such, there is no hard wire link from source to destination. Which lead me to believe that at the Link/Hardware level, a broadcast of the packet is perform. And it is the resposibility of the NIC Driver (NDIS) to validate the packet as belonging to that particular system.
Note: This application I'm working on is more than likely reside within an Intranet.
|
|
|
|
|
Sirs,
the below is not an explicite MFC question, and answer would help me anyway.
My hard disk c:\ is partitioned and I would be pleased to get rid of it?
Accidentially, don't you know how?
Thank you for your help in advance.
Bunburry
A subject that is beautiful in itself gives no suggestion to the Artist. It lacks imperfection. (O.Wilde)
|
|
|
|
|
A hard drive cannot be accidentally partitioned. To remove a partition you'll need software like Partition Magic.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Yes, PM allows you to create, size and remove partitions. It is also a boot manager ( I have Windows XP, 2000 and 98 all on one HDD ).
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Well if you're looking into getting rid of it and you have a Win 9x system have you tried "fdisk"? Just thought I would my two cents
Sam C
----
Systems Manager
Hospitality Marketing Associates
|
|
|
|
|
I have no problem obtaining the MAC address of a client, given the IP of the client.
IP Helper API under Windows 2k allow the retrieval of the MAC address given the
IP address.
The question I'm having is, if the IP of the client is not given, and only its MAC address is known. Can Winsock send a packet to the client based on the client's MAC address? Likewise, can the client listen for this packet?
I am currently looking into NDIS for possible solution, but hopefully there is an easier solution than NDIS.
|
|
|
|
|
The only way I am aware of to do MAC to IP would be if you could some how access a routers ARP table...
Probably didn't help any.
Rob
|
|
|
|
|
Sorry for not clearly specifying my problem.
I need to communicate MAC between client and server.
By this I mean, to send a packet from the client to
the server (or vice versa) using ONLY a MAC address.
It seems to me that since the bottom layer of the OSI model
talks ARP, it is evident that Winsock communicate ARP
at a some stage. As such, further investigation leads
me to NDIS. Which is 2 layers below TCP/IP and UDP.
It is at this level that I am hitting the break wall.
Any solution you can offer at either the Winsock level
or the NDIS level would be great.
Thanks in advance for the help.
|
|
|
|
|
Hi all!
I use appWizard to make a dialog base program. the default icon for my program will then be the MFC icon. I have a nice (32 X 32) icon file, and want to use it instead. the problem is when I imported this icon into the resource, the size becomes 16 X 16. This make the picture look very ugly. Besides this problem, was another one. What I did to change the icon was I changed the line:
//m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
with this line bellow:
m_hIcon = AfxGetApp()->LoadIcon(IDI_MY_LOGO);
after doing this, my icon was still not visible. I had to delete the MFC icon from the resource to make mine work.
Can someone please tell me how to change icon the proper way and how to load 32X32 icons
Thank you very much
Vu
vucsuf
|
|
|
|
|
I tend to use the resource editor and clear out the contents of the IDR_MAINFRAME image and then paste my icon into IDR_MAINFRAME. Saves a lot of hassle,
Michael
|
|
|
|