Skip to main content
GameDev.net gamedev.net
🔒 Locked

DataGridView in plain C/C++

Started by Fredericvo Jul 13, 2016 at 1:19 PM 2 replies 3.5k views
Original Post
Fredericvo
Fredericvo

I want to create a non-game program that makes extensive use of the ListView but one thing that bothered me was the apparent impossibility to set a border colour for it. The default colour is way too light. Owner/Customdraw don't allow it or at least not in a way that I know. I discovered that Windows Forms and WPF use something called DataGridView and it's visual appearance is way more appealing and it seems a lot more powerful overall than the humble built-in winapi listview. What I wanted in the first place, set a darker border colour also seems absolutely trivial there. If possible though I would like to avoid having to use CLR or C#.

I compiled a small winforms program with a datagrid and ran dependency viewer on it so I could see which dlls are in use and the only extra dll of interest I saw seemed to be mscoree.dll. I read that .NET functionality is implemented in this dll but what I wonder and this is my question is whether there's a way to use datagrid from plain C/C++? Or is there a lot more involved? Is that even the dll that implements datagrid? I couldn't see useful functions exported from mscoree.dll although I only did a quick visual inspection of them. Then again there is no CreateListview function in user32 either, only a pre-registered window class and associated windows messages... I assume datagrid, if at all possible to use from C, does something similar?

ferrous
ferrous

If you really don't want to use CLR/C#, I think you're probably better off using a C++ GUI library like Qt.

Fredericvo
Fredericvo

If you really don't want to use CLR/C#, I think you're probably better off using a C++ GUI library like Qt.

I had thought of trying XPTable. I think Qt has a learning curve of its own and portability is a non-issue to me.

I'm still wondering whether using DataGridView is technically possible though.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.