FlexGrid & CMSFlexGrid
-
Hi everybody, I did solve how to create Flexgrid on dialog with your help. But now I got another problem which is I do wanna use flexgrid in my code. Created a flex grid 6.0 object on cdialog (using resources) I have a class
CMyClass:CDialog
and I create the dialog usingCreate(IdOfDialog)
Now as far as I know I do need a CMSFlexGrid pointer, smt like this: CMSFlexGrid* grid = GetDlgItem(FlexGridID); grid->Clear(); and my problem is I do not have CMSFlexGrid class dunno how to include, which class I should use..... any idea?? thank you... :) -
Hi everybody, I did solve how to create Flexgrid on dialog with your help. But now I got another problem which is I do wanna use flexgrid in my code. Created a flex grid 6.0 object on cdialog (using resources) I have a class
CMyClass:CDialog
and I create the dialog usingCreate(IdOfDialog)
Now as far as I know I do need a CMSFlexGrid pointer, smt like this: CMSFlexGrid* grid = GetDlgItem(FlexGridID); grid->Clear(); and my problem is I do not have CMSFlexGrid class dunno how to include, which class I should use..... any idea?? thank you... :)You may have a bit of web search. Add variable of type control to the CDialog derived class, CMyClass using Class Wizard it takes care of getting the class for you. I know you are using VS 6.0 from previous posts, so do the following, 1) right click the Flexgrid control on the Dialog resource then select Class Wizard. 2)In the Member Variables tab Select the appropriate project name, class name CMyClass, Select the Control ID FlexGridID, and click Add Variable (button) 3) Give the name for the member variable say m_grid. Select Category as Control. Where the Variable type is automatically populated to you by class wizard as CMSFlexGrid, then OK (it will confirm to add the CMSFlexGrid in to project,.. OK). CMSFlexGrid is served to you, go ahead.
-
You may have a bit of web search. Add variable of type control to the CDialog derived class, CMyClass using Class Wizard it takes care of getting the class for you. I know you are using VS 6.0 from previous posts, so do the following, 1) right click the Flexgrid control on the Dialog resource then select Class Wizard. 2)In the Member Variables tab Select the appropriate project name, class name CMyClass, Select the Control ID FlexGridID, and click Add Variable (button) 3) Give the name for the member variable say m_grid. Select Category as Control. Where the Variable type is automatically populated to you by class wizard as CMSFlexGrid, then OK (it will confirm to add the CMSFlexGrid in to project,.. OK). CMSFlexGrid is served to you, go ahead.
thanx man... I did see "use wizard" tips on web pages but they all said use add variable wizard and I couldn't find such a thing till now... ok one more thing... I do have a class but i did not associate it with dialog resource. How can I associate it with an existing class, cause Select Class listbox is all empty..... thank you for your reply..
-
thanx man... I did see "use wizard" tips on web pages but they all said use add variable wizard and I couldn't find such a thing till now... ok one more thing... I do have a class but i did not associate it with dialog resource. How can I associate it with an existing class, cause Select Class listbox is all empty..... thank you for your reply..
which class you are talking about now, previous post said you don't have CMSFlexGrid? Specify which class which control.
-
which class you are talking about now, previous post said you don't have CMSFlexGrid? Specify which class which control.
I mean when I use class wizard it says this dialog is not associated with a class. But I did write an header file which inherits CDialog
class CLangNWords : CDialog
I want to associate my dialog with my existing class but when I select Use Existing class there's nothing in listbox I can select. It may because of I only write h file and there's no cpp file for it. I am asking about how to associate these to. But doesn't seem too important right now I can write it again. Thank you for your help. -
I mean when I use class wizard it says this dialog is not associated with a class. But I did write an header file which inherits CDialog
class CLangNWords : CDialog
I want to associate my dialog with my existing class but when I select Use Existing class there's nothing in listbox I can select. It may because of I only write h file and there's no cpp file for it. I am asking about how to associate these to. But doesn't seem too important right now I can write it again. Thank you for your help.Its better you create a MFC class derived from CDialog using class wizard at that time itself it associated with the dialog ID, then copy any necessary code from old class to this one.