|
hi,
yes it is Main Window Dialog you are correct. also when you want to access the Mainwindow Dialog in second dialog dont forget to include the first dialog header in second dialog.
ie (i mean) # include "firstDialog.h" in the second Dialog.
good luck.
uday.
uday kiran
|
|
|
|
|
Hi,
I am bit confused now. In my project the main Dialog is CDesktopSearchDlg
after that i have CreateDlg & UpdateDlg.
//Uday
firstDialog.h" in the second Dialog.
//
i want to which is first dialog and which is 2nd dialog.
Is this code below correct ??
BOOL CUpdateDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CreateDlg *CDesktopSearchDlg = (CreateDlg *)GetParent();
CString str = CDesktopSearchDlg->fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
}
|
|
|
|
|
hi,
there is no confusion at all, from which dialog you want to access the control values ((ie) the String value of the File Name) just create an instance of the dialog and access the control values.
good luck.
uday.
uday kiran
|
|
|
|
|
can u please tell what is the error ??? is this below code correct???
-> error CCreateDlg *CCreateDlg = (CCreateDlg*)GetParent();
CString str = CCreateDlg -> fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
--------------------Configuration: DesktopSearch - Win32 Debug--------------------
Compiling...
UpdateDlg.cpp
D:\Parichay\DS with Help\DesktopSearch\UpdateDlg.cpp(146) : error C2059: syntax error : ')'
Error executing cl.exe.
DesktopSearch.exe - 1 error(s), 0 warning(s)
|
|
|
|
|
|
can u please tell what is the error ???
-> error CCreateDlg *CCreateDlg = (CCreateDlg*)GetParent();
CString str = CCreateDlg -> fname;
m_UPDATE_FILE_NAME_COMBO.AddString(str);
--------------------Configuration: DesktopSearch - Win32 Debug--------------------
Compiling...
UpdateDlg.cpp
D:\Parichay\DS with Help\DesktopSearch\UpdateDlg.cpp(146) : error C2059: syntax error : ')'
Error executing cl.exe.
DesktopSearch.exe - 1 error(s), 0 warning(s)
|
|
|
|
|
hi parichay,
change the Class instance and Class to Different values. you are using CCreateDlg class name and Member varible as same which is confusing. please change the values as
//==========================================================================
CreateDlg *pCreateDlg = (CreateDlg *) GetParent();
CString szStr = pCreateDlg->fname;
//==========================================================================
check with it.
good luck,
uday.
uday kiran
|
|
|
|
|
Hello
I want to add more than one image in a listctrl cell(Report view) in any order.
eg:- ITII where I is the image and T is the text
Thanks in advance
Sandeep A.C
Sanc
|
|
|
|
|
|
How can I add CTRL+C handler use SetConsoleCtrlHandler to this project??
I tried but it didn't work.
static BOOL WINAPI CtrlHandler(DWORD dwCtrlType);
BOOL WINAPI TConsole::CtrlHandler(DWORD dwCtrlType)
{
if ((dwCtrlType == CTRL_C_EVENT) || (dwCtrlType == CTRL_BREAK_EVENT))
{
return TRUE;
} else
{
return FALSE;
}
}
Thank you
http://www.codeproject.com/samples/transparentconsole.asp?df=100&forumid=99138[^]
|
|
|
|
|
Inside MSDN take a look at the error number C2784 .
Nibu thomas
Software Developer
|
|
|
|
|
Got it thanks!
Just used the <vecotr> STL container, which has random iterators, and just what I needed!
|
|
|
|
|
Hi
Dear Gurus
As i am going to enter the last year of BS (Computer Science), I have to choose some project to do. At this time, I have no Idea what should i do? But i want to do something different and innovative. As you people are in professional field and know about current market trends, I request you to please give me some ideas about my final project.
Waiting for kind responce...
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Hi,
Try to do the project in .Net or J2EE both are very good.
u can also do in VB using RDBMS package.
|
|
|
|
|
U can also go for Mobile, Wireless & PocketPC related stuff.
But will bit difficult than RDBMS project
|
|
|
|
|
Hello and thanks for reading.
I was wondering if it is possible to make a message handler without the burden of the window.
See i want to make an asyncronous socket and it requires a message handler to use properly. I need something like a thread or something of that maner to use and make my ultimate class .
Again, thanks. Really appreciated.
Worlds stupidest question: Who am i?!
|
|
|
|
|
Take a look at CCmdTarget .
Nibu thomas
Software Developer
|
|
|
|
|
+-{Chimera}-+ wrote:
I was wondering if it is possible to make a message handler without the burden of the window.
I assume you mean a message queue, not a message handler. Yes, any thread can have a message queue. A queue is created the first time you call any User function that operates on the queue, like PeekMessage() or GetMessage() . You use PostThreadMessage() to put messages in the queue.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
float*[] xd = NULL;
float*[] yd = NULL;
float*[] zd = NULL;
xd = new float[200][4];
yd = new float[200][4];
zd = new float[200][4];
//
I found these not work. How to use pointer and new to work with 2D arrays ?
Please help, thanks
|
|
|
|
|
In C++ you have to allocate each dimension separately.
float** pparray = new float*[200];
for ( size_t i = 0; i < 200; i++ )
pparray[i] = new float[4]; And then you free the memory in the opposite order once you're done with it.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thanks that is great!
I need more help:
what "size_t" meant ? I thought "int" ?
Could you also give me the code for freeing the memery ?
So a complete set of code.
|
|
|
|
|
size_t is the correct type to use for the size of an object (the return value of sizeof ) or an array.
Free the memory in the opposite order - do the for loop, then free pparray last.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thanks that is great!
I need more help:
what "size_t" meant ? I thought "int" ?
Could you also give me the code for freeing the memery ?
So a complete set of code.
|
|
|
|
|
Using simple math, you can just use a single array. (Internally, that's exactly what's happening anyway.)
If we assume the array represents row and column, using your example the offset in a 1d array is (row * 4) + column .
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I thought 1_D[row * column] can be used for 2_D[row][column] ??
Please comment.
|
|
|
|