|
Stifly wrote: I don't know exactly how to do it
I don't know what that means. However in case you don't know what to do because you don't know what a framework is, see here[^]
|
|
|
|
|
Dear All,
I want to add Combo boxes in one row of a CListCtrl. Is this possible ? If possible can anyone help me to add the ComboBoxes in one row of a CListCtrl.
Expecting your replies. Many thanks in advance.
Bhanu
|
|
|
|
|
bhanu_8509 wrote: I want to add Combo boxes in one row of a CListCtrl. Is this possible
Easiest with a more advanced list control - I suspect one or more of the CodeProject articles about list controls[^] could sort you out.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I cannot find useful information for the comboboxes to be added in a row. The implementation is given for a column. Please help me.
|
|
|
|
|
Hi,
I have a program that performs a lengthy operation (2-3 minutes), so by the time it's finished, the user would have minimized it and/or switched focus. When the operation is finished the program displays a dialog with DoModal. But the user can't see that because my program is minimized. I've seen programs that flash on the taskbar in this case.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Maybe try using FlashWindow[^] or FlashWindowEx[^], however i am not sure how these work for a minimized window.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
|
Hi all,
I am new in this field. I want to know which book will i follow for mfc program, using VS 2005 as a beginner. Please refer the author name.
Thanks to all
Munna
|
|
|
|
|
Hi,
For book recommendations, see here[^]. I am assuming that you have working knowledge of Win32 and a good understanding of the object oriented programming paradigm. Those two will help you in learning MFC faster.
Happy learning.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I'm using VS 2008 with the new MFC framework and ribbon UI. I'm working on a hobby project, and am trying to add a combobox to one of the ribbon tab/panels. It appears - and shows the first item of text added, but it is not "enabled". It's light grey as though it's not enabled and clicking does nothing, although when I mouse over the rest of the panel, the panel itself lights up correctly.
bNameValid = strTemp.LoadString(IDS_RIBBON_PORT_SELECT_BOX);
ASSERT(bNameValid);
CMFCRibbonComboBox* pSerialPortSelectBox = new CMFCRibbonComboBox(ID_RIBBON_PORT_SELECT_BOX, TRUE, 80, strTemp, 1);
pSerialPortSelectBox->AddItem(_T("Test"));
pSerialPortSelectBox->AddItem(_T("Test2"));
pSerialPortSelectBox->AddItem(_T("Test3"));
pSerialPortSelectBox->AddItem(_T("Test4"));
pSerialPortSelectBox->SelectItem(1);
pSerialPortSelectBox->EnableDropDownListResize(TRUE);
pPanelSerialConfig->Add(pSerialPortSelectBox);
This shows "Test2" sitting in the box, but the whole thing is greyed out.
Any thoughts?
|
|
|
|
|
You should add a message handler for it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks, stupid oversight for a HW guy like myself. That did the trick...
|
|
|
|
|
Hi All,
Microsoft XP, 2003 OS comes with default compression utility. Anynody knows the way to configure it with follows parameters
- temp file locations
- time out value
- Vikram S
|
|
|
|
|
vikrams wrote: temp file locations
Probably as defined by the TMP or TEMP environment variable?
vikrams wrote: time out value
What time-out? A compression operation won't time-out. The underlying file access operations might, if they're (for example) network operations, but not the compression operation.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
My TMP env vars points to system32\temp and localsettings\temp
Actually it creates the temp file at the same location of the requested file for compression
|
|
|
|
|
SO, what's the problem? And does it actually have anything to do with C, C++ or MFC?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi I asked this before, but didn't get a clear answer. How can I build an array of CObArray arrays? In other words, I need it to work like a stack, so I can add CObArrays to the stack, and retrieve an Array based on an index?
Thanks
"Failing to prepare is preparing to fail"
|
|
|
|
|
Software2007 wrote: How can I build an array of CObArray arrays?
Even though you asked this same question three minutes ago, have you tried:
CArray<CObArray, CObArray&> arr;
|
|
|
|
|
Isn't this where I would run into Copy assignment problems?
|
|
|
|
|
Doesn't this work:
CObArray my_array;
my_array.Add(new CObArray);
my_array.Add(new CObArray);
...
((CObArray *)my_array.GetAt(0))->Add(...);
... ?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I think I had something similar which didn't work;
CObArray array1;
CObArray array2;
.....
array2.Add(&array1);
......
CObArray RetrieveArray;
RetrieveArray.Copy( *(CObArray *)array2.GetAt(2));
pre>
|
|
|
|
|
How did it fail?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
For instance,
for(int i=0; i< 3; i++){
if(i==0)
array2.add(&a);
if(i==1)
array2.add(&b)
if(i==2)
array2.add(&c)
}
RetrieveArray.Copy( *(CObArray*)array2.GetAt(0)); RetrieveArray.Copy( *(CObArray*)array2.GetAt(1));
it seems to always come back with the last array no matter what I do! arra2.GetSize() = 3, which is right.
|
|
|
|
|
I did a very simple experiment and it worked fine for me:
CString as("as"), bs("bs"), cs("cs");
CObArray array2, a, b, c;
a.Add((CObject*)&as);
b.Add((CObject*)&bs);
c.Add((CObject*)&cs);
for(int i=0; i< 3; i++)
{
if(i==0)
array2.Add(&a);
if(i==1)
array2.Add(&b);
if(i==2)
array2.Add(&c);
}
CObArray aRetrieveArray, bRetrieveArray, cRetrieveArray;
aRetrieveArray.Copy( *(CObArray*)array2.GetAt(0));
bRetrieveArray.Copy( *(CObArray*)array2.GetAt(1));
cRetrieveArray.Copy( *(CObArray*)array2.GetAt(2));
CString *astr = (CString *)aRetrieveArray.GetAt(0);
CString *bstr = (CString *)bRetrieveArray.GetAt(0);
CString *cstr = (CString *)cRetrieveArray.GetAt(0);
AfxMessageBox((*astr) + _T("\n") + (*bstr) + _T("\n") + (*cstr));
Maybe i am not getting your point.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I appreciate taking yout time. I am testing your sample code and comparing it to my code to realize the differences. The only thing that stands out is I have data of Type Class objects to fill out the arrays, as opposed to the Strings you put in, but this should be irrelevant.
I will let you know in few.
Thanks
|
|
|
|