|
|
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
|
|
|
|
|
Hello All,
I am using VC++/Com application and working with database.
I am using '_RecordsetPtr' to fetch database tables.
Here 'RsITEM' Macro to get particular column data. Everything works fine unless you encounter with NULL value. If values comes to be NULL, it just throw exception, and application crashes. Not allowing null values in database is not solution in my case.
Any help in this regard is highly appreciated.
Happy Programming.
|
|
|
|
|
You need to check the Item for equality to VT_NULL before calling it's GetValue() method, like this[^].
|
|
|
|
|
Hi this is my code
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 15;
lf.lfWeight = FW_REGULAR;
m_fontRegular.CreateFontIndirect(&lf);//m_fontRegular is object of CFont
m_ctrlComboBrowsers->SetFont(&m_fontRegular);// m_ctrlComboBrowsers is object of CComboBox
i am adding some string to combobox, problem is in XP machine combobox's dropdown list is not showing....
please help me.
|
|
|
|
|
Have you done the layout of it in the dialog template properly?
In the dialog template, click on the drop down arrow of the combo box and resize the control by expanding it downwards.
|
|
|
|