|
okay, i wrote now:
CFileDialog d;
d.DoModal();
when i run the program i still get the same error.
sunny
|
|
|
|
|
1) You need to provide some parameters to CFileDialog constructor
2) You need to check the value returned by CFileDialog::DoModal. If it's not IDOK, then user has cancelled the operation.
Sunnygirl wrote:
when i run the program i still get the same error.
What kind of error it is?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
error: no suitable standard constructor available
sunny
|
|
|
|
|
See (1) in previous post. I'd recommend reading docs on CFileDialog first.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
thank you very much, the CFileDialog works.
the stuff with the istream, iostream and so on i will try tomorrow....it´s too late now....
thanks
sunny
|
|
|
|
|
|
Here's my problem. I've got a pointer to an STL list inside a class that resides in a DLL. I was attempting to allocate an object for that pointer to point to inside the EXE, then, in the destructor for the class (in the DLL), I delete it. At which point I delete it, the heap checker becomes unhappy with me and gives me a user breakpoint. I've seen this kind of problem before with different heaps etc, but I've got plenty of other objects in this program which are allocated in the EXE and deleted in the DLL.
Why is it a problem with an STL list?
Chris Richardson
|
|
|
|
|
Chris Richardson wrote:
Why is it a problem with an STL list?
KB article Q168958 may shed some light on this subject:
Some STL classes contain nested classes. These classes can not be exported. For instance, deque contains a nested class deque::iterator. If you export deque, you will get a warning that you must export deque::iterator. If you export deque::iterator, you get a warning that you must export deque. This is caused by a designed limitation that once a template class is instantiated, it can not be re-instantiated and exported. The only STL container that can currently be exported is vector. The other containers (that is, map, set, queue, list, deque) all contain nested classes and cannot be exported.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Ahhh, thank you very much. I was wondering why everything was going well with my vector object. Looks like I'll have to use vector for this collection as well.
Thanks again,
Chris Richardson
|
|
|
|
|
It's a problem with VC++ STL implementation. Microsoft reports it here[^]. Dinkumware (the company that wrote STL for VC++) provides a fix here[^], go to paragraph "Fix to <xtree>".
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
A problem. Heres what I did:
totalNumFields = 10;
CStringArray pArray;
pArray.SetSize(totalNumFields);
pArray.Add("ccc");
pArray.Add ("ppp");
pArray.Add("xxx");
pArray.Add("lll");
for (int y = 0; y < totalNumFields; y++)AfxMessageBox(pArray[y]);
int ntemp = pArray.GetSize();
GetSize returns 10 (as expected)
THe msgboxes are empty!!! I need the array to be a certain size but dont want to fill in all the elements.
Why am I not seeing my text in the messages? Is it because its adding and not filling? I'm lost. If it were adding, the size would have grown to 14, but it stays 10 (GetSize). So I'm thinking pArray[0] = "ccc", p[1]= "ppp" etc.
Appreciate your help,
ns
|
|
|
|
|
CStringArray::Add() appends new items onto the end of the array, so you'd have text in #11, #12, #13 and #14 - which you aren't printing. CStringArray::SetAt() is what you're looking for.
Shog9
------
Crazy lady with the shiny shoes, where are you?
Kick your feet and calm the space that makes you hollow
Live, Insomnia And The Hole In The Universe
|
|
|
|
|
I grabbed the first likely function i thought would fill my array, and didnt look any further. Many many thanks. Its fine now...
Appreciate your help,
ns
|
|
|
|
|
Does anyone know how to hide the desktop icons?
I'll need something that works for WinNT/2K/XP, even if they are different means to the same result. I've been mucking around a bit trying to find a way, but so far today I've come up with little (ok, nothing... yet).
: Dean 'Karnatos' Michaud
|
|
|
|
|
|
Hi all,
Thanks for reading my post.
I am writing the client end of a custom terminal emulator and I want to add vt100 terminal emulation support to the application. It's written in VC++ 6. I was hoping I could do this by finding an activeX control that would provide some kind of virtual terminal support on the client end.
Typically, the client will talk to a linux/unix server via TCP/IP. The trouble is that the linux/unix server sends back a whole bunch of strange characters and I don't know how to deal with them. Of course I could strip out the bad characters and yes that would work - but I would have to do this for every unix command and each one would be different.
Thank you for any help or advice you can offer.
Michael
|
|
|
|
|
If you do a web search you may find something. Here is just one of several:
http://www.sdisw.com/index.asp
|
|
|
|
|
I hope I can explain this without too much confusion.
Let's say you have an edit box in a wizard. You enter data outside the valid range. If you click Enter instead of Tab, you get an error message. If you click on Enter to dismiss the error, it acts like an Enter and goes onto the Next screen. The original code looked like this:
// Check the validity of the value
l_lVal = atof((_bstr_t)InBurstLengthStr);
if((l_lVal > m_dMaxBurstLength) || (l_lVal < m_dMinBurstLength))
{
// If the entered value is out of range then throw an error
::MessageBox(m_hWnd,
L"The Burst Length Entered is not Within the Specified Range!",
L"Data Entry Error",MB_OK | MB_ICONEXCLAMATION);
BurstLengthEdit.SetFocus();
return 0;
}
I changed it so that I got the click. I checked if the click was IDOK, called the setfocus, but that didn't help. I saw where someone else made the enter key act like a tab key if they were in an edit field with a hook. I couldn't get that to work. It just wanted to act like a Next, which was weird because it didn't appear to be the default button. Please HELP me if you can!
Thanks,
Lilian
|
|
|
|
|
The code you've posted is located in some event handler; you didn't include the function header. Which event is it?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
The method name is OnKillFocusBurstLengthEdit, EN_SETFOCUS.
|
|
|
|
|
EN_KILLFOCUS handler doesn't give you any control over page navigation. I *guess* (never did that personally) you should check values in OnWizardNext and return -1 if they don't satisfy your conditions.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Thanks, I knew this was something beyond my control/comprehension!
|
|
|
|
|
The CFormView in my MDI project fits neatly inside my window without scrollbars appearing. I set it up so it's maximised on execution. However, on a smaller screen computer, scrollbars appear.
My question is: Is there a way to automatically resize the controls and form so that I "see" the same window no matter which computer i run it on?
Thanks
Kash
|
|
|
|
|
|
Hi,
How do I determine if the client area of my window
has been totally covered up by other windows?
In my OpenGl program, I still want to render when
the user switches away to another program, but not
when the rendering/client area is not visible.
Thanks!
Shawn
|
|
|
|