Click here to Skip to main content
15,918,967 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Caps Lock Problem with DDX_ManagedControl Pin
led mike28-Jul-08 10:27
led mike28-Jul-08 10:27 
GeneralRe: Caps Lock Problem with DDX_ManagedControl Pin
Luc Pattyn28-Jul-08 10:37
sitebuilderLuc Pattyn28-Jul-08 10:37 
QuestionRe: Caps Lock Problem with DDX_ManagedControl Pin
led mike28-Jul-08 11:20
led mike28-Jul-08 11:20 
AnswerRe: Caps Lock Problem with DDX_ManagedControl Pin
fredsparkle28-Jul-08 11:51
fredsparkle28-Jul-08 11:51 
GeneralRe: Caps Lock Problem with DDX_ManagedControl Pin
Luc Pattyn28-Jul-08 11:53
sitebuilderLuc Pattyn28-Jul-08 11:53 
QuestionRe: Caps Lock Problem with DDX_ManagedControl Pin
led mike29-Jul-08 4:39
led mike29-Jul-08 4:39 
AnswerRe: Caps Lock Problem with DDX_ManagedControl Pin
Luc Pattyn28-Jul-08 11:52
sitebuilderLuc Pattyn28-Jul-08 11:52 
GeneralRe: Caps Lock Problem with DDX_ManagedControl (Better Solution) Pin
fredsparkle28-Jul-08 13:22
fredsparkle28-Jul-08 13:22 
Ok got rid of the annoying flash. The problem with the timer approach is that its minimum granularity is 1/10 of a second.

The final solution is to define a delegate which under the covers (way deep) does a Post Message, so the refresh operation happens after it hides everything when the ballon tip goes away.

In the main custom control:

public delegate void InvokeDelegate();
tb_password.Tag = (object)new InvokeDelegate(Refresh);

Our extended textbox:

public class PasswordControl : TextBox<br />
{<br />
private const int EM_HIDEBALLOONTIP = 0x1504;<br />
protected override void WndProc(ref Message m)<br />
{<br />
if (m.Msg == EM_HIDEBALLOONTIP)<br />
{<br />
Delegate del = (Delegate)this.Tag;<br />
this.BeginInvoke(del);<br />
}<br />
base.WndProc(ref m);<br />
}<br />
}<br />


Theory of operation:

1. Create a delegate for the refresh operation for the master custom control container.
2. Assign it as a tag to the textbox that is used as a password field.
3. Extend the textbox class to monitor for the hide ballon tip messages.
4. When the extended textbox class sees that there is a closing ballon tip it instructs the master control to refresh it self via the previously created delegate.
GeneralRe: Caps Lock Problem with DDX_ManagedControl Pin
led mike29-Jul-08 4:43
led mike29-Jul-08 4:43 
QuestionEvent on KeyPress Pin
Polar_Sheep26-Jul-08 8:48
Polar_Sheep26-Jul-08 8:48 
AnswerRe: Event on KeyPress Pin
Mark Salsbery26-Jul-08 9:12
Mark Salsbery26-Jul-08 9:12 
QuestionRe: Event on KeyPress Pin
Polar_Sheep26-Jul-08 9:39
Polar_Sheep26-Jul-08 9:39 
AnswerRe: Event on KeyPress Pin
Mark Salsbery26-Jul-08 9:42
Mark Salsbery26-Jul-08 9:42 
QuestionRe: Event on KeyPress Pin
Polar_Sheep26-Jul-08 9:50
Polar_Sheep26-Jul-08 9:50 
AnswerRe: Event on KeyPress Pin
Mark Salsbery26-Jul-08 9:55
Mark Salsbery26-Jul-08 9:55 
GeneralRe: Event on KeyPress Pin
Polar_Sheep26-Jul-08 10:03
Polar_Sheep26-Jul-08 10:03 
GeneralRe: Event on KeyPress [modified] Pin
Mark Salsbery26-Jul-08 10:16
Mark Salsbery26-Jul-08 10:16 
AnswerRe: Event on KeyPress Pin
Polar_Sheep26-Jul-08 10:22
Polar_Sheep26-Jul-08 10:22 
GeneralRe: Event on KeyPress Pin
Polar_Sheep26-Jul-08 10:25
Polar_Sheep26-Jul-08 10:25 
GeneralRe: Event on KeyPress Pin
Mark Salsbery26-Jul-08 10:35
Mark Salsbery26-Jul-08 10:35 
AnswerRe: Event on KeyPress Pin
dybs29-Jul-08 18:34
dybs29-Jul-08 18:34 
QuestionAssignment Operator Woes [modified] Pin
DemSmiley23-Jul-08 17:41
DemSmiley23-Jul-08 17:41 
AnswerRe: Assignment Operator Woes Pin
Mark Salsbery24-Jul-08 5:41
Mark Salsbery24-Jul-08 5:41 
AnswerRe: Assignment Operator Woes Pin
led mike24-Jul-08 6:11
led mike24-Jul-08 6:11 
AnswerRe: Assignment Operator Woes Pin
Mark Salsbery24-Jul-08 7:31
Mark Salsbery24-Jul-08 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.