|
|
Hi,
this might be a real nebiew question but it would be really nice if you could help me a liitle bit out with that.
I have got a Dialog based App where two dialogs are shown at the same time,
I need to know how to change for example the Value of the Statusbar on Form2 at the time a Button on Form1 is clicked. I hope that you can understand what I want to do. Sorry for my bad english.
I hope you can help me.
sign Jakob W.
|
|
|
|
|
Make use of modeless deialog boxes. I believe MSDN has a sample.
Hope that helps
|
|
|
|
|
GREETINGS
Example: In the OnButton event write
dlgForm2.m_text="LOVE & PEACE to everyone";
1) The header of Form2 Dialog must be included.
2) The member of CdlgForm2 must be created:
CdlgForm2 dlgForm2;
3) dlgForm2 must be attached to existing dialog;
Good Luck!
LOVE & PEACE to everyone
LOVE & PEACE to everyone
|
|
|
|
|
thx.
But what do you mean by dlgform2 must be attached to existing dialog?
sign Jakob W.
|
|
|
|
|
GREETINGS
If you have the second dialog created and it is already on the screen, only creating a new member for it is useless. So you need to attach the member to the dialog. But if you have the member that you used to create the dialog, you should use it without any attachments.
For example:
CdlgForm2 dlgForm2;
dlgForm2.DoModal();
dlgForm2 is now attached to Dialog2. There are different ways how to do it.
Good Luck!
LOVE & PEACE to everyone
LOVE & PEACE to everyone
|
|
|
|
|
GREETINGS
If you have the second dialog created and it is already on the screen, only creating a new member for it is useless. So you need to attach the member to the dialog. But if you have the member that you used to create the dialog, you should use it without any attachments.
For example:
CdlgForm2 dlgForm2;
dlgForm2.DoModal();
dlgForm2 is now attached to Dialog2. There are different ways how to do it.
Good Luck!
LOVE & PEACE to everyone
LOVE & PEACE to everyone
|
|
|
|
|
GREETINGS
If you have the second dialog created and it is already on the screen, only creating a new member for it is useless. So you need to attach the member to the dialog. But if you have the member that you used to create the dialog, you should use it without any attachments.
For example:
CdlgForm2 dlgForm2;
dlgForm2.DoModal();
dlgForm2 is now attached to Dialog2. There are different ways how to do it.
Good Luck!
LOVE & PEACE to everyone
LOVE & PEACE to everyone
|
|
|
|
|
GREETINGS
If you have the second dialog created and it is already on the screen, only creating a new member for it is useless. So you need to attach the member to the dialog. But if you have the member that you used to create the dialog, you should use it without any attachments.
For example:
CdlgForm2 dlgForm2;
dlgForm2.DoModal();
dlgForm2 is now attached to Dialog2. There are different ways how to do it.
Good Luck!
LOVE & PEACE to everyone
LOVE & PEACE to everyone
|
|
|
|
|
<small><br />
void CProfessionClsDlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CDialog::DoDataExchange(pDX);<br />
DDX_Control(pDX, IDC_CATEGORIES, m_Categories);
DDX_Control(pDX, IDC_MAKEGROUPCHOICE, m_MakeGroupChoice);<br />
DDX_Control(pDX, IDC_LINKSKILLTODATABASE, m_LinkSkillToDatabase);<br />
...<br />
}<br />
</small>
It seems that I have a problem with the DoDataExchange during the InitDialog procedure. The program will always crash, no matter how I stack the DDX_Control calls, on the very first call. This really doesn't make sense to me why it would be crashing and that it was working only a few days ago. I have other dialogs in the program that function like it and they work fine which makes me believe that the solution is a rather obscure and simple one.
Thanks for the help.
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
You forgot to post the details of the crash - is it an ASSERT? GPF? The monitor explodes and all files on HD are deleted?
Are you sure that control with id == IDC_CATEGORIES is defined in the dialog template?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
<small><br />
HWND CDataExchange::PrepareCtrl(int nIDC)<br />
{<br />
ASSERT(nIDC != 0);<br />
ASSERT(nIDC != -1);
HWND hWndCtrl;<br />
m_pDlgWnd->GetDlgItem(nIDC, &hWndCtrl);<br />
if (hWndCtrl == NULL)<br />
{<br />
TRACE1("Error: no data exchange control with ID 0x%04X.\n", nIDC);<br />
<big>ASSERT(FALSE); </big> <br />
AfxThrowNotSupportedException();<br />
}<br />
m_hWndLastControl = hWndCtrl;<br />
m_bEditLastControl = FALSE;
ASSERT(hWndCtrl != NULL);
return hWndCtrl;<br />
}<br />
</small>
Actually, it's a bug that causes the dog to eat my homework.
It asserts out on the line I bolded above. I'm going to try and create a new dialog just for kicks and see if that dialog gives me problems.
Thanks for the help.
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
Check nIDC passed to PrepareControl - you may have some #define conflict and symbol that you're using in DDX_Control resolves to number other than used in dialog template resource.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
With a program which has a few DLL projects and one EXE project is it okay to have #define values that are the same between the DLL's and EXE. For example one DLL project has a value for 1000 while another DLL has a value for a 1000, however both are different ID's. Is it wise to make all #defines in
a project different regardless?
Thanks again.
"Why are we hiding from the police, Daddy?"
"We use VI, son. They use Emacs."
|
|
|
|
|
Yes, especially if you plan to create context help someday This also applies to duplicated values mapped to different IDC_xxx inside single DLL or EXE.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
How to develop mailclient application in VC++ which uses pop3 protocol to retrew mails from serverlike MSExchange.
Where i have to create database to usersid and password.
how the application can be done.
Pavan ch.
|
|
|
|
|
How to develop mailclient application in VC++ which uses pop3 protocol to retrew mails from serverlike MSExchange.
Where i have to create database to usersid and password.
how the application can be done.
Pavan ch.
|
|
|
|
|
There's some usefull classes (By PJ Naughter) for playing with POP3 & SMTP :
http://www.codeproject.com/internet/cpop3conn.asp
http://www.codeproject.com/internet/csmtpconn.asp
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com
|
|
|
|
|
How to develop mailclient application in VC++ which uses pop3 protocol to retrew mails from serverlike MSExchange.
Where i have to create database to usersid and password.
how the application can be done.
Pavan ch.
|
|
|
|
|
Hmmm, if I should answer all those questions, I would have to write the program for you.
Search around here at CodeProject, I think there a couple of classes that receives POP3 mail.
If you want to write it yourself, you should start to look at the WinSock functions (which you would use to connect to the mailserver), and then look at the POP3 protocol, so you know what commands to send to the server...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi,all
Has any know how to access remote tape on another machine? My code is as following:
CreateFile("\\\\.\\\\TapeServer\\Tape0",.....);
But it fail, how should I do???????
Thanks.
C
|
|
|
|
|
I've written a program to declare in the window explorer, a new namespace and virtual folders inside.
But i cannot drag & drop a folder or a file from the the left tree view of
the window explorer (items in the disk C for example) to a virtual folder in
my new namespace (still on the left tree view of the window explorer).
The flag SFGAO_DROPTARGET is on for the namespace and also on for each
virtual folders when the IShellFolder::GetAttibutesof() method is called !
Someone can help me ?
Pierre
|
|
|
|
|
you must use the true format, if you can't , you will be failed
|
|
|
|
|
What is the true format ?
|
|
|
|
|
I try to perform actions for the event WM_CHAR but this func not performed.
Why ??????
|
|
|
|