Click here to Skip to main content
15,921,542 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Converting CString to int in Visaul C++, please help. Pin
Matt Gullett1-Jul-01 16:58
Matt Gullett1-Jul-01 16:58 
GeneralRe: Converting CString to int in Visaul C++, please help. Pin
Stephen Kellett2-Jul-01 4:48
Stephen Kellett2-Jul-01 4:48 
GeneralRe: Converting CString to int in Visaul C++, please help. Pin
Ben Burnett1-Jul-01 17:39
Ben Burnett1-Jul-01 17:39 
GeneralRe: Converting CString to int in Visaul C++, please help. Pin
1-Jul-01 18:34
suss1-Jul-01 18:34 
GeneralRe: Converting CString to int in Visaul C++, please help. Pin
Christian Graus1-Jul-01 19:01
protectorChristian Graus1-Jul-01 19:01 
GeneralAsk for help about color code to OpenGL graphic object Pin
Jane1-Jul-01 16:40
Jane1-Jul-01 16:40 
GeneralRe: Ask for help about color code to OpenGL graphic object Pin
Jonathan de Halleux30-Oct-01 1:16
Jonathan de Halleux30-Oct-01 1:16 
QuestionListCtrl/ListView help wanted. I think??? Pin
Michael Martin1-Jul-01 15:11
professionalMichael Martin1-Jul-01 15:11 
I am currently writing a Dialog based application that sits atop a database. In the summary screens I use a ListCtrl to display all records from a given table that can be selected to then take us to the detail screen. Using advice previously administered from this forum I have set the width of column one to zero, this is to hide the tables Primary Key from the user, while still having it available to me to use when next accessing the record in the database.

In a particular table I have an Order column for use in reports that the user, uses to set the order. I want to create a seperate screen where the user can reorder the records. This is where I have run into my current problem, how do I achieve this what is the best control for me to use.

I envisaged using the ListCtrl, which has become my friend in this project. I would display the Customer (with hidden Primary Key), allow them to re-order the list and then I would cycle through the records updating them sequentially with the new order value.

Problem is the SetItemPosition() function only works when in Icon or Small Icon mode and SetExtendedStyles only has drag and drop ability on rows not columns. Of course I am using Report mode and need to re-order the rows not columns. This stops me from using drag and drop or Up/Down command buttons to enable the re-ordering.

I also thought about using a ListView, but if I didn't want to have the Primary Key visible I would have to create a map and store it in an array external to the ListView. This would force me to keep track of the order of two things to achieve the result I want. Thats one to many for my brain that is running low on RAM at the moment.

What have I missed? I'm sure it is obvious, but not to me. How should I be doing this? Preferably I would like to be able drag the row into it's new position. Any help much appreciated. What's the answer?

Thanks in advance for the help.

P.S. All humour, sarcasm and colloquialisms removed so as not to confuse or offend. Also as a test to see if this question gets an answer this time.


Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
AnswerRe: ListCtrl/ListView help wanted. I think??? Pin
Michael Dunn1-Jul-01 15:28
sitebuilderMichael Dunn1-Jul-01 15:28 
GeneralRe: ListCtrl/ListView help wanted. I think??? Pin
Michael Martin1-Jul-01 17:37
professionalMichael Martin1-Jul-01 17:37 
GeneralPrinting metafile Pin
nw603121-Jul-01 13:09
nw603121-Jul-01 13:09 
Questionplease help!! - document/view problems?? Pin
1-Jul-01 12:11
suss1-Jul-01 12:11 
AnswerRe: please help!! - document/view problems?? Pin
Erik Funkenbusch1-Jul-01 13:28
Erik Funkenbusch1-Jul-01 13:28 
Generalcatching escape keypresses in an edit control Pin
1-Jul-01 11:43
suss1-Jul-01 11:43 
GeneralRe: catching escape keypresses in an edit control Pin
Julien1-Jul-01 14:49
Julien1-Jul-01 14:49 
GeneralRe: catching escape keypresses in an edit control Pin
Julien1-Jul-01 15:33
Julien1-Jul-01 15:33 
GeneralRe: catching escape keypresses in an edit control Pin
Matt Gullett1-Jul-01 15:39
Matt Gullett1-Jul-01 15:39 
GeneralDLL loosing "this" pointer Pin
Peter Marino1-Jul-01 10:20
Peter Marino1-Jul-01 10:20 
GeneralRe: DLL loosing Pin
Cliff Dabrowski1-Jul-01 12:45
Cliff Dabrowski1-Jul-01 12:45 
GeneralRe: DLL loosing Pin
Peter Marino1-Jul-01 13:04
Peter Marino1-Jul-01 13:04 
GeneralRe: DLL loosing Pin
1-Jul-01 13:22
suss1-Jul-01 13:22 
GeneralInternet Traffic Pin
1-Jul-01 10:14
suss1-Jul-01 10:14 
GeneralRe: Free HTML Win32 API control Pin
Michael Dunn1-Jul-01 9:11
sitebuilderMichael Dunn1-Jul-01 9:11 
GeneralSyntax highlighting Pin
1-Jul-01 8:13
suss1-Jul-01 8:13 
GeneralRe: Syntax highlighting Pin
NullStream1-Jul-01 8:30
NullStream1-Jul-01 8:30 

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.