|
what is the synonimous of the function GetClip() in MSFlexGrid in the MFC-Grid Control. thinks.
|
|
|
|
|
Hi,
I am using this grid to display quotes, in real time.
in debug mode it works. but in release mode,data is not stable,
some times it flashes, and some times no data.
and one more thing , if i change the text,the second fixed column
is not changing. can any body help????
regards
jay
|
|
|
|
|
High jay,
I've the same problems like you wrote!
I posted my questions since weeks without any response. So my advice don't wait for an answer, buy a professional grid control. For my opinion - and I'really like this site - you can learn much from this grid control, but I think it is not intended to use it in professional applications!
Ralph
|
|
|
|
|
Hi Ralph,
thanks a lot for your info.
I just now purchased VSflexGrid Pro, from www.componentone.com
|
|
|
|
|
Hi,
I wrote the following line :
m_grid.GetCell( 1, 1)->SetText("First line\nSecond line");
and enabled the tool tips.
However the tip for the (1,1) cell appeared as one line ,
meaning '\n' didn't do a thing
How do I make the tip to appear as two lines
or how do I create a multiline tip
Daniel Mark
Thanks
|
|
|
|
|
in the TitleTip.cpp
you should replace the line:
dc.TextOut( 0, 0, strTitle );
with
dc.DrawText(strTitle,strTitle.GetLength(), ......
where the strTitle contains all your data including "\n".
Before calling the DrawText fuction, you should recalc the rect.
|
|
|
|
|
It seems that there is a problem whereby the grid
doesn't get registered as a drop target unless it
contains scroll bars.
If I place a custom control box that is bigger than
the grid (and thus no scroll bars are necessary) then
I can pick the text, but cannot drop it onto that grid.
I would think drag and drop on a grid that requires
scrolling is a bit of a problem!!
Michael Katzmann
|
|
|
|
|
I have a DTCrecordset control, and a form manager control on my web page.
When I insert a record, then update the record shows it is updated.
If I hit the refresh button on my web browser it gives me a popup message to retry or cancel, if someone hits retry it creates another record. Does anyone Know a way around this?
LK
|
|
|
|
|
I had to make the following minor change in order to get it to work within our application where we've internationalized, placing all of our resources in a separate .DLL (any dialog which had a CGridCtrl would fail to load):
change
HINSTANCE hInst = AfxGetInstanceHandle();
to:
HINSTANCE hInst = AfxGetResourceHandle();
Steve Wolf
|
|
|
|
|
I'm trying to use the grid control in a CFormView-based class, by inserting a custom control in the dialog. My application fails with "Failed to create empty document" message at start, this seems to be caused by failure in CFrameWnd::LoadFrame() to create the main window. Any ideas on how to make this work?
|
|
|
|
|
forget about subclassing the dialog custom control and create the control at runtime on the formview's initialupdate call, that's how i'm doing it in my program ie i have a seperation function cll CreateGrids()
called from CFormView::OnInitalUpdate();
// protected member variable initalized in constructor to null
// CGridCtrl* m_pTopScoresGrid
CFormClassView::OnInitialUpdate()
{
if (m_pTopScoresGrid == NULL)
{
// Create the Gridctrl object
m_pTopScoresGrid = new CGridCtrl(6,12,2,1);
if (!m_pTopScoresGrid) return ;
// Create the Gridctrl window
rect.left=220;
rect.right=rect.left+370;
rect.top=30;
rect.bottom= rect.top+178;
m_pTopScoresGrid->Create(rect, this, 100);
m_pTopScoresGrid->EnableWysiwygPrinting();
m_pTopScoresGrid->SetEditable(FALSE);
for(int i=1; i< m_pTopScoresGrid->GetColumnCount(); i++)
m_pTopScoresGrid->SetColumnWidth(i,24);
for(int j=0; j < m_pTopScoresGrid->GetRowCount(); j++)
m_pTopScoresGrid->SetRowHeight(j,26);
} // end of CFormClassView::OnInitalUpdate
// of course you might want a line or 2 in the OnSize function
// so that the grid will size with the window for the view like
void CFormClassView::OnSize(UINT nType, int cx, int cy)
CFormView::OnSize(nType, cx, cy);
CRect cRect;
CRect tsRect;
GetClientRect(cRect);
// make sure we have a grid to resize
if(m_pTopScoresGrid!=NULL )
{
tsRect.left=220;
tsRect.right=cRect.right-12;
tsRect.top=30;
tsRect.bottom=tsRect.top+182;
m_pTopScoresGrid->MoveWindow(&tsRect);
} // make sure pointers have vaild window objects
} // end of CFormClassView::OnSize
i've don't particularly like having to subclass the custom control in the dialog code, this way is
easier, for me. you may have to finesse the rect to get the control where you want it.
|
|
|
|
|
|
Hi,
I am using the Grid Control with some Check Boxes, and I need some of the check boxes to be centered, and some to be left aligned. The current Version 2.22 does not allow this. Either all check boxes are left, or centered. Here is my fix.
BOOL CCellCheckBox::Draw(CDC* pDC, int nRow, int nCol, CRect rect, BOOL bEraseBkgnd )
{
.
.
.
.
DWORD nFormat=GetFormat();
if (nFormat & DT_RIGHT) rectCheck.left=rectCheck.right-nSize;
if (nFormat & DT_CENTER)
{
rectCheck.left=rect.CenterPoint().x -(nSize>>1);
rectCheck.right=rectCheck.left+nSize;
}
if (nFormat & DT_TOP) rectCheck.bottom=rectCheck.top+nSize;
if (nFormat & DT_BOTTOM) rectCheck.top=rectCheck.bottom-nSize;
if (nFormat & DT_VCENTER)
{
rectCheck.top = rect.CenterPoint().y - (nSize>>1);
rectCheck.bottom = rectCheck.top + nSize;
}
.
.
.
}
Thanks,
Peter Tewkesbury
Software Developer - Manchester, England
|
|
|
|
|
Hi,
did anybody make a modification for data binding? Read only ODBC level 1 would be enough - just adding several properties for ODBC connection and SQL string.
|
|
|
|
|
Hi,
That is not very difficult. You can do it by self.
But now I am making the grid to read content from ADO
recordset. But the task is not finished. That have any
help for you?
|
|
|
|
|
hi,
how do i get each mfc grid's cell support DDE linkings?
|
|
|
|
|
salut,
nous avons rencontré un problème concernant la base de donnée.
la question se pose comment fait un lien entre le controle Editbox et les champs de la base on a utilisé le composant ADO pour la connexion avec la base et notre application sera réalisée suivant le type dialog-based.
|
|
|
|
|
Hi!
I wanted to change the background color of an individual cell and I tried to do it changing crBkClr but it didn't work...
Do u have any idea of how to do it??
|
|
|
|
|
Hi, You can do this by SetItemBkColour function. I am sure this function is good.
cz
|
|
|
|
|
In v2.22 I've applied the format to remove DT_SINGLELINE DT_VCENTER and the ELLIPSIS stuff, but I'm having trouble getting multi-line cells to auto size. They don't. The extent stuff in the cell classes doesn't actually use the cell width, so I guess that's a non-starter. I added a GetTextExtentEx which also took a col width, but it seems that the height I get back is way too big for the row itself, I'm getting 8 or 9 lines height when I only need 2 or 3. Anyone any advice?
|
|
|
|
|
Not unusually, this was my fault
My mods were all correct, but the problem was I was resizing the rows before setting the normal (larger) column widths in the appropriate columns. Doh!
|
|
|
|
|
Does anyone know how to get the corresponding row numbers for the CGridCellBase objects in the
sorting comparison function? The sorting requirements that I have specify that the grid should be sort by the column selected and a column that contains a price. I know that I can
handle this in the comparison function if I can determine the corresponding row numbers.
Thanks in advance for your help,
Danny
|
|
|
|
|
Hello
I have changed the version of the CGridCtrl class from V2.11 to V2.22 and now the CComboBox doesnt work correctly anymore.
Example: The user selects a string from CCombox and left the active cell => the selected string disappears.
Who can help me ?
|
|
|
|
|
Are there any known issues with the Grid under Windows 95?
I develop using VC++ 5.0 on a Windows NT (SP6) machine. I've added a Grid to a dialog. The dialog is invoked modally from a CButton on a DocView. Under NT the dialog runs perfectly, both from the IDE and fully compiled (as an .EXE). However, if I run the EXE on a Windows 95 machine the entire dialog will not display. Oddly, it does NOT generate an error either.
I've "one by one" removed each control from the dialog and it is definitely the Grid that is causing the problem (or atleast my implementation of it). Any help or ideas would be greatly appreciated.
Mike Mullikin
|
|
|
|
|
There was an issue that had to do with the OLE initialisation, but I thought that had been fixed long ago. I haven't touched win95 for a year or so, os mayhbe the issue has cropped back up again in more recent version.
cheers,
Chris Maunder
|
|
|
|