|
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..
|
|
|
|
|
Hi,
<br />
CreateFile( "FullFilePath", GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);<br />
e.g. with FullFilePath = "C:\\MyDir\\MyApp\\debug\\filename.ini"
or get the directory with: GetCurrentDirectory(...)
or otherwise with: GetModuleFileName(...) + _splitpath(...)
HTH
Frank
-- modified at 7:43 Monday 4th December, 2006
|
|
|
|
|
Thank you soo much for your help..
|
|
|
|
|
or you can use
<br />
CFile::Open->CFile::modeCreate | CFile::modeWrite
|
|
|
|
|
Thanks you very much for your help..
|
|
|
|
|
Shah Satish wrote: how i can create "filename.ini" file when i debug my program
In addition to what the others have indicated about creating the file. If you want to just create the file while in a debug build use
#ifdef DEBUG
...
#endif
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Shah Satish wrote:
an 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...??
ols C and C++ runtime function still work in VC++ like FSTREAM or fopen!
"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
|
|
|
|
|
Hi,
I have a problem with regards to ignoring mouse events.
Here is my requirement :
I have an application where some dialogs need to ignore mouse message and some dialogs should not
Solutions tried :
1. I have tried installing a mouse hook. But, in the mouse processor I need to always check the window pointer and its parents to determine whether I need to ignore and all call the next hook
Is there any member funciton/message handler of CDialog class by which we can ignore all mouse events/messages for that particular dialog ?
Appreciate any help that I can get
Regards,
Hari
I have a class dervied from CDialog and wants to ignore all the mouse message coming to the windows. I have used a solution
|
|
|
|
|
All I can think of is PreTanslateMessage... Something like this:
<br />
BOOL CCrossTabQuestionPage::PreTranslateMessage(MSG* pMsg) <br />
{<br />
switch ( pMsg->message )<br />
{<br />
case WM_LBUTTONDOWN:<br />
case WM_LBUTTONUP:<br />
return true;<br />
}<br />
<br />
return CDialog::PreTranslateMessage(pMsg);<br />
}<br />
<br />
This is likely to work but I have not tested it!
|
|
|
|
|
overide the OnNcHitTest() function and return HTNOWHERE inside it
nave
|
|
|
|
|
Haribaskar wrote: 1. I have tried installing a mouse hook. But, in the mouse processor I need to always check the window pointer and its parents to determine whether I need to ignore and all call the next hook
Global Hook or local Hook!
Haribaskar wrote: Is there any member funciton/message handler of CDialog class by which we can ignore all mouse events/messages for that particular dialog ?
naah.. you have to check every dialog or hook only particular dialog!
"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
|
|
|
|
|
Hi,
Can someone direct me (maybe a link or tutorial) on how to write a program to print to a Dot-Matrix printer. I need total control of which characters to print and will also need to send printer commands to the printer, i.e to move the head on vertical tab etc. (I already have the printer commands)
Any help would be appreciated.
Thanks in advance
Pieter
|
|
|
|
|
If you are using fprintf() , then open "LPT1:" as the file stream.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi Everybody,
I need help related to IP address and MAC Address. I have a network device "Mini port" from Lantronix, which is used for to retrive data from serial port and send it to LAN network, my requirement is, In the initial stage it will have only MAC address known by user, I want to search for the MAC Address and assign IP address for the same like in "print server". If anybody have solution for the same, please let me know in details.
Thanks in advance,
Ajith
Ajith
|
|
|
|
|
The IP Helper API has GetAdaptersInfo()[^] (GetAdaptersAddresses() in XP+). This may help you match up MAC and IP addresses.
Mark
|
|
|
|
|
Hi!!
can any body tell me ,how i can create "blabla.ini" file when i debug my program..ie when i will debug then blabla.ini file automatically generate in debug folder inside of my project.
how i can...??
Thanking you
shah satish
|
|
|
|
|
What is this "blabla.ini" file ? What are you trying to do exactly ?
|
|
|
|
|
blabla.ini means name of the file..
for exmaple...when i debug my program then it will generate webdocu.ini..
i dont know how i can create automatically file when i debug my program.
Thanks for your reply n waiting for your reply..
shah satish
|
|
|
|
|
in this file name i can enter my data.. ie this is user manual data..
|
|
|
|
|
in this file name i can enter my data.. ie this is user manual data..
shah satish
|
|
|
|