|
Those are the memory dump statistics that you asked for. You really only need the _CrtSetDbgFlag() call in your CWinApp-derived class constructor and it will do the leak detection for you. Also remember to define new as DEBUG_NEW for debug builds in all source modules.
|
|
|
|
|
|
Hi
i have created CTreeCtrl tree view,this is having list of children (parent child relationship) like normal windows explorer tree view.if i add any new item into the any of root node it will add as a last item of that root node.my problem is once i add new item to the root node,how to set focus to the added item also how to make it visible.
1.parent is already expanded, add new item to the parent.
2.parent is in collapsed state, add new item to the parent.
In 1st case i am not able to make visible to the newly added item...
please help me...
thanks
|
|
|
|
|
I'm not sure offhand but I would expect that forcing a refresh of the CTreeView would get the item displayed.
The best things in life are not things.
|
|
|
|
|
|
Why not use
CTreeCtrl::EnsureVisible
|
|
|
|
|
yes.. EnsureVisible is working if parent node is in Collapsed state.that time if make
if (hParent != NULL)
m_TreeCtrl.Expand(hParent, TVE_EXPAND);
// Ensure the item is visible.
m_TreeCtrl.EnsureVisible(hmyItem);
like this its working,in my case parent is already expanded, i want to make perticular item visible once i add.
|
|
|
|
|
I'm working on a project in which the parent frame is CMDIFrameWnd and it spawns different child windows of CMDIChildWnd object for different purposes. The child windows are created based on need such as
1. one for displaying messages
2. one for displaying monitored data
3. plotting graphs etc
When the application is run, when we switch over all the views for some time, the application suddenly crashes.
Why is this happening. Kindly help if anybody knows.
|
|
|
|
|
It will be very hard to be deterministic and answer your query with the amount of information you provide. Did you try and debug to find the point of crash?
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
|
Stefan_Lang wrote: In the movies, experts keep fixing problems with a lot less information
available to them!
TRUE.
But then these questions should also find the answers in the movies itself.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
|
how to convert an CString ASCII to decimal number? For example, an "A" alphabet in ASCII table is 65 in decimal number, how can i convert the alphabet to an integer as 65. I get data from serial port MSCOMM
<br />
VARIANT in_dat; <br />
in_dat = m_comm.GetInput();<br />
CString strInput(in_dat.bstrVal);
I want conver strInput alphabet to decimal. i'm sorry, I can't speak english fluently. thx
|
|
|
|
|
atoi,atof should help you
You can also use variant type changing functions
Convert string to double:
CComVariant myVar;
double result;
if(myVar.ChangeType(VT_R8)==S_OK)
result=myVar.dblVal;
You should read this[^] link to understand how this can be done in more than one way.
You talk about Being HUMAN. I have it in my name
Ans HUMAN
modified on Tuesday, July 19, 2011 12:26 AM
|
|
|
|
|
Assuming you are reading each byte one at a time, then the values are already integers. A byte containing the character 'A' is the same as the value 65 decimal. There is no conversion necessary, just accept the data as integer, not string.
The best things in life are not things.
|
|
|
|
|
okey. Thanks for your help.
|
|
|
|
|
The problem is that my hard drive crashed about 2 years ago and the original CD set is in storage in another state. Today I finally decided that I would like it installed on my XP machine. I have copied the recovered VC6 directory to my machined, but, of course, it needs to be fixed. Is there a list of directory paths and registry entries some where or some other fix.
Thanks,
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra
"I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone
|
|
|
|
|
That would have to be a lot of work done manually and you might miss one or many things during the process. I would suggest a new installation for VC6.0 to be done on this machine.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
If this has been out of use for 2 years then I presume you only use it for personal projects. If that is the case then I would suggest you forget VC6 (unless you really need MFC) and go for the Visual Studio Express editions[^].
The best things in life are not things.
|
|
|
|
|
Good guess (MFC). I plan on the Resurrection of some old projects for the purpose of updating them. It helps to have the original development tools when working with old [GUI] code. Up until 2 years ago, all my cross-platform code included VC6 compatibility; I decided dropped that though.
Note: There are still commercial Apps the use MFC and posting for positions requiring it.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra
"I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone
|
|
|
|
|
John R. Shaw wrote: There are still commercial Apps the use MFC and posting for positions requiring it.
I didn't mean to imply that MFC is no longer current, it's just that it is not available with the (free) Express editions of Visual C++.
The best things in life are not things.
|
|
|
|
|
|
How can a program know if "Microsoft Visual C++ 2010 Redistributable Package (x86)" is installed. If possible, provide a sample code.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
|
Thank you!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|