|
IF you want the data from the second dialog box in the first one:
you can do this:
if(dlg2.DoModal()==IDOK)
{
dlg2.m_myCombo.// Some function to retrieve data from combo box
}
-- modified at 9:03 Tuesday 26th September, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: dlg2.m_myCombo.// Some function to retrieve data from combo box
Not possible, as the combobox no longer exists.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
vc++_fragrance wrote: display another dialogbox with a combo box attached to it.Whenever I clicked on OK button I need to get the data in the first Dialog box.
There are two ways to this in my knowledge:
1) If it's a base/derived relationship you can use GetParent() to get a pointer of the parent class in the derived class and then use it to access the member functions of the parent class and also the member variables depending on their access modifiers.
2) You can create a pointer of the first class(From where you are calling DoModal()) into the second class where you need the contents of the first dialog.
For this:
a) Include the header file of the first dialog in the second.
b) In the public section declare a pointer of the first class.
Like: CMyFirstClass *pFirstClass;
c) Just above the line dlg2.DoModal() you can write dlg2.pFirstClass=this;
d) Now you can access the variables/members/member functions of the first dialog in the second dialog using pFirstClass.
Like: pFirstClass->m_strEdit.GetWindowText(...);
etc....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
if your main class is CMainDlg you can use CMainDlg* m_Main=(CMainDlg*)GetParent(); m_Main->YouCombo();
|
|
|
|
|
How to split the window in following way?
1st row should be divided in 2 columns.
2nd row should be in single column.
|
|
|
|
|
by using CSplitter. If not using MFC then you will have to create your own splitter controls.
|
|
|
|
|
I have used that technique, but whenever i split window in that way it gives some exception.
|
|
|
|
|
First create a splitter window with two rows (panes). In the top pane, create another splitter window with two columns (panes). If you are using MFC, check out CSplitterWnd .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have used the same technique, but it gives some exception.
|
|
|
|
|
What exception is thrown? I assume you've stepped through your code using the debugger. What has it revealed?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi..
can u plz help me how to create XML file from MFC filed vales and .. How to parse at client..
..swamy
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sir,
I want to learn hardware interfacing .For that before going for coaching I want to know what should I must have learned and what should be the basic language to go for hardware interfacing.and what r the other skills required
to learn hardware interfacing.
please help.
|
|
|
|
|
In Windows NT and up, you will need to develop a driver in order to access the hardware.
So get a copy of the Windows DDK (Driver Development Kit). Read the documentation, and have a close look at the samples.
A suitable laguage for developing drivers is C(++), so you can use VC++.
All driver samples I have seen is written in C. But there may be drivers written in other laguages as well.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Sir,
If u would choose hardware interfacing as ur carrier option .Which language would u choose.
PLease suggest
Thanks.
|
|
|
|
|
IMO, C is the most suitable language to use for creating drivers in Win32.
Take a look at the samples in the DDK, as far as i know, they are all written in C.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I know it doesn't answer your question, but you can do limited hardware access (do I/O port access) without writing a device driver. Do a google search for InpOut32.dll.
Using InpOut32.dll is a lot easier than writing device drivers if you are not doing anything complicated.
Of course it depends what you mean by "hardware interfacing".
|
|
|
|
|
In my MDI aplication all my child window shows system menu option, when i click minimize button it minimized and i can not see the minimized window near status bar it goes somewhere,and when i click restore down button,nothing wil happen,and system menu get disapperaed.
For that i used childfrm.cpp precreatewindow()
cs.style = WS_CHILD | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MINIMIZE;
But no use?Pls help me.
Anu
|
|
|
|
|
I am using Splitter windows, and in that, while using CListView, i want to place 2 checkboxes in 2 different columns. I know how to place single check box, so only answer how to place 2 checkboxes?
|
|
|
|
|
For multiple checkboxes per item, use a control such as this one.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hello everyone. i have problems in connecting to an FTP server.i have written the following lines.
CInternetSession sess("My FTP connection");<br />
CFtpConnection *pConnect = NULL;<br />
try{<br />
pConnect = sess.GetFtpConnection("/*IP address of the FTP server*/");<br />
}catch (CInternetException *pEx ) <br />
{<br />
pEx->ReportError(MB_OK); <br />
} <br />
i always get the message "Request timed out".
can anyone please tell me what to do?? Thanks...
vijay.
|
|
|
|
|
|
Dear All,
I have my program (its a small firewall program) that is installed in all my network client machines. Here I want to do is that write a program that should control all client machine's program(my program firewall).
I want to control my product that is installed in all machines from a server.
How can i do this ? Which technique is useful ?
|
|
|
|