|
void CYourDialog::OnAddButton()
{
CString cText;
int nIndex;
nIndex = m_ComboboxA.GetCurSel();
if(nIndex == CB_ERR)
return;
m_ComboboxA.GetLBText(nIndex, cText);
m_ComboboxB.AddString(cText);
}
void CYourDialog::OnRemoveButton()
{
int nIndex;
nIndex = m_ComboboxB.GetCurSel();
if(nIndex == CB_ERR)
return;
m_ComboboxB.DeleteString(nIndex);
}
|
|
|
|
|
|
How can I add OnOK event in CPropertySheet
from class wizard?
Thanks in advance.
Shinya
|
|
|
|
|
If file is locked or really user have no permission to write to the file?
Thanks,
Brian
|
|
|
|
|
|
but then again, maybe its simpler than that - I wonder if an attempt to open the file would produce a trappable 'no permissions error' - sorry, I cant check this right now (dont have MSDN here at the office)
'G'
|
|
|
|
|
Use the _access api
with which u can check for the access to the file and solve teh bug
Thanx
TAKE CARE
|
|
|
|
|
Sorry no go,
_access calls dosmapper => EACCES when file is locked, when permission denied.
as well as it will lie about write access to network shares. _access will
report file/directory is writable when it isn't.
Thanks,
Brian
|
|
|
|
|
Hi guys
I'm managing a big array and I'm receiving this message when I execute the program (Unhandled exception in ...EXE: stack overflow). What can I do to try to solve it?
It's an array of a class (maybe this helps you to understand the problem).
Best Regards
Dr. Pi
|
|
|
|
|
Stack overflow, as the name implies, means your app process stack memory got overflew, so the best way to solve your problem could be moving your stuff from stack to the heap. Maybe you have put your "big array" of objects in the stack? For example:
My_Obj aObjs[9999]; // this could cause stack overflowing
// allocate them in heap instead:
My_Obj* pObjs = new My_Obj[9999]; // this could work
// ...
delete [] pObjs;
pObjs = NULL;
|
|
|
|
|
Recursive function calls can also cause a stack overflow if they get nested too deep.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I want to get the selected row in
CDataGrid.
Something like
CDataGrid * pGrid;
long l_CurPos = pGrid -> GetCurrentPos();
Thanks in advance.
Shin
|
|
|
|
|
I'm looking for a tool that alllows me to plot data on something that looks like a digital scope. I am modeling embedded firmware on the PC using .NET C++ so that I get nifty windows and buttons. Now, we want to plot some of the variables. I know someone else must have thought of this, so I would like to have a plug-in of some sort to do this for me so that I don't have to figure out how to plot data. Any suggestions of 3rd party tools?
Kenny O'Dell
Sr. R&D Software Engineer
Mettler-Toledo Inc.
Inman, SC
|
|
|
|
|
|
I have created a combobox on a dialog box. I have added items to the combobox by this expression:
int test = m_wavetype.InsertString(-1,"Lorentzian");
This seems to work, but when I go to select an item from the combobox it looks empty. I click on the small (squashed) area below the combobox and "Lorentzian" comes up as the selected value. Why can I not see my options in the combobox? Do I have settings wrong?
Thanks in advance,
Jim D
|
|
|
|
|
The height of the drop-down box is to small.
In the resource editor, click on the "open drop box drop" button, you see the grab rectangle chage - change the height of it.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
I am sorry, but I am using VC++ 6.0 and I do not understand what the "open drop box drop" is. Can you please be more specific.
Thanks for your quick reply.
Jim D
|
|
|
|
|
He just means click on the drop-box portion of the combo-box to have it show where the drop-down portion of the combo-box will show. This drag the bottom of the box down to make it bigger. Also note that the box can be bigger than the dialog it current is parented to.
Joel Lucsy
|
|
|
|
|
I have always had problems with combo box sizing too.
I tried to locate the "open drop box drop button" in resource editor andd had no luck.
Could you explain how to do this with a drop-list style combobox?
I have been using the work-around of changing the combobox style to simple because the simple style allows you to adjust the height. Then when you switch the style back to drop-list it keeps that height.
|
|
|
|
|
You click on the same arrow as you would in a program to open the list.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I never would have figured that out on my own! That was the strangest thing I have done with VC 6.0!!! Thank you both for your help and quick replies!!
Jim D
|
|
|
|
|
Yes, VC++ sucks big time on this one, it should figure out the drop-down height by itself according to how many items there are and resize to fit at runtime. What the hell is so useful with a combo box that has zero drop-down height?
|
|
|
|
|
Hello,
I have a CTreeCtrl object with checkboxes. Everything is working fine!
But I don't know which notification is sent when an user click on a checkbox. I've looked everywhere, but I cannot seem to find it. Is it burried to deep within the msdn or is it just one little unducumented thingy...
thanks in advance!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I didn't find any either, so I handled click + keyboard directly. There are some other nasties as well.
Clicky[^]
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
Thanks a lot!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|