Last edited by mr_empty; 11-25-2007 at 08:17 PM.
Well in C++, it'd be new and delete. Look them up.
Eg, https://msdn2.microsoft.com/en-us/li...ba(VS.71).aspx
I suggest you learn C++ programming before attempting to tackle anything in MFC.
I agre with the suggestions above.....
Easiest soulution....
Store the DB data in the Search cpp (as a public member variable or as a property).
From the code this looks like the 'Details' variable.
In the 'results' dialog set/get the results by using (or similar)
GetParent()->Details
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
actually i have got the result in the list box now, but i need to click on the list box once to display the result so that i think there's problem in my code before...
however, now a problem arises, how to display the result without click on the list box??
Do it in your dialog's InitDialog procedeure.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Do you actually know anything of MFC?
Override the class's InitDialog function. There's where you put init code.
Also, from what I can see, the list is updated once it recieves the focus. I don't know if a child window will recieve focus when a list is created.
o ic, just add string into the list in the oninitdialog can do this, thanks
Yes, it can, and it's the best place to do it.