Click here to Skip to main content
15,917,328 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalarugh arugh +arugh^1*10^4 Pin
(Steven Hicks)n+15-Sep-03 11:13
(Steven Hicks)n+15-Sep-03 11:13 
GeneralRe: arugh arugh +arugh^1*10^4 Pin
Michael Dunn5-Sep-03 13:54
sitebuilderMichael Dunn5-Sep-03 13:54 
Generalinterrupt handling in win2k Pin
Member 5562475-Sep-03 11:01
Member 5562475-Sep-03 11:01 
GeneralRe: interrupt handling in win2k Pin
Brad Sokol5-Sep-03 11:21
Brad Sokol5-Sep-03 11:21 
GeneralRe: interrupt handling in win2k Pin
Alexander M.,6-Sep-03 3:50
Alexander M.,6-Sep-03 3:50 
QuestionHow to create an empty folder in Visaul C++ Pin
nachilau5-Sep-03 10:07
nachilau5-Sep-03 10:07 
AnswerRe: How to create an empty folder in Visaul C++ Pin
David Crow5-Sep-03 10:44
David Crow5-Sep-03 10:44 
Questionlvm_sortitems with no MFC? Pin
Kayembi5-Sep-03 8:28
Kayembi5-Sep-03 8:28 
Hi,

I have a custom listbox set up with several columns (file name, file type, size and path), and I want it so that whenever a user clicks on a column header, the items are sorted, just as in Windows Explorer, for instance.

The column click part is easy, as I just have this code underneath case WM_NOTIFY:

<br />
case IDC_LIST1:<br />
	//CHECK FOR COLUMN CLICK:<br />
	if(((LPNMHDR)lParam)->code == LVN_COLUMNCLICK)<br />
	{<br />
		if(((LPNMLISTVIEW)lParam)->iSubItem == 0)<br />
		{<br />
			//need to sort items using LVM_SORTITEMS here...<br />
		}<br />
	}<br />


However, I have no idea about how to use LVM_SORTITEMS. Obviously, I need to send it using SendDlgItemMessage and use a callback function as it says over on MSDN, but I don't know how to set up the callback function.

The problem is that all of the examples I have found are MFC based, but I am _not_ using MFC, just the straight Windows API.

Does anybody know where I can find a decent "sort listview items" code example that does not use MFC, or could anybody give me some pointers on how to go about it myself?

Many thanks for any help,
KB
AnswerRe: lvm_sortitems with no MFC? Pin
David Crow5-Sep-03 8:55
David Crow5-Sep-03 8:55 
GeneralPrinting HTML pages Pin
jancsi5-Sep-03 8:07
jancsi5-Sep-03 8:07 
GeneralRe: Printing HTML pages Pin
Ravi Bhavnani5-Sep-03 12:39
professionalRavi Bhavnani5-Sep-03 12:39 
Generaltell CDocument not to save Pin
Jason Henderson5-Sep-03 7:01
Jason Henderson5-Sep-03 7:01 
GeneralRe: tell CDocument not to save Pin
David Crow5-Sep-03 7:07
David Crow5-Sep-03 7:07 
GeneralRe: tell CDocument not to save Pin
Jason Henderson5-Sep-03 7:09
Jason Henderson5-Sep-03 7:09 
GeneralRe: tell CDocument not to save Pin
KaЯl5-Sep-03 7:37
KaЯl5-Sep-03 7:37 
GeneralCapture password by service and hook Pin
Shawn Ning5-Sep-03 5:37
Shawn Ning5-Sep-03 5:37 
GeneralRe: Capture password by service and hook Pin
David Crow5-Sep-03 5:39
David Crow5-Sep-03 5:39 
GeneralRe: Capture password by service and hook Pin
Anonymous5-Sep-03 5:51
Anonymous5-Sep-03 5:51 
GeneralOCX question Pin
Shay Harel5-Sep-03 5:34
Shay Harel5-Sep-03 5:34 
GeneralRe: OCX question Pin
Brad Sokol5-Sep-03 5:40
Brad Sokol5-Sep-03 5:40 
GeneralRe: OCX question Pin
Shay Harel5-Sep-03 5:45
Shay Harel5-Sep-03 5:45 
Generalstl map bug Pin
Brian van der Beek5-Sep-03 4:43
Brian van der Beek5-Sep-03 4:43 
GeneralRe: stl map bug Pin
valikac5-Sep-03 5:20
valikac5-Sep-03 5:20 
GeneralRe: stl map bug Pin
Brian van der Beek5-Sep-03 5:26
Brian van der Beek5-Sep-03 5:26 
GeneralRe: stl map bug Pin
dog_spawn5-Sep-03 5:32
dog_spawn5-Sep-03 5:32 

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.