subitem select & edit
-
Hello! I'm programming a database application in VC++ 2010 purely on Win32 API and DB classes. I started using ListView common control for showing tables data. I plan also support for any SELECT queries, and also - support for editing data right in the grid. But... ListView is messed around items, but not subitems. I can't select subitemes. Nor I can edit their values right in the grid. Is there a way to avoid this bottleneck? Maybe subclassing a window will be a hit? If someone will give some hints, maybe post links to some useful resources, I will appreciate this! NB! Don't wanna move to .NET or С++ Builder, as one of my goals when I started this project was to maintaim my WinAPI skills!
-
Hello! I'm programming a database application in VC++ 2010 purely on Win32 API and DB classes. I started using ListView common control for showing tables data. I plan also support for any SELECT queries, and also - support for editing data right in the grid. But... ListView is messed around items, but not subitems. I can't select subitemes. Nor I can edit their values right in the grid. Is there a way to avoid this bottleneck? Maybe subclassing a window will be a hit? If someone will give some hints, maybe post links to some useful resources, I will appreciate this! NB! Don't wanna move to .NET or С++ Builder, as one of my goals when I started this project was to maintaim my WinAPI skills!
Unfortunately the
ListView
does not offer this functionality so you would need to use subclassing to add it yourself. Alternatively you could try a Google search to see if anyone has implemented a GridView in pure Win32. Our Great Leader[^] has done one in MFC[^] so you could take a look at that and see if it can be adapted to your needs.Programming is work, it isn't finger painting. Luc Pattyn
-
Unfortunately the
ListView
does not offer this functionality so you would need to use subclassing to add it yourself. Alternatively you could try a Google search to see if anyone has implemented a GridView in pure Win32. Our Great Leader[^] has done one in MFC[^] so you could take a look at that and see if it can be adapted to your needs.Programming is work, it isn't finger painting. Luc Pattyn
Richard, thanks for the link! I never wrote MFC-based programs, but I think that I can borrow some ideas from there. Now I start thinking that I can get rid of the Header Common Contol and draw the contents of the table all by my self, not worring only of the grid headers.