|
Sakthiu wrote: How can i close this ?
Programmatically, or via the UI?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Sakthiu wrote:
once this dialog box comes up, i can not close it.
is it get hang after getting visibled
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
Hello,
Can anyone tell me how the coordinate system works for a dialog window. Is the origin at the upper left of the Dialog window?
I have an application that will require me to use X, Y coordinate data designed for a Dos window and apply it to a Dialog window, in a Dialog application.
Also, can you open multiple Dos windows within a Dialog application??... if so it may make it easier for me to use the older style code.
Jerry
|
|
|
|
|
The Co-ordinate for the dialog window has its origin at
the Left-Top corner of the dialog window(dialog box)
As far as i understand u will have to convert
the co-ordinates form Dos-window to Dialog Window.
Opening multiple window ? i dont know what u mean
Take care
Vikas Amin
EATON
PUNE
|
|
|
|
|
jerry1211a wrote:
Also, can you open multiple Dos windows within a Dialog application??...
Yes, you can have more than one command-prompt window open at the same time.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hi all.
I want to add number of strings in a list box plus a check box infront of each string.
How I can do this?
Thanks
Rakesh Thakur
|
|
|
|
|
Use CListCtrl instead and then call CListCtrl::SetExtendedStyle(LVS_EX_CHECKBOXES)
Hope this helps
|
|
|
|
|
use CCheckListBox class
nave
|
|
|
|
|
Did you search on codeproject I think I saw examples
|
|
|
|
|
Rakesh_Thakur wrote:
Hi all.
I want to add number of strings in a list box plus a check box infront of each string.
it is not possible in the Common CListBox class, unless and until you subclass it handle CheckBox or you can see reply by MR. BadJerry
<div class='ForumSig'>"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and you </div>
|
|
|
|
|
I want to write reg value in HKLM in windows Vista. But RegOpenKeyEx() API is failing. I am using access rights as KEY_READ | KEY_WRITE. Please give some suggestion.
|
|
|
|
|
Hi,
"KEY_WRITE" -> have you administration rights? (because HKLM)
What is the return value of GetLastError()?
Frank
|
|
|
|
|
Yes, the user has administrative rights. Though the user is not the by default (in built) administrator. GetLastError is returning Access denied.
|
|
|
|
|
|
I have the following template function
<br />
typedef std::vector < void * > ARRAY_PTR;<br />
template<class T> void ClearPtrArray(ARRAY_PTR& vecVoid)<br />
{<br />
for (ARRAY_PTR::iterator itWhere = vecVoid.begin(); itWhere != vecVoid.end(); itWhere++)<br />
{<br />
T* pT = reinterpret_cast< T * >(*itWhere);<br />
delete pT;<br />
}<br />
<br />
vecVoid.clear();<br />
}<br />
This works great in VS 2005 but not in VC+6.0
I have the following code in a destructor
<br />
ClearPtrArray< askia_wave::CVersion > (m_rgVersions);<br />
ClearPtrArray<askia_wave::CQuestionClass>(m_rgQuestionClasses);<br />
ClearPtrArray<askia_wave::CLanguage>(m_rgLanguages);<br />
ClearPtrArray<askia_wave::CModality>(m_rgModalities);<br />
ClearPtrArray< askia_wave::CQuestion >(m_rgQuestions);<br />
ClearPtrArray<askia_wave::CWave>(m_rgWaves);<br />
And I get a runtime crash. With the debugger, when I look at * pT in ClearPtrArray, the type is clearly not the correct one. For instance the first member of m_rgVersions is recasted as a question (which of course causes the delete to crash) and so on...
Any idea? Of course I could derive all my objects from the same type and use a virtual destructor but that's not the point. I have heard that VC+6.0 STL implementation was bad but surely not that bad?
Thanks in advance!
-- modified at 9:16 Monday 4th December, 2006
|
|
|
|
|
Why don't you simply delete the contents of the iterator without the cast ? You don't need to cast it.
|
|
|
|
|
Because the destructors of the objects allocated in the arrays (eg CVersion) would not be called...
|
|
|
|
|
Yes they would. The content of your iterator is not a void pointer, it is a template, so the compiler knows which object it needs to destroy.
|
|
|
|
|
I do not know why - if it's a problem in the code tag or (and that would be embarrassing) I cannot do a copy and paste but
this is what I meant
<br />
typedef std::vector < void * > ARRAY_PTR;<br />
so yes the iterator content is void *
|
|
|
|
|
I see. But I still don't understand what you are trying to do.
You posted this code:
ClearPtrArray< askia_wave::CVersion > (m_rgVersions);
ClearPtrArray(m_rgQuestionClasses);
ClearPtrArray(m_rgLanguages);
ClearPtrArray(m_rgModalities);
ClearPtrArray< askia_wave::CQuestion >(m_rgQuestions);
ClearPtrArray(m_rgWaves);
Can you show the definition of m_rgVersions, m_rgQuestionClasses, m_rgLanguages, ... ?
I suppose they are all of type std::vector<void*> (I just guess, because otherwise the code won't compile I think).
But then my question: why don't you use vector in the standard way ? So, store the pointers to your class and not a simple void pointer ?
|
|
|
|
|
you are right about the declaration
<br />
ARRAY_PTR m_rgWaves;<br />
ARRAY_PTR m_rgQuestions;<br />
ARRAY_PTR m_rgQuestionClasses;<br />
ARRAY_PTR m_rgModalities;<br />
ARRAY_PTR m_rgLanguages;<br />
ARRAY_PTR m_rgVersions;<br />
yes you are right, I could use a vector like this vector < CQuestion * > m_rgQuestions but the idea was to have something like the MFC CObArray. Oh and the code is shared ( I did not write it) ... and it should work so it is a bit of a pain to rewrite a lot of code because it is used in a VC 6.0 project...
|
|
|
|
|
Hi!!
can any body tell me ,how i can create "filename.ini" file when i debug my program..ie when i debug then "Filename.ini" file automatically create in debug folder of my project (or specified path)
how i can...??
Thanking you
shah satish
|
|
|
|
|
how about
CStdioFile filReport(_T("c:\\MyDir\\MyFilw.ini"),CFile::modeCreate | CFile::modeWrite | CFile::typeBinary);
?
|
|
|
|
|
Thank you soo much for your help..
|
|
|
|