Originally posted by: Rami Quttaineh
Hi :
I'm new in DataBase with MFC,so can you send me the full sourcecode for this article.
thanks
Rami Quttaineh
Amman-Jordan
Originally posted by: lufeng
I use DBGrid.ocx a week,but didn't pass the program until find your article.Because I don't modify
"RowBuffer(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch,FALSE) {}"
Thank you very much!
why can't relesase lpdispatch?
Originally posted by: Mr. Lee
Hi , My name is Mr. Lee , I'm from Korea
if you send me a full code. I will thank you very much!!!
Originally posted by: Tapas Guha
I am new to the area of MFC programming area.I am trying to find out a simple grid, which can be used as unbound mode.Can you give me a sample program which will demonstrate how to use DBGrid.Thanx for your help in advance.
ReplyOriginally posted by: Dhirendra
Please sir/mam can you send me the code of full running program program in which the data is got from an array insted of the database from you personal library.
I shall be highly grateful to you.
Thanks in Advance
Dp
Originally posted by: Mike Gao
Could you please tell me how to generate RowBuffer class?
Thanks a lot.
Originally posted by: get
How to generate RowBuffer from OCX's type library??
Reply
Originally posted by: Mohamed Abdelmonem
This code is here for you, programmers, to modify and correct.. it malfunctions!
void CMatrixInput::OnUnboundReadDataDbgrid1(LPDISPATCH RowBuf, VARIANT FAR* StartLocation, BOOL
ReadPriorRows)
{
long CurRow,Row=0,RowsFetched; short Incr;
RowBuffer buf(RowBuf);
COleVariant v;
Incr= (ReadPriorRows) ? -1:1;
if (StartLocation->vt==VT_NULL)
if(ReadPriorRows)
CurRow=buf.GetRowCount()-1;
else
CurRow=0;
else
CurRow=StartLocation->lVal+Incr;
for(Row=0;Row< buf.GetRowCount();Row++)
{
if (CurRow < 0 || CurRow >= 3) break;
buf.SetValue(Row,0,v);
v=CurRow;
buf.SetBookmark(Row,v);
CurRow+=Incr;
RowsFetched++;
}
buf.SetRowCount(RowsFetched);
}
by the code above i meant only to test the dbgrid control not to use it the right way..
THE GRID CONTROL INSISTS NOT TO DISPLAY MORE THAN ONE ROW