|
Maximilien wrote: indow should not be active and the user should not be able to click on other menus/buttons.
Can i correct it as
If the dialog is modal (DoModal) the parent window will not be active and the user will not be able to click on other menus/buttons.
|
|
|
|
|
Yes, you can; but if the user experiment another behavior, there is a bigger issue.
Watched code never compiles.
|
|
|
|
|
I have a doubt that you are using DoModal. If that was the case as Maximilien told in the last mail you will not have access to the parent dialog.
Looks like you are using Modeless Dialog.
|
|
|
|
|
As Chandru080 wrote, using a modeless dialog would explain this behaviour. Alternatively, if the parent window handle is invalid or NULL, the result would be the same.
Could you post the relevant code please? It should be possible to say for sure then.
modified 13-Sep-18 21:01pm.
|
|
|
|
|
can you explain me what does it mean 'modeless dialog',
and how can I change it?
thanks
|
|
|
|
|
|
Hi,
When i search over the google about Memory leaks.I came to know about this commands.Then i use it in my code.
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
_CrtMemState s1, s2, s3;
_CrtMemDumpStatistics( &s1 );
After closing my application i found this in output window But i cannot understand whats it saying.
Pls help me whether this is a serious concern i have to look out.
In Output window i got this
2439008 bytes in 2147348480 Free Blocks.
1244712 bytes in 2438992 Normal Blocks.
2089871648 bytes in -16711681 CRT Blocks.
2089919440 bytes in 2010977956 Ignore Blocks.
-1 bytes in 1244308 Client Blocks.
Largest number used: 2089919435 bytes.
Total allocations: 2089918906 bytes.
Anu
|
|
|
|
|
Why not use the CMemoryState Class to find the memory leak?? It gives you a better understanding.
|
|
|
|
|
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
|
|
|
|