News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Advanced grid custom control

Started by KetilO, December 20, 2004, 10:22:33 AM

Previous topic - Next topic

KetilO

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]

KetilO

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

Farabi

Hi mr ketil. Do you draw the text your self?
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

KetilO

Yes, all the drawing is done by RAGrid.

KetilO

KetilO

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

KetilO

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

Laszlo

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?

KetilO

Hi Laszlo

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

KetilO

MrBcx

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

KetilO

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

ecube

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.

FritzGamaliel

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

KetilO

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