Click here to Skip to main content
15,891,253 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem getting Caption of a window control using SendMessage & WM_GETTEXT Pin
Code-o-mat30-Mar-09 22:16
Code-o-mat30-Mar-09 22:16 
QuestionDialog based Application should always run as Admininstrator. Pin
Le@rner30-Mar-09 2:03
Le@rner30-Mar-09 2:03 
AnswerRe: Dialog based Application should always run as Admininstrator. Pin
Sarath C30-Mar-09 2:25
Sarath C30-Mar-09 2:25 
AnswerRe: Dialog based Application should always run as Admininstrator. Pin
Stuart Dootson30-Mar-09 2:26
professionalStuart Dootson30-Mar-09 2:26 
Questionsotring/comparing strings Pin
josip cagalj30-Mar-09 1:10
josip cagalj30-Mar-09 1:10 
AnswerRe: sotring/comparing strings Pin
Stuart Dootson30-Mar-09 2:08
professionalStuart Dootson30-Mar-09 2:08 
GeneralRe: sotring/comparing strings Pin
josip cagalj30-Mar-09 2:13
josip cagalj30-Mar-09 2:13 
GeneralRe: sotring/comparing strings Pin
Stuart Dootson30-Mar-09 2:25
professionalStuart Dootson30-Mar-09 2:25 
Right...well, that sizeof(char*) in the qsort call isn't going to be correct, is it?

I would suggest:

  1. Change compare so it expects its two parameters to be pointers to CString
  2. Change the sizeof( char* ) to be sizeof( CString )


And here's a thought - if you used STL containers, you could use type-safe algorithms and things that would highlight these issues...

std::vector<cstring> polje(cnt);
for(int i=0; i<cnt;++cnt)
{
	CString pom;
	m_List.GetText(i,pom);
	polje.push_back(pom);
}
std::sort(polje.begin(), polje.end(), compareFunction);</cstring>


Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionRe: sotring/comparing strings Pin
David Crow30-Mar-09 3:49
David Crow30-Mar-09 3:49 
AnswerRe: sotring/comparing strings Pin
josip cagalj30-Mar-09 21:46
josip cagalj30-Mar-09 21:46 
QuestionCListBox with multiselection support Pin
V K 230-Mar-09 0:31
V K 230-Mar-09 0:31 
AnswerRe: CListBox with multiselection support Pin
Rajesh R Subramanian30-Mar-09 0:33
professionalRajesh R Subramanian30-Mar-09 0:33 
GeneralRe: CListBox with multiselection support Pin
V K 230-Mar-09 0:41
V K 230-Mar-09 0:41 
AnswerRe: CListBox with multiselection support Pin
Rajesh R Subramanian30-Mar-09 0:43
professionalRajesh R Subramanian30-Mar-09 0:43 
GeneralRe: CListBox with multiselection support Pin
V K 230-Mar-09 0:46
V K 230-Mar-09 0:46 
QuestionModeless and Modal dalog window Pin
durban230-Mar-09 0:01
durban230-Mar-09 0:01 
AnswerRe: Modeless and Modal dalog window Pin
Dieter Hammer30-Mar-09 1:05
Dieter Hammer30-Mar-09 1:05 
Questiononerdrawn CTabCtrl with themes, different XP vs. vista? Pin
Dieter Hammer29-Mar-09 22:26
Dieter Hammer29-Mar-09 22:26 
QuestionRead diffrent formats file in MFC. Pin
Le@rner29-Mar-09 22:16
Le@rner29-Mar-09 22:16 
QuestionRe: Read diffrent formats file in MFC. Pin
CPallini29-Mar-09 22:26
mveCPallini29-Mar-09 22:26 
AnswerRe: Read diffrent formats file in MFC. Pin
Le@rner29-Mar-09 22:28
Le@rner29-Mar-09 22:28 
QuestionRe: Read diffrent formats file in MFC. Pin
CPallini29-Mar-09 22:40
mveCPallini29-Mar-09 22:40 
AnswerRe: Read diffrent formats file in MFC. Pin
Rajesh R Subramanian29-Mar-09 22:49
professionalRajesh R Subramanian29-Mar-09 22:49 
AnswerRe: Read diffrent formats file in MFC. Pin
Pankaj D.Dubey30-Mar-09 0:02
Pankaj D.Dubey30-Mar-09 0:02 
AnswerRe: Read diffrent formats file in MFC. Pin
Hamid_RT30-Mar-09 1:47
Hamid_RT30-Mar-09 1: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.