ATL 8.0 + own context menu

The place for threads about TimoSoft EditControls.
Post Reply
godeny
Lieutenant
Posts: 18
Joined: 28 Nov 2007, 19:44
Contact:

ATL 8.0 + own context menu

Post by godeny »

Hello Tiku,

when i set the DragMode property to 1 - vbAutomatic, then . when the Unicode Edit Control loosis the focus, the control disappears, and a text "ATL 8.0" will be displayed instead of the control.

The RegisterForOLEDragDrop property is 1.

Can i use the DragMode property to let the control automatically handle OLE Drag operations (or it is only for the old style dragging) ?

-----

How can i disable the context menu - for using my own context menu ?

Thank you in advance,

Zoltan
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ATL 8.0 + own context menu

Post by TiKu »

godeny wrote:when i set the DragMode property to 1 - vbAutomatic, then . when the Unicode Edit Control loosis the focus, the control disappears, and a text "ATL 8.0" will be displayed instead of the control.
This damn "ATL 8.0" bug has been dogging me for years. It shows up in my controls here and there and I still don't know the reason.
I'll try to fix it, but I can't promise anything.
godeny wrote:Can i use the DragMode property to let the control automatically handle OLE Drag operations (or it is only for the old style dragging) ?
The DragMode property comes from the VB runtime and not from my control. I think it can be used for dragging the control itself. At least it has nothing to do with OLE drag'n'drop.
godeny wrote:How can i disable the context menu - for using my own context menu ?
Handle the ContextMenu event and set its showDefaultMenu parameter to False:

Code: Select all

Private Sub TextBox1_ContextMenu(ByVal button As Integer, ByVal shift As Integer, ByVal x As Single, ByVal y As Single, showDefaultMenu As Boolean)
  showDefaultMenu = False
  PopupMenu myMenu
End Sub
TiKu
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
godeny
Lieutenant
Posts: 18
Joined: 28 Nov 2007, 19:44
Contact:

Post by godeny »

The DragMode property comes from the VB runtime and not from my control. I think it can be used for dragging the control itself. At least it has nothing to do with OLE drag'n'drop.
I was asking this, because the normal VB controls have an OLEDragMode property, which can be set to Automatic. I'we thought, you have the same functionality, only the properties are different. (the VB controls have OLEDragMode and OLEDropMode, your control has only RegisterForOLEDragDrop).

If you Edit control does not have the automatic Drag mode, then this ATL 8.0 bug does not disturb me - then it is useless for me to set the DragMode . (i am using only OLE Drag and drop). And programming the manual OLEDrag is not a problem.

Zoltan
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ATL 8.0 + own context menu

Post by TiKu »

godeny wrote:when i set the DragMode property to 1 - vbAutomatic, then . when the Unicode Edit Control loosis the focus, the control disappears, and a text "ATL 8.0" will be displayed instead of the control.
I think I've finally fixed this one. :)
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply