|
i need hard , new ,amazing gradution project
about 4 persons
|
|
|
|
|
When resizing columns, we needed the right side of the grid to remain anchored in place. The current state of this control doesn't allow that, so here's what I did to make it go:
In the GridCtrl.cpp file, and in OnLButtonUp function, look for the else if code that handles the m_MouseMode == MOUSE_SIZING_COL , and replace that enitre section with the following (it's easier to do that to direct you to the precise spot in the code):
else if (m_MouseMode == MOUSE_SIZING_COL)
{
CRect rect;
GetClientRect(rect);
CRect invertedRect(m_LastMousePoint.x, rect.top, m_LastMousePoint.x + 2, rect.bottom);
CDC* pDC = GetDC();
if (pDC)
{
pDC->InvertRect(&invertedRect);
ReleaseDC(pDC);
}
if (m_LeftClickDownPoint != point && (point.x != 0 || point.y != 0))
{
CPoint start;
if (!GetCellOrigin(m_LeftClickDownCell, &start))
{
return;
}
int nCol = m_LeftClickDownCell.col;
int nColumnWidth = max(point.x - start.x, m_bAllowColHide? 0 : 1);
if (!m_bAllowFrozenColumnResize)
{
SetColumnWidth(nCol, nColumnWidth);
}
else
{
if (nCol < GetColumnCount() - 1)
{
int nThisColWidth = GetColumnWidth(nCol);
int nNextColWidth = GetColumnWidth(nCol + 1);
int nWidthDiff = nThisColWidth - nColumnWidth;
int nNewWidth = 0;
if (nWidthDiff > 0)
{
nNewWidth = nNextColWidth + nWidthDiff;
SetColumnWidth(nCol, nColumnWidth);
SetColumnWidth(nCol + 1, nNewWidth);
}
else
{
nNewWidth = nNextColWidth - (nColumnWidth - nThisColWidth);
SetColumnWidth(nCol + 1, nNewWidth);
SetColumnWidth(nCol, nColumnWidth);
}
}
}
ResetScrollBars();
Invalidate();
}
}
Next, add the following to the header file
protected:
BOOL m_bAllowFrozenColumnResize;
public:
void SetFrozenColumnResize(BOOL bVal) { m_bAllowFrozenColumnResize = bVal; };
During the initialization of your grid (after you specify columns), add a call to SetFrozenColumnResize and pass TRUE as the parameter to se this new column resizing work.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
We use this grid control in one of our apps, and I had cause to add code to blink the cells (background and foreground). If anyone is interested, I can post the code.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Heaven Forbit! blinking text is a quick way to get your product tossed into the trash can.
|
|
|
|
|
Unless the customer asks for it...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John - hope all is well with you (and whatever Grid-Iron team you were following won). I know its a long while ago you posted this offer, but I'm going to have a need to flash cells in a grid to indicate failures to a user in an upcoming project
If you could post the code, it would be great
cheers & thanks
Garth
ps .. saw some clips from here in Aus - some of the adverts cracked me up - pity the weather was cr*p
|
|
|
|
|
As a matter of fact, I posted an article.
http://www.codeproject.com/miscctrl/blinkgrid.asp[^]
If you have any questions/problems the code, just ask.
I didn't watch the game beyond oohing and ahhhing over the sheer spectacularity that is hi-definition television. After a couple of places and watching the over-produced statistics graphics, I changed channel to animal planet and watched Puppy Bowl III.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks John - missed the article, got it now
cheers, Garth
|
|
|
|
|
I need to get the WM_MOUSEMOVE message reflected back to the parent window.
Can someone suuggest the best way to accomplish this?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Never mind...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Trying to add a combo box into a grid control in my program. The items in the combo box are displayed quite fine however when I select an item and the cell with the combo box then loses focus the text disappears.
I suspect the problem is somewhere in the CInPlaceList class. In CInPlaceList::EndEdit if I remove the call
PostMessage(WM_CLOSE, 0, 0);
at the end of the method the text doesn't disappear but the instance of CInPlaceList remains on screen so you can get some bizarre drawing effects. Not what I was looking for but it works. It seems as though the call to PostMessage is erasing the contents of the cell.
I'm pretty sure I'm just not making use of the CGridCellCombo class properly as I'm still trying to figure out all the ins and outs of the grid control.
Rob Segal
3DNA Corporation
www.3dna.net
|
|
|
|
|
void CGridCell::Reset()
{
CGridCellBase::Reset();
m_strText.Empty();
*********************************************
m_lParam = NULL; // BUG FIX J. Bloggs 20/10/03
*********************************************
m_nImage = -1;
m_pGrid = NULL;
m_bEditing = FALSE;
m_pEditWnd = NULL;
m_nFormat = (DWORD)-1;
m_crBkClr = CLR_DEFAULT;
m_crFgClr = CLR_DEFAULT;
m_nMargin = (UINT)-1;
delete m_plfFont;
m_plfFont = NULL;
}
|
|
|
|
|
|
Hi there,
In an effort to internationalise my application I have chosen to create resource only dlls to support languages other than English. When I load my resources from say the French dll most of them work fine except that my dialogs with the MFCGridCtrl in them do not display at all. Does anyone know why this is happening and is there a solution.
cheers
Dave
|
|
|
|
|
I use following code,but seems something is wrong:
<br />
m_Grid.SetCellType(nRow,nCol,RUNTIME_CLASS(CGridBtnCell));<br />
CGridBtnCell* pGridBtn=(CGridBtnCell*)m_Grid.GetCell(1,1);<br />
pGridBtn->SetBtnDataBase(&m_BtnDataBase);<br />
pGridBtn->SetGrid(&m_Grid);<br />
<br />
pGridBtn->SetupBtns(0,DFC_BUTTON,DFCS_BUTTONCHECK,<br />
CGridBtnCellBase::CTL_ALIGN_RIGHT,16,FALSE,NULL);<br />
<br />
pGridBtn->Reset();
<br />
pGridBtn->SetupBtns(0,DFC_BUTTON,DFCS_BUTTONCHECK,<br />
CGridBtnCellBase::CTL_ALIGN_RIGHT,16,FALSE,NULL);
How to fix this?Thanks in advance!
Say hello to my little friend.
|
|
|
|
|
Hello sir
Can I make use of this projects? How can get thi grid control project? How cani download???Help me
Padma
|
|
|
|
|
Start with the following link which will provide links to the code: http://www.codeproject.com/miscctrl/gridctrl.asp
|
|
|
|
|
Hello sir
Can I make use of this projects? How can get thi grid control project? How cani download???Help me
Padma
|
|
|
|
|
gridctrl_demo224
Running the .exe
The C:\Windows\System\mfc70.dll file appears to be corrupt. Reinstall the file, and then try again.
Windows cannot run this program because it is in an invalid format.
gridctrldemo.dsw
compiles fine
This application or DLL can not be loaded on Windows 95 or on Windows 3.1. It takes advantage of Unicode features only available on Windows NT.
The MFC42u.dll file cannot start. Check the file to determine the problem.
gridctrldemoCE.dsw
This project does not contain any configurations whose platforms are supported by this installation of Developer Studio. You will need to create a new supported configuration before you will be able to build, run or debug your project.
What’s the difference between gridctrl_demo224 and Chris Maunder’s grid control he has on another website. They are not the same. Very confusing to have two grid controls on two different sites but written by the same person(s).
|
|
|
|
|
mx482 wrote:
The C:\Windows\System\mfc70.dll file appears to be corrupt. Reinstall the file, and then try again.
Unfortunately issues with MFC70.dll aren't something I can help with.
mx482 wrote:
This application or DLL can not be loaded on Windows 95 or on Windows 3.1. It takes advantage of Unicode features only available on Windows NT.
Recompile the application using the non-Unicode configuration.
mx482 wrote:
This project does not contain any configurations whose platforms are supported by this installation of Developer Studio. You will need to create a new supported configuration before you will be able to build, run or debug your project.
Remove gridctrldemoCE from the active projects. This is the WinCE build.
mx482 wrote:
What’s the difference between gridctrl_demo224 and Chris Maunder’s grid control he has on another website.
My old geocities site is 4 years old and I no longer have access to it. Check out the dates and you'll see that the grid on CodeProject is by far the newer version.
mx482 wrote:
Very confusing to have two grid controls on two different sites but written by the same person(s).
It's very rare to only ever release a single version of a product. The version numbers should help sort out which version is the one to use.
cheers,
Chris Maunder
|
|
|
|
|
Thanks Chris,
Yes it is rare to only ever release single version of a product. But unfortunately there were no version numbers on the grid from your extinct site. I could have made the determination easily then.
How do you recompile a project using non Unicode configuration?
Thanks again. Jay
|
|
|
|
|
mx482 wrote:
How do you recompile a project using non Unicode configuration?
In VC++, go to Build -> Set Active Configuration.
If you're going to go back and forth among multiple configs, it might be helpful to display the Build or Build Minibar toolbars. Right click on any toolbar to get a list of ones you can display.
HTH,
Philip
|
|
|
|
|
Hy,
there is a bug in load:
Wrong:
// Read in rest of data
int nItem = 0;
Right:
// Read in rest of data
int nItem = 1;
nItem must be 1.
Bye - Robert
|
|
|
|
|
I used Grid Control for over a year.
When upgraded VC++ 6.0 to service pack 5 i got
error C2065: 'SPI_GETWHEELSCROLLLINES' : undeclared identifier
The obvious workaround is to put at the top of GridCtrl.cpp these lines
#ifndef SPI_GETWHEELSCROLLLINES
#define SPI_GETWHEELSCROLLLINES 104
#endif
What is not so clear is what happened to the compiler include files.
After a compare I found in MFC\Include\AFXV_W32.H the line
//#define _WIN32_WINDOWS 0x0500
commented!
Does anyone knows why MS did this?
Giovanni Verzino
MARS Center http://www.marscenter.it/
Via E. Gianturco, 31 ftp://ftp.marscenter.it/
80146 Napoli, Italy
|
|
|
|
|
I've been using the Grid for manipulating text in the cells. Works like a charm!
Now I want to store and retrieve data from cells as a double precision number so I can perform data manipulation directly on the cells. Would someone like to explain the correct way to do this (code example). Is it using the GVIF_ITEM mask?
Thanks.
|
|
|
|