- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi,
I need to close a graphics window with a right mouse click option. Currently the window closes when I hot enter. I was advised by Leo quite some time back that I need to use the SendMessage API with WM_Keydown message with VK_Return as the virtual keycode. I have gotten this far but need help with the VK_Return implementation. Can anyone please guide a novice like me a little more.
Thanks
Sumit
I need to close a graphics window with a right mouse click option. Currently the window closes when I hot enter. I was advised by Leo quite some time back that I need to use the SendMessage API with WM_Keydown message with VK_Return as the virtual keycode. I have gotten this far but need help with the VK_Return implementation. Can anyone please guide a novice like me a little more.
Thanks
Sumit
logi=.TRUE.
do while(logi)
bret=waitonmouseevent(MOUSE$RBUTTONDOWN,keystate,ixpos,iypos)
if (keystate == MOUSE$KS_RBUTTON) then
iret= Messageboxqq('Close Window ?','Mouse Action'C,MB$ICONEXCLAMATION.OR.MB$YESNO)
IF(IRET == MB$IDYES) then !call exit()
hWnd= GetHWNDQQ(5)
iret=Focusqq(5)
iret=SetActiveQQ(5)
iret=SendMessage(hWnD,WM_Keydown,0,0)
...
logi=.FALSE.
end if
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Should be
iret=SendMessage(hWnd, WM_KEYDOWN, VK_RETURN, 0) (perhaps 1 as last argument). I don't guarantee that the method will work though.