Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QM toolbars: how to drag and drop a button
#31
braddog Wrote:Also, how can I set the size of the displayed window with ShowText?
ShowText "Document" "$desktop$\document.rtf" 0 4

Maybe easier to create new dialog instead.
#32
Thank you,
That works. btw: when I add a web browser control to the dialog: I can "Drag" selected text in that web browser control to the parent window and the Dialog detects the dropped text. This works with IE6 and IE8.

Brad
--------
Function dlg_ole_drop_text2
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "3"
str ax3SHD = "http://emedicine.medscape.com/article/176595-overview"

if(!ShowDialog("dlg_ole_drop_text2" &dlg_ole_drop_text2 &controls _hwndqm 0 0 0 0 1 -1)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 737 328 "TextCapture"
;3 ActiveX 0x54030000 0x0 32 26 662 248 "SHDocVw.WebBrowser"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""

ret
;messages
sel message
,case WM_INITDIALOG        
,ifi-(win("Untitled - Notepad" "Notepad"))        
,,run "notepad"
,,min win("Untitled - Notepad" "Notepad")    
,
,QmRegisterDropTarget(hDlg hDlg 0)
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_QM_DRAGDROP
,QMDRAGDROPINFO& di=+lParam
,sel wParam
,,case 3 ;;drop
,,
,,str s
,,if(!di.GetText(s)) ret        
,,
,,int hwnd=id(15 "Notepad")    
,,
,,SendCharactersToWindow hwnd s            
,,
,,ret DT_Ret(hDlg 1)
,
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)