Unregistered
November 11, 2002, 01:05:30
I am currently working on an application that utilizes the .NET Framework's windows forms, and it's written in C#. I can add a TextControl, ruler, and buttons to my form, and it all works correctly; however, when I set the MdiParent property of my form, then I lose the handles to my button and ruler controls.
If I step through the code, I see the values for the RulerControl.hWnd and the ButtonControl.hWnd, but as soon as I set the MdiParent then they both go to 0. Then, I'm unable to use the controls correctly.
I'm getting this error if I set the MdiChild property before or after I set the axControl.ButtonHandle or .RulerHandle.
Is there anything that I can do to work around this? My code is attached below.
Thanks,
Sean
public frmTemplateManager(UIController uiController, EnumMode enumMode)
{
InitializeComponent();
myController = uiController;
this.MdiParent = myController.MdiParent;
axRTFControl.ButtonBarHandle = axRTFButtons.hWnd;
axRTFControl.RulerHandle = axRTFRuler.hWnd;
axRTFControl.ScrollBars = (short)ScrollBars.Both; // both
formMode = (int)enumMode;
}
This message was originally posted by Sean Baughman in the old TX Text Control Support Forum.
If I step through the code, I see the values for the RulerControl.hWnd and the ButtonControl.hWnd, but as soon as I set the MdiParent then they both go to 0. Then, I'm unable to use the controls correctly.
I'm getting this error if I set the MdiChild property before or after I set the axControl.ButtonHandle or .RulerHandle.
Is there anything that I can do to work around this? My code is attached below.
Thanks,
Sean
public frmTemplateManager(UIController uiController, EnumMode enumMode)
{
InitializeComponent();
myController = uiController;
this.MdiParent = myController.MdiParent;
axRTFControl.ButtonBarHandle = axRTFButtons.hWnd;
axRTFControl.RulerHandle = axRTFRuler.hWnd;
axRTFControl.ScrollBars = (short)ScrollBars.Both; // both
formMode = (int)enumMode;
}
This message was originally posted by Sean Baughman in the old TX Text Control Support Forum.