The MASM Forum Archive 2004 to 2012

Specialised Projects => Custom Interface Components => Topic started by: KetilO on December 20, 2004, 10:22:33 AM

Title: Advanced grid custom control
Post by: KetilO on December 20, 2004, 10:22:33 AM
Hi all

Advanced grid custom control.
With demos and full source.

KetilO

02-07-2005, 61 dl, Version 2.0.0.6 uploaded.
01-13-2006, 230 dl, Version 2.0.1.2 uploaded.
01-17-2006, 9 dl, Version 2.0.1.3 uploaded.

[attachment deleted by admin]
Title: Re: Advanced grid custom control
Post by: KetilO on February 07, 2005, 01:58:28 PM
Hi all

Version 2.0.0.6 is uploaded.

Whats new:
- Several improvements on combobox column type.
- Added column type TYPE_EDITBUTTON. Combines button and edittext types.

KetilO
Title: Re: Advanced grid custom control
Post by: Farabi on April 19, 2005, 05:06:12 AM
Hi mr ketil. Do you draw the text your self?
Title: Re: Advanced grid custom control
Post by: KetilO on April 19, 2005, 06:02:47 AM
Yes, all the drawing is done by RAGrid.

KetilO
Title: Re: Advanced grid custom control
Post by: KetilO on January 13, 2006, 09:39:06 AM
Hi all

Version 2.0.1.2 is uploaded.

Whats new since version 2.0.1.1:
- Fixed bug where scrollbars would not show.
- Added ColSize style. Makes it possible to prevent user column resizing.

KetilO
Title: Re: Advanced grid custom control
Post by: KetilO on January 17, 2006, 08:49:13 AM
Hi all

Version 2.0.1.3 is uploaded.

Whats new since version 2.0.1.2:
- Fixed a bug where GM_RESETCONTENT could cause a GPF if format strings were used.

KetilO
Title: Re: Advanced grid custom control - license
Post by: Laszlo on November 28, 2008, 06:16:13 PM
RAgrid is very good, fast and small. Just love it!
I could not find anything about usage terms, though. I'd like to include the RAgrid.dll in a freeware utility, distributed with a special purpose pointing device. Of course I give credit in the About box to the author, but are there any limitations for inclusion?
Title: Re: Advanced grid custom control
Post by: KetilO on November 28, 2008, 11:52:26 PM
Hi Laszlo

None at all.
You can use all my custom controls in any way you see fit.

KetilO
Title: Re: Advanced grid custom control
Post by: MrBcx on December 07, 2008, 03:28:36 PM
Quote from: KetilO on December 20, 2004, 10:22:33 AM

Thanks for the wonderful control KetilO!

I've wanted a custom control like this for quite some time.

Two implementation questions:

Is there a way to catch (right-click notifications) and/or (double-click notifications),
either on the column headers or on individual cells, either directly or by subclassing the control?

Best Regards,
~ MrBcx ~
www.bcxgurus.com
Title: Re: Advanced grid custom control
Post by: KetilO on December 08, 2008, 07:48:10 AM
Hi

There is no easy way to subclass since both the grid control and the header are child windows.
Use EnumChildWindows to get the child windows and then subclass them.

KetilO
Title: Re: Advanced grid custom control
Post by: ecube on February 21, 2009, 12:31:33 AM
you're the man ketil0, your codes so clean and well written, i'm convinced you're really icezlion :) he's the only other ASM developer that i've seen do things to your level.
Title: Re: Advanced grid custom control
Post by: FritzGamaliel on March 23, 2010, 05:07:05 AM
I have created a datagrid in windows(not dialog) with the structure below:

ID      Name     TotalAssets(US$)
1       A            55
2       B            23

Now, I have a problem:
1.  I want to get a data from column 3 row 2 (TotalAssets: 23). Then, I show it via MessageBox.
I have tried  code below:

   invoke SendMessage,hGrd,GM_GETCURROW,0,0
   mov      ecx,eax
   invoke SendMessage,hGrd,GM_CELLCONVERT,ecx,addr buffer
   invoke MessageBox,hWin,addr buffer,addr buffer,MB_OK

But it always show data from column 1 row 1 (ID: 1).

could you help me to solve my problem?
Thank you
Fritz
Title: Re: Advanced grid custom control
Post by: KetilO on March 29, 2010, 11:40:03 AM
Hi

To get data from current cell:

invoke SendMessage,hGrd,GM_GETCURSEL,0,0
mov ecx,eax
invoke SendMessage,hGrd,GM_CELLCONVERT,ecx,addr buffer
invoke MessageBox,hWin,addr buffer,addr buffer,MB_OK


To get data from col 3, row 2

mov ecx,(2 shl 16) or 3 ; row in high word, col in low word
invoke SendMessage,hGrd,GM_CELLCONVERT,ecx,addr buffer
invoke MessageBox,hWin,addr buffer,addr buffer,MB_OK


KetilO