|
Is there a way that I can create a modeless dialog that stays inside of it's parent frame? I'm trying to create a dialog which keeps the parent active (not modal) and stays within a parent frame (like an MDI child).
-Mark Lenz
|
|
|
|
|
There are a bunch of demos under Dialogs in this web site.. Is this what you're trying to do?
http://www.codeproject.com/dialog/stackdialog.asp
Rob
|
|
|
|
|
No, I don't mean a dialog inside a dialog. I want to be able to have a dialog (or window) which stays within the boundaries of it's parent (the main frame window) but doesn't prevent the user from access controls on the parent. Imagine an MDI application with it's child frames inside of it. They can't leave the boundary of the parent frame, but you can access controls on the main frame and the other child windows. You can resize the child windows and move them around. Can I create a dialog that has the same behavior?
-Mark Lenz
|
|
|
|
|
I understand now.. And thats a good question
I'll do some checking and see if I can come up with something.
Rob
|
|
|
|
|
In Dialog base(MFC) application.
I Create second Dialog (I have Seperate Class for that Dialog) OnInitDialog() through Create(IDD_DLG, this);
So It becomes Modless Dialog.
Problem is that when Second Dialog(Child) when Display it is above of First Dialog(Parent).(as it should be b/c it is Current Focus)
I need when First Dialog(Parent) is Clicked(Focused) it becomes above of Second Dialog (Child).
and when Second Dialog (Child) is Clicked(Focused) it becomes above of First Dialog(Parent).
I try to use SetWindowPos(). But did not work. Like following
SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE);
::SetWindowPos(AfxGetApp()->GetMainWnd()->m_hWnd, HWND_TOPMOST, 0, 0, 0,0, SWP_NOMOVE | SWP_NOSIZE);
I also need to know which event occure when any Dialog get Focus (active). Even Clicked on the System Menu.
WM_PAINT
WM_SETFOCUS
GetFocus
I check all all these messages. They are not
Some code will be helped alot . . .
Thanks in advance.
|
|
|
|
|
You're creating the second as the child of the first. Try making the parent window NULL, or create both dialogs as children of a main dialog, which is not visible.
Use Spy++ to see all the messages sent when a dialog becomes active. I believe the one you want specifically is WM_CAPTURECHANGED
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.
|
|
|
|
|
And How Can I do this. By SetParent(NULL). It does not work.
Thanks for WM_CAPTURECHANGED.
But still I my problem not solve.
I explain further what I need below.
As you know User can active Window By Clicking on the Title Bar of Dialog or My Clicking Dilog box itself(Client area). I need only Single event to monitor this.
Is there any material to use Spy++ (because I do not know effectively it).
Thanks.
|
|
|
|
|
You specify the parent in your Create call. I am using WM_CAPTURECHANGED to do exactly the same thing, and it works every way I can set the focus on my window.
Spy++ isn't hard, you just choose Find Window, select the Window and watch the messages come up.
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.
|
|
|
|
|
Some Code will helped alot.
I am trying my best but could not achieved.
I will try later with Spy++.
Thanks.
|
|
|
|
|
The CDialog Create method takes two parameters:
BOOL Create(
LPCTSTR lpszTemplateName,
CWnd* pParentWnd = NULL );
Because the second defaults to NULL, it may not be getting set otherwise. I create modeless dialogs by putting the following in the constructor
if (Create(pParent, IDD)) ShowWindow(SW_SHOW)
Then I only need to create a dialog like this
CMyDialog dlg(this);
and the pointer to the window class I am in is passed as the parent, preserving the relationship I need to get the window of the child always above the parent.
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.
|
|
|
|
|
Please Check my question.
I need that which Dialog is Active should be Front of Another.
I already checked this but this is not working.
Thanks.
If sample Application(in Zip form) send.
|
|
|
|
|
In that case, the logical thing is to make both windows children of a third window, even if that third window is very small, or hidden.
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.
|
|
|
|
|
Thanks for idea.
I will try it.
|
|
|
|
|
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
|
|
|
|