This is a class which makes possible to easy edit list view cells. Just single click (or double click) makes the cell editable.
The included example program shows also how to change font in one of list view columns.
Sapero,
Great program!
Thanks for sharing this.
Haim
Thanks Haim.
I've attached extended version with drag-drop support, build on standard ole interfaces IDataObject, IDropSource and IDropTarget.
There is additional CDragDrop class with just one method StartDragDrop.
Drag-drop is initiated from CApp::OnBeginDrag, fired by list view notification LVN_BEGINDRAG.
I have also splited the root cases in OnNotify method.
Happy study :)
That's great Sapero.
You must have a little camera sitting behind me, as I was just working on example drag and drop classes for Emergence using standard ole interfaces. ;) It will be interesting to compare the two.
Paul.
Sapero, many thanks for the code. I've just a problem during the rebuilding of the project:
Compiling...
main.eba
File: C:\bbb\main.eba (72) Warning: Uninitialized variable: app
grid.eba
......
Hovewer the program starts and seems to work fine.
Any suggestions?
bye
Sergio
Sergio,
It's a warning, not an error. And can be ignored.
Paul.
Thank you :)
Sergio
The third version displays an insertion mark, and automatically scrolls the list view when needed. All this in dragdrop.src. You find here also autorepeat implementation, which scrolls the listview with full speed after some time.
When you are editing a cell and scroll the list view or mouse wheel, the edit control will now hide. Scrolling events are detected in subclassed listview procedure (grid.src).
Sapero,
How hard would it be to make your Mini Grid windows based instead of dialog based?
Larry
It's not much work, you'll need to replace CreateDialog with OpenWindow, IDINITDIALOG with IDCREATE, clear WINDOW type before opening the window, return directly the value from OnCustomDraw and from OnNotify, instead saving the return value in DWL_MSGRESULT.
Attached zipped main.eba modified to use a window.
Thanks again, Sapero
Larry