Click here to Skip to main content
15,920,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPassing an Excel range as an argument Pin
BuckBrown25-May-06 12:39
BuckBrown25-May-06 12:39 
AnswerRe: Passing an Excel range as an argument Pin
BuckBrown25-May-06 13:08
BuckBrown25-May-06 13:08 
GeneralRe: Passing an Excel range as an argument [modified] Pin
Stephen Hewitt25-May-06 17:32
Stephen Hewitt25-May-06 17:32 
GeneralRe: Passing an Excel range as an argument [modified] Pin
BuckBrown26-May-06 7:41
BuckBrown26-May-06 7:41 
QuestionApplication Container for several dialog based applications Pin
Sridhar Sanikommu25-May-06 12:24
Sridhar Sanikommu25-May-06 12:24 
AnswerRe: Application Container for several dialog based applications Pin
bob1697225-May-06 16:01
bob1697225-May-06 16:01 
GeneralRe: Application Container for several dialog based applications Pin
Sridhar Sanikommu26-May-06 7:18
Sridhar Sanikommu26-May-06 7:18 
QuestionDataGridView custom sorting question Pin
garidanxii25-May-06 9:25
garidanxii25-May-06 9:25 
Hi all.
I'm very new to Visual C++, so I apologize in advance if I miss any important details.

I'm trying to create a unbound DataGridView object that comes with a (small) predefined number of entries and a few unmodifiable default entries. This I've been able to do just fine.
My problem comes with sorting. I'd like to allow the user to sort the entries that he's added himself when he clicks the column header:
For example, if I have 10 rows, 3 of which are predefined as "1", "apple", and "2".. and the user enters "hi", "a", and "there" into the next few rows, I'd want the following sort results:
1,apple,2,a,hi,there,(empty),...,(empty)
1,apple,2,there,hi,a,(empty),...,(empty)
when sorting in forward and reverse order, respectively.
My first attempt after looking through the MSDN docs was to create a SortCompare Event Handler, but apparently my attempts to hardcode this sort of functionality in with things like
e->SortResult = e->RowIndex1 - e->RowIndex2;
conflicts with the quicksorting algorithm the class uses, and causes all sorts of weird behavior and ArrayOutOfBounds errors.

Have I overlooked anything? What's the best strategy to approach this sort of problem?
Any suggestions are appreciated, just let me know if you need more information.
QuestionClistbox Pin
celllllllll25-May-06 7:31
celllllllll25-May-06 7:31 
AnswerRe: Clistbox Pin
Hamid_RT25-May-06 7:56
Hamid_RT25-May-06 7:56 
GeneralRe: Clistbox Pin
celllllllll25-May-06 10:11
celllllllll25-May-06 10:11 
GeneralRe: Clistbox Pin
David Crow25-May-06 10:20
David Crow25-May-06 10:20 
GeneralRe: Clistbox Pin
celllllllll25-May-06 11:36
celllllllll25-May-06 11:36 
QuestionFileDialogs problem in VS 2005 Pin
CodeGoose25-May-06 7:06
CodeGoose25-May-06 7:06 
QuestionExcecute Key and + Key Pin
see me25-May-06 7:05
see me25-May-06 7:05 
QuestionRe: Excecute Key and + Key Pin
David Crow25-May-06 8:17
David Crow25-May-06 8:17 
AnswerRe: Excecute Key and + Key Pin
ThatsAlok25-May-06 19:17
ThatsAlok25-May-06 19:17 
QuestionHow to verify the data when the focus leaves [modified] Pin
willbin25-May-06 6:06
willbin25-May-06 6:06 
QuestionRe: How can I verify the data when the focus leaves Pin
David Crow25-May-06 6:51
David Crow25-May-06 6:51 
AnswerRe: How can I verify the data when the focus leaves Pin
willbin25-May-06 15:18
willbin25-May-06 15:18 
GeneralRe: How can I verify the data when the focus leaves Pin
Ryan Binns25-May-06 18:52
Ryan Binns25-May-06 18:52 
GeneralRe: How can I verify the data when the focus leaves Pin
willbin25-May-06 22:16
willbin25-May-06 22:16 
GeneralRe: How can I verify the data when the focus leaves Pin
David Crow26-May-06 2:32
David Crow26-May-06 2:32 
QuestionInsert Button into Another App's Window Pin
tuckmeng25-May-06 5:48
tuckmeng25-May-06 5:48 
QuestionHow to create a vitual driver ? Pin
bengoan25-May-06 5:47
bengoan25-May-06 5:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.