Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) clipboard and ControlHost (Read 16297 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: clipboard and ControlHost
Reply #30 - Nov 23rd, 2006 at 2:09pm
Print Post  
Ok, please email me the whole project again.

Stoyan
  
Back to top
 
IP Logged
 
ampersand
Junior Member
**
Offline



Posts: 55
Joined: Sep 21st, 2006
Re: clipboard and ControlHost
Reply #31 - Nov 29th, 2006 at 5:57am
Print Post  
Hi Stoyo,

just sent out the project some minutes ago.
Thanks in advance for your help

Dirk
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: clipboard and ControlHost
Reply #32 - Nov 29th, 2006 at 8:53am
Print Post  
Copying the hosted control from your application and pasting it into our test app. works fine. Our test project contains only a MERichTextBox and a button that calls PasteFromClipboard. But when pasting in your application, the Rtf value changes after the line in our source code that adds the hosted control as a child to the flowchart:

this.Controls.Add(host.Control);

We don't have any idea why that would lead to changing Rtf. Adding a new control to the control hierarchy might raise some layout related events - do you override methods such as OnLayout or OnLayoutComplete?

Stoyan
  
Back to top
 
IP Logged
 
ampersand
Junior Member
**
Offline



Posts: 55
Joined: Sep 21st, 2006
Re: clipboard and ControlHost
Reply #33 - Nov 29th, 2006 at 12:25pm
Print Post  
Hi Stoyo,

the RichTextBox I embed into the control host is drawing a borderline around itself. This is done within the MERichTextBox class.

The code was not done by myself but was copied from an article from codeproject.com. It is probably not the best way how this could be done, as it uses API calls like WM_NCPAINT and WM_THEMECHANGED.

Do you think that these functions could cause the problem? If so I have to remove these lines and find a better solution for border drawing.

Or wait for a border for the ControlHost control Wink

Thanks

Dirk
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: clipboard and ControlHost
Reply #34 - Nov 29th, 2006 at 1:27pm
Print Post  
Hi Dirk,

The problem should not be in the MERichTextBox, because we used it in our test project and the copy&paste worked fine there. Copying from your application and pasting into our test project works too.

Only pasting in your application has this problem, but we can't figure out yet what goes wrong - there's quite a lot of code there.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint