Advanced grid custom control.
Download Documentation

Note: RaGrid doesn't support Unicode by design and that will probably never change. Its open-source however.
Posted 16 May 2007 - 10:21 AM

Posted 16 May 2007 - 10:38 AM
Posted 16 May 2007 - 11:17 AM
#SingleInstance, force
Gui, +LastFound +Resize
hwnd := WinExist()
RG_Init()
hGrd := RG_Add(hwnd, 4, 4, 500, 300, STYLE_VGRIDLINES | STYLE_GRIDLINES )
RG_AddColumn(hGrd, "cap=Name", "w=150", "ha=2", "ca=2" )
RG_AddColumn(hGrd, "cap=Ext", "w=50", "ha=1", "ca=1")
RG_AddColumn(hGrd, "cap=Time", "w=125", "ha=1", "ca=1")
RG_AddColumn(hGrd, "cap=Size", "w=75", "ha=1", "ca=1")
RG_SetFont(hGrd, "s10 bold, Arial")
RG_SetColors(hGrd, "BAAEEFF G551100 T005588")
Loop %A_WinDir%\*.bmp
{
aCol1 := A_LoopFileName
aCol2 := A_LoopFileExt
FormatTime aCol3, %A_LoopFileTimeModified%, yyyy-MM-dd HH:mm:ss
aCol4 := A_LoopFileSize
RG_AddRow(hGrd, "aCol")
}
RG_SetHdrHeight(hGrd, 30)
RG_SetRowHeight(hGrd, 22)
RG_Sort(hGrd, 0, 1)
Gui, Show, w510 h310
return
GuiClose:
GuiEscape:
ExitApp
InsertInteger(pInteger, ByRef pDest, pOffset = 0, pSize = 4)
{
Loop %pSize% ; Copy each byte in the integer into the structure as raw binary data.
DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
}
#Include RaGrid.ahk
RG_AddRow(hGrd, aColName){
local RAW, colCount
SendMessage GM_GETCOLCOUNT,,,, ahk_id %hGrd%
colCount := ErrorLevel
VarSetCapacity(RAW, 4 * colCount, 0)
Loop %colCount%
{
InsertInteger(&%aColName%%A_Index%, RAW, (A_Index - 1) * 4)
}
SendMessage,GM_ADDROW,0,&RAW,, ahk_id %hGrd%
return ErrorLevel
}
Posted 16 May 2007 - 11:28 AM
You yesterday told me that I am uniquely rude.You are a very kind man!
I had no intention to present full blown API to this control, nor that will be the case for others until I need them.I had to add more flexibility to the RA_AddRow function.
Posted 16 May 2007 - 11:46 AM
You yesterday told me that I am uniquely rude.You are a very kind man!
I can assure you that you would not find a single post of mine with that word.I like you because of this unique property of yours
Posted 16 May 2007 - 11:58 AM
Well, there are freaks around, you never know.Nobody in this forum would believe that I would say so.
Acctually, there are other Extreme Grid controls around, waiting to be found by inocent civilians... some look like Excell in 20K dll... Perhaps when your "client" start to be more demanding :lol:You knew I was searching for this but you gave me no hopes, and have posted the solution.
You are welcome.Thank you.
Posted 16 May 2007 - 12:04 PM
Posted 16 May 2007 - 12:58 PM
Posted 16 May 2007 - 01:04 PM
Acctually, I have collection of "missing controls" here, like 15 of them collected from different ASM forums in previous days, doing all kind of stuff in ridiculously small dll's - playing videos, simulating paint, lil' hex editors etc... All of these controls together are like 150K, waiting for the civilians to notice them...
Posted 01 June 2007 - 04:18 PM
Posted 01 June 2007 - 04:49 PM
Awesome job...I'll work on expanding the properties dialog to include the new functions. I should have a decent amount of work done by the end of the weekend.A new version, very functional and ready.
The only thing I didn't wrap are notification handlers for text change, button clicks etc. This is fairly trivial to add, but I didn't have time now.
Posted 01 June 2007 - 08:54 PM
Posted 02 June 2007 - 02:41 PM
Posted 19 June 2007 - 09:15 AM
Posted 07 November 2007 - 07:57 PM