MFC Grid control 2.26
-
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
-
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
this question is directly related to the use of the sources of that article. consequently, you'd be glad to ask this question in the forum at the bottom of the article, so that the author will directly get notified.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
-
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
capint wrote:
...when I created, it failed.
Which means what exactly?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
As a wild guess (because you didn't provide a lot of usefull information): do you have a DDX_GridControl line in your DoDataExchange function from your dialog class ? If not, then you'll need to add one.
Cédric Moonen Software developer
Charting control [v1.4] -
I read the article MFC Grid control 2.26 (By Chris Maunder). I added necessary files. I created a custom control, named it, created a variable of CGridCtrl class but when I created, it failed. Some one who used to use this class successfully plz show me a solution. Thanks !:rose:
Can you more explain?
-
Can you more explain?
I'll show exactly what I did so that you can help me :sigh: I put a custom control, add class name as MFCGridCtrl In the file .h, I add the variable CGridCtrl grid. In the file .cpp, at the function DoDataExchange, I add manually DDX_GridControl(pDX, IDC_CUSTOM3, grid); And I create by the function grid.Create() But it show the error : Debug Assertion Failed
-
I'll show exactly what I did so that you can help me :sigh: I put a custom control, add class name as MFCGridCtrl In the file .h, I add the variable CGridCtrl grid. In the file .cpp, at the function DoDataExchange, I add manually DDX_GridControl(pDX, IDC_CUSTOM3, grid); And I create by the function grid.Create() But it show the error : Debug Assertion Failed
Does identify of IDC_CUSTOM3 is unique on the resource file?
-
Does identify of IDC_CUSTOM3 is unique on the resource file?
-
Did you use of breakpoints for trace your code line to line and if yes did you see which line has error?
-
Did you use of breakpoints for trace your code line to line and if yes did you see which line has error?
-
When I debug, the debugger stop at the line : ASSERT(pWnd->m_hWnd == NULL); in the file wincore.cpp I used : grid.Create(rect, this, 1); I don't know if the handle of window parent is true or false :confused:
It seems that you have a null hwnd does grid.Create(rect, this, 1);(and did you see that rect and this are valid or they are empty) has return value if yes what is it and do you want to use of MFC grid on your project or when you want to compile it you got this error?
-
It seems that you have a null hwnd does grid.Create(rect, this, 1);(and did you see that rect and this are valid or they are empty) has return value if yes what is it and do you want to use of MFC grid on your project or when you want to compile it you got this error?
The error doesn't come from my project because I just create a blank based dialog. Of course, rect & this are valid ( I use the pointer this in OnInitDialog()) I uploaded my file so that you can see clearly : http://www.mediafire.com/?ijb5p1vxgme[^] Plz help me :-O
-
The error doesn't come from my project because I just create a blank based dialog. Of course, rect & this are valid ( I use the pointer this in OnInitDialog()) I uploaded my file so that you can see clearly : http://www.mediafire.com/?ijb5p1vxgme[^] Plz help me :-O
You must wait until I compile your project.
-
The error doesn't come from my project because I just create a blank based dialog. Of course, rect & this are valid ( I use the pointer this in OnInitDialog()) I uploaded my file so that you can see clearly : http://www.mediafire.com/?ijb5p1vxgme[^] Plz help me :-O
compile your code with /* CGridCtrl grid; RECT rect; rect.top = 10; rect.left = 10; rect.bottom = 50; rect. right = 50; //CWnd * pWnd; //pWnd->GetParent(); grid.Create(rect, this, 1); */ For test insert these statement grid.InsertColumn(_T("111")); grid.InsertColumn(_T("111")); grid.InsertColumn(_T("111")); grid.InsertRow(_T("112")); grid.InsertRow(_T("112")); grid.InsertRow(_T("112")); ;P
-
The error doesn't come from my project because I just create a blank based dialog. Of course, rect & this are valid ( I use the pointer this in OnInitDialog()) I uploaded my file so that you can see clearly : http://www.mediafire.com/?ijb5p1vxgme[^] Plz help me :-O
Does your problem solve?
-
Does your problem solve?
-
First your think was good for upload your project because this error needed to see code and when I compiled your code I saw you dont need to make a control that is exist and delete Create and I replied to you,I asked of you yesterday again does your problem solve but you didnt answer to me so I guess maybe my answer was not attractive for you,but today I see your problem solved and I am glad. :-D