06-06-2007, 04:56 PM
Hi all,
I'm building a little catalog app and want to use a captionless dialog but it needs to be movable.
All the item info is in images but they have to be .png format so as far as I can tell I'm stuck using SHDocVw.WebBrowser control to display the images.
I've got the dialog with the control setup no problem but you can't move a captionless window and this just does not look as good as it does captionless.
I found the following example here but I can't figure out how to get it to work.
How do I set the hook like you did in the toolbar? I tried placing the line to start my smart dialog, tried it to start the macro then called from another mac...I even tried calling the function after a case WM_LBUTTONDOWN event. All I ended up doing was setting a hook at some point that ate all the left mouse events in the QM editor and I had to restart. :?
I'm thinking this might be a bit more of a pain to do because I'm running the dialog as transparent.
Any ideas?
I'm building a little catalog app and want to use a captionless dialog but it needs to be movable.
All the item info is in images but they have to be .png format so as far as I can tell I'm stuck using SHDocVw.WebBrowser control to display the images.
I've got the dialog with the control setup no problem but you can't move a captionless window and this just does not look as good as it does captionless.
I found the following example here but I can't figure out how to get it to work.
Gintaras Wrote:Toolbar Toolbar12
Function TB_MoveLeftButton
;/
function# hWnd message wParam lParam
def TB_HITTEST (WM_USER + 69)
int+ g_tb_move_htb g_tb_move_hfore
POINT+ g_tb_move_pos
POINT p
sel message
,case WM_SETCURSOR
,if(lParam=WM_LBUTTONDOWN<<16|HTCLIENT)
,,if(wParam=hWnd)
,,else if(GetDlgCtrlID(wParam)=9999)
,,,GetCursorPos &p; ScreenToClient wParam &p
,,,if(SendMessage(wParam TB_HITTEST 0 &p)>=0) ret ;;button
,,else ret
,,
,,GetCursorPos &g_tb_move_pos
,,g_tb_move_htb=hWnd
,,g_tb_move_hfore=win
,,act hWnd ;;for SetCapture
,,SetCapture hWnd
,
,case [WM_LBUTTONUP,WM_CANCELMODE]
,g_tb_move_htb=0
,SetCapture 0
,act g_tb_move_hfore; err
,
,case WM_MOUSEMOVE
,if(g_tb_move_htb=hWnd)
,,RECT r; GetWindowRect hWnd &r
,,GetCursorPos &p
,,mov r.left+p.x-g_tb_move_pos.x r.top+p.y-g_tb_move_pos.y hWnd
,,g_tb_move_pos=p
,,
,
How do I set the hook like you did in the toolbar? I tried placing the line to start my smart dialog, tried it to start the macro then called from another mac...I even tried calling the function after a case WM_LBUTTONDOWN event. All I ended up doing was setting a hook at some point that ate all the left mouse events in the QM editor and I had to restart. :?
I'm thinking this might be a bit more of a pain to do because I'm running the dialog as transparent.
Any ideas?