Creating ActiveX user interface.

Hi, I want to develope an activeX grid control. My background in activeX creation is that I have just developed a graph control. I want to ask that how can I create the interface of grid(drawing of lines and columns. How should I start it.

Depending on how sophisticated you want it you can do it 3 obvious ways :-

(i) Make your control based on the ListView control. In details mode this is kind of a grid with column headings. By using ownerdraw you can paint anything you like anywhere in the list. The downside to this approach is loss of flexibility. You will only be able to "bend" the standard list view so much.

(ii) Paint everything yourself

Basically use the standard windows scroll bars, but as far as the grid is concerned do all painting of grid elements yourself, you know how to do lines boxes etc. from your graph experience. Basically the same approach for a grid. The hard part is when you want to do in-place editing. You can either process key strokes or create an edit control as a child window at the right X,Y position.

When you paint the grid this way, a good trick is paint via an off screen bitmap and bitblt it to the control. This will give the appearance of less flickering.

(iii) Create many controls, edits, combos and perhaps even your own custom controls for grid cells (e.g. WS_CHILD is part of their style). Then use MoveWindow to scroll them around in response to scroll bars etc. The problem with this approach is speed. Moving many controls may be too slow. Ideally you only want to create those controls which are active and use (ii) for painting parts of the grid which don't change

Featured Post

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard.
The reason is the 'save box mode' in adobe reader X.
Many people think the protected Mode of adobe reader x is only to stop the write access.
But this fe…

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.

NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…