HSP¥Ý¡¼¥¿¥ë
¥µ¥¤¥È¥Þ¥Ã¥× ¤ªÌ䤤¹ç¤ï¤»


HSPTV!·Ç¼¨ÈÄ


̤²ò·è ²ò·è Ää»ß ºï½üÍ×ÀÁ

2012
1004
ÂçÉÙ¹ëA¥¯¥ê¥Ã¥¯¤ËÈ¿±þ¤·¤Ê¤¤10²ò·è


ÂçÉÙ¹ëA

¥ê¥ó¥¯

2012/10/4(Thu) 16:07:07|NO.49736

http://rpen.blogspot.jp/2007/09/blog-post.html
¤Î¥¹¥¯¥ê¥×¥È¤Î°ìÉô¤ò

// ¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤òÎ¥¤·¤¿»þ¤Î½èÍý *LButtonUp ¡¡¡¡if a=0:dialog "¥¯¥ê¥Ã¥¯":a=1 dragging = 0 // ¥É¥é¥Ã¥°½ªÎ» return *MouseMove // ¥É¥é¥Ã¥°Ãæ¤Ê¤é¤Ð¶ë·Á¤ò°ÜÆ° get_x rects( pointing_rect ), x get_y rects( pointing_rect ), y move_rect rects( pointing_rect ), x + mousex - dx, y + mousey - dy dx = mousex : dy = mousey : a=1 // ¥É¥é¥Ã¥°Ãæ¤Ç¤Ê¤¤¤Ê¤é¤Ð¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¶ë·Á¤òÄ´¤Ù¤ë get_pointing_rect rects pointing_rect = stat a=0
¤È²þ¤¤·¤Þ¤·¤¿¡£
¥Þ¥¦¥¹¤Î¥¯¥ê¥Ã¥¯È½Äê¤Ï¤Ç¤­¤¿¤ó¤Ç¤¹¤¬¡¢»þ¡¹È¿±þ¤·¤Ê¤¤¤È¤­¤¬¤¢¤ê¤Þ¤¹¡£
Á´¤Æ¤Î¥¯¥ê¥Ã¥¯¤ËÈ¿±þ¤µ¤»¤ë¤Ë¤Ï¡¢¤É¤¦¤¹¤ì¤Ð¤¤¤¤¤Ç¤¹¤«¡©



¤³¤Îµ­»ö¤ËÊÖ¿®¤¹¤ë


¡Ê¡­¦Ø¡®¡Ë

¥ê¥ó¥¯

2012/10/4(Thu) 18:59:43|NO.49757

¤³¤ì¤Ï¡¢È¿±þ¤·¤Ê¤¤¤Î¤Ç¤Ï¤Ê¤¯È¿±þ¤¬ÃÙ¤ì¤Æ¤ë¤è¤¦¤Ç¤¹¤Í¡£¤Ê¤ë¤Û¤É¡£
¤½¤ì¤È¡¢ËÜÍè¤Ï¶ë·ÁÆâ¤Ç¤ÏÈ¿±þ¤·¤Ê¤¤¤Ï¤º¤¬¡¢Ï¢ÂǤ¹¤ë¤È»þ¡¹È¿±þ¤¹¤ë¤è¤¦¤Ç¤¹¡£
³ä¤ê¹þ¤ßÉÑÅÙ¤¬Â¿¤¹¤®¤Æ½èÍý¤¬ÃÙ¤ì¤Æ¤ë¤Ã¤Ý¤¤¤Ç¤¹¡£

¾ï»þWM_MOUSEMOVE³ä¤ê¹þ¤ß¤¬È¯À¸¤·¤Æ¤ë¾õÂ֤Ǥ¹¤¬¡¢¤µ¤é¤ê¤È¸«¤ë¸Â¤ê¤³¤ÎÉôʬ¤Î½èÍý¤Ï
¥á¥¤¥ó¥ë¡¼¥×¤Ç²ó¤·¤Æ¤µ¤·¤Ä¤«¤¨¤Ê¤µ¤½¤¦¤Ç¤¹¤·¡¢*MouseMove¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤ò¥á¥¤¥ó¥ë¡¼¥×
¤Ç²ó¤¹¤è¤¦¤Ë²þ¤¤·¡¢³ä¤ê¹þ¤ßÉÑÅÙ¤ò²¼¤²¤ì¤Ð²þÁ±¤Ç¤­¤Þ¤¹¡£¤Æ¤¤¤¦¤«¡¢¤Ç¤­¤Þ¤·¤¿¡£

¥ì¥Ã¥Ä¥Á¥ã¥ì¥ó¥¸¡£¡Ê¡­¦Ø¡®¡Ë



ÂçÉÙ¹ëA

¥ê¥ó¥¯

2012/10/4(Thu) 19:33:07|NO.49763

>¡Ê¡­¦Ø¡®¡Ë¤µ¤ó
*MouseMove¤Î¥µ¥Ö¥ë¡¼¥Á¥ó¤ò¥á¥¤¥ó¥ë¡¼¥×¤Ç²ó¤¹¤Þ¤Ç¤Ï½ÐÍ褿¤ó¤Ç¤¹¤¬¡¢¥É¥é¥Ã
¥°¸å¤â¡¢É¬¤º¥¯¥ê¥Ã¥¯¤ËÈ¿±þ¤·¤Þ¤¹¡£
¥É¥é¥Ã¥¯¤À¤Ã¤¿¤é¡¢È¿±þ¤·¤Ê¤¤¥¹¥¯¥ê¥×¥È¤Ï¡¢¤É¤¦¤¹¤ë¤ó¤Ç¤¹¤«¡©
¥Ò¥ó¥È¤¯¤À¤µ¡Á¤¤¡£



¤Æ¤ó

¥ê¥ó¥¯

2012/10/4(Thu) 19:52:07|NO.49768

¸½¾õ¤¬¤ï¤«¤é¤Ê¤¤¤Î¤Ç¡¢²þÊѸå¤Î¥¹¥¯¥ê¥×¥È¤òÁ´Ê¸Å½¤Ã¤Æ¤â¤é¤¨¤Þ¤»¤ó¤«¡©



ÂçÉÙ¹ëA

¥ê¥ó¥¯

2012/10/4(Thu) 20:05:55|NO.49775

¥â¥¸¥å¡¼¥ë¤Ï°ì½ï¤Ç¤¹¡£

*init // Íð¿ô½é´ü²½ randomize // ¶ë·Á¤ò5¤ÄºîÀ® repeat 5 w = rnd( 100 ) + 100 : h = rnd( 100 ) + 50 newmod rects, mdl_rect, rnd( ginfo_winx - w ), rnd( ginfo_winy - h ), w, h, rnd( 191 ) loop repeat getkey b, 1 if b = 1 { if dragging { // ¥É¥é¥Ã¥°Ãæ¤Ê¤é¤Ð¶ë·Á¤ò°ÜÆ° get_x rects( pointing_rect ), x get_y rects( pointing_rect ), y move_rect rects( pointing_rect ), x + mousex - dx, y + mousey - dy dx = mousex : dy = mousey : a = 1 //1¤À¤Ã¤¿¤é¥¯¥ê¥Ã¥¯ } else { // ¥É¥é¥Ã¥°Ãæ¤Ç¤Ê¤¤¤Ê¤é¤Ð¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¶ë·Á¤òÄ´¤Ù¤ë get_pointing_rect rects pointing_rect = stat a = 0//0¤À¤Ã¤¿¤é¥¯¥ê¥Ã¥¯ } if ( pointing_rect >= 0 ) { // ¶ë·Á¤ò¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¾ì¹ç¤Ï¤½¤Î¶ë·Á¤ò¥É¥é¥Ã¥°¤¹¤ë dx = mousex : dy = mousey dragging = 1 } }else{ if a = 1 : dialog "¥¯¥ê¥Ã¥¯" : a = 0 ¡¡¡¡ dragging = 0 // ¥É¥é¥Ã¥°½ªÎ» } // ²èÌ̤ò¹¹¿· gosub *renew_screen wait 1 loop // // ²èÌ̤ι¹¿· *renew_screen redraw 0 color 255, 255, 255 : boxf foreach rects draw_rect rects( cnt ) loop redraw 1 return

¥á¥¤¥ó¥ë¡¼¥×Æâ¤ÇÁ´¤Æ½èÍý¤ò¹Ô¤ï¤»¤Æ¤¤¤Þ¤¹¡£
¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Ï¤¤¤Á¤¤¤ÁÊѹ¹¤¹¤ë¤Î¤¬·ù¤Ê¤Î¤Ç¾Ã¤·¤Þ¤·¤¿¡£



¤Æ¤ó

¥ê¥ó¥¯

2012/10/4(Thu) 20:11:19|NO.49776

¤³¤Î¥×¥í¥°¥é¥à¤¬¥É¥é¥Ã¥°½ªÎ»»þ¤Ë¥À¥¤¥¢¥í¥°¤òɽ¼¨¤¹¤ë¤Î¤Ï¡Ö»ÅÍ͡פǤ¹¤Í¡£
¤â¤¦°ìÅÙ¡¢¥×¥í¥°¥é¥à¤Îή¤ì¤ò½ç¤ò¤ª¤Ã¤Æ³Îǧ¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£

¤Á¤Ê¤à¤È¡¢¤ª¤½¤é¤¯¤µ¤Ã¤­¾å¤Ç¥¢¥É¥Ð¥¤¥¹¤µ¤ì¤Æ¤¤¤¿¤³¤È¤Ï
WM_MOUSEMOVE¤À¤±¤ò¥á¥¤¥ó¥ë¡¼¥×¤Ç½èÍý¤·¡¢
WM_LBUTTONDOWN¤ÈUP¤Ïoncmd»þ¤Î¤ß¤Î½èÍý¤Ç¤¤¤¤¤Î¤«¤È»×¤¤¤Þ¤¹¡£
¤½¤¦¤¹¤ì¤Ð°ì¡¹getkey¤â»È¤ï¤Ê¤¤¤Ç¤¤¤¤¤Î¤Ç³Ú¤Ë¤Ê¤ê¤Þ¤¹¤è¡£



¤Æ¤ó

¥ê¥ó¥¯

2012/10/4(Thu) 20:18:59|NO.49777

¤¹¤¤¤Þ¤»¤ó¡¢Åª¤Ï¤º¤ì¤Ê»ö½ñ¤¤¤Æ¤Þ¤·¤¿¤Í¡£
¥¯¥ê¥Ã¥¯¤È¥É¥é¥Ã¥°¤ÎȽÊ̤Ȥ¤¤¦¤³¤È¤Ç¤·¤¿¤¬¡¢»þ´Ö¤ÇȽÃǤµ¤ì¤Æ¤Ï¤É¤¦¤Ç¤·¤ç¤¦¤«¡£
¡¦°ìÄê»þ´Ö°ÊÆâ¤Ë¥Þ¥¦¥¹¤òÎ¥¤·¤¿¤é¥¯¥ê¥Ã¥¯¤È¤ß¤Ê¤¹
¡¦°ìÄê»þ´Ö°Ê¾å¥Þ¥¦¥¹¤ò²¡¤·Â³¤±¤¿¤é¥É¥é¥Ã¥°¤ÈȽÃǤ¹¤ë
¤È¤«



¤Æ¤ó

¥ê¥ó¥¯

2012/10/4(Thu) 20:29:23|NO.49778

Îã

¥¯¥ê¥Ã¥¯¤À¤Ã¤¿¤é¿§¤òÊѤ¨¤ë¤è¤¦¤Ë¤·¤Æ¤ß¤Þ¤·¤¿


// ¥É¥é¥Ã¥°¤Ç¤­¤ë¶ë·Á // ¥Þ¥¦¥¹¥«¡¼¥½¥ëÊѹ¹ÍÑÌ¿Îá¡Ê»²¹Í¡§http://lhsp.s206.xrea.com/hsp_mouse.html#3¡Ë #uselib "user32" #cfunc LoadCursor "LoadCursorA" nullptr, int #func SetClassLong "SetClassLongA" int, int, int // ¥¦¥£¥ó¥É¥¦¥á¥Ã¥»¡¼¥¸ #const WM_LBUTTONDOWN 0x0201 #const WM_LBUTTONUP 0x0202 //#const WM_MOUSEMOVE 0x0200 ¢«­¡WM_MOUSEMOVE¤Ï°ì¡¹¥á¥Ã¥»¡¼¥¸½èÍý¤ò¤·¤Ê¤¤¤è¤¦¤Ë¤·¤Æ #const Duration_Click 160 //¥¯¥ê¥Ã¥¯¤È¤ß¤Ê¤¹´Ö³Ö(ms) // LoadCursorÍÑ°ú¿ô #const IDC_ARROW 0x7F00 #const IDC_HAND 0x7F89 // // ¶ë·Á¤ò°·¤¦¥â¥¸¥å¡¼¥ë #module mdl_rect x, y, w, h, c #const BORDER_WIDTH 2 #modinit int _x, int _y, int _w, int _h, int _c x = _x : y = _y w = _w : h = _h c = _c \ 192 return // // ¶ë·Á¤Î¿§¤òÊѹ¹ #modfunc setcolor_rect int _c c = _c \ 192 return // // ¶ë·Á¤òÉÁ²è #modfunc draw_rect hsvcolor c, 255, 191 boxf x, y, x + w, y + h hsvcolor c, 255, 255 boxf x + BORDER_WIDTH, y + BORDER_WIDTH, x + w - BORDER_WIDTH, y + h - BORDER_WIDTH return // // ¶ë·Á¤ò°ÜÆ° #modfunc move_rect int _x, int _y x = _x : y = _y return // // ÅÀ¡Êpx, py¡Ë¤¬¶ë·ÁÆâ¤Ë¤¢¤ë¤«Èݤ«¤òÊÖ¤¹ #modfunc point_rect int px, int py return ( x <= px ) & ( y <= py ) & ( px < x + w ) & ( py < y + h ) // // ¶ë·Á¤ÎXºÂɸ¤òÊÖ¤¹ #modfunc get_x var ret ret = x return // // ¶ë·Á¤ÎYºÂɸ¤òÊÖ¤¹ #modfunc get_y var ret ret = y return // // º£¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¶ë·Á¤òÄ´¤Ù¡¢¤½¤ÎÇÛÎóÍ×ÁÇÈÖ¹æ¤òstat¤ËÊÖ¤¹¡Ê¤Ê¤Ë¤â¤Ê¤¤»þ¤Ï-1¡Ë #deffunc get_pointing_rect array rects, local result result = -1 foreach rects point_rect rects( cnt ), mousex, mousey if stat : result = cnt ; break loop return result #global *init // Íð¿ô½é´ü²½ randomize // Windows¥á¥Ã¥»¡¼¥¸³ä¤ê¹þ¤ß¼Â¹Ô»ØÄê oncmd gosub *LButtonDown, WM_LBUTTONDOWN oncmd gosub *LButtonUp, WM_LBUTTONUP oncmd gosub *MouseMove, WM_MOUSEMOVE // ¶ë·Á¤ò5¤ÄºîÀ® repeat 5 w = rnd( 100 ) + 100 : h = rnd( 100 ) + 50 newmod rects, mdl_rect, rnd( ginfo_winx - w ), rnd( ginfo_winy - h ), w, h, rnd( 191 ) loop // ¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Î¼ïÎà¤òµ­Ï¿¤¹¤ëÊÑ¿ô¤ò½é´ü²½ cursor_type = IDC_ARROW // ²èÌ̤ι¹¿· gosub *renew_screen //­¢¥á¥¤¥ó¥ë¡¼¥×¤ÇWM_MOUSEMOVE¤ÈƱÍͤνèÍý¤ò¤¹¤ë¡£ *main gosub *MouseMove wait 1 goto *main // // ²èÌ̤ι¹¿· *renew_screen redraw 0 color 255, 255, 255 : boxf foreach rects draw_rect rects( cnt ) loop redraw 1 return // // ¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤òÎ¥¤·¤¿»þ¤Î½èÍý *LButtonUp time_LButtonUp = (gettime(5)*60+gettime(6))*1000+gettime(7) if time_LButtonUP - time_LButtonDown <= Duration_Click { //¥Þ¥¦¥¹¤ò²¡¤·²¼¤²¤¿¤¿»þ¹ï¡ÊÉáˤȾ夲¤¿»þ¹ï¡ÊÉáˤ¬Duration_Click°ÊÆâ¤Î»þ setcolor_rect rects( pointing_rect ), rnd(191) } dragging = 0 // ¥É¥é¥Ã¥°½ªÎ» return // // ¥Þ¥¦¥¹¤Îº¸¥Ü¥¿¥ó¤ò²¡¤·¤¿»þ¤Î½èÍý *LButtonDown if ( pointing_rect >= 0 ) { // ¶ë·Á¤ò¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¾ì¹ç¤Ï¤½¤Î¶ë·Á¤ò¥É¥é¥Ã¥°¤¹¤ë dx = mousex : dy = mousey dragging = 1 time_LButtonDown = (gettime(5)*60+gettime(6))*1000+gettime(7) } return // // ¥Þ¥¦¥¹¤¬Æ°¤¤¤¿¤È¤­¤Î½èÍý *MouseMove if ( pointing_rect >= 0 ) & ( cursor_type != IDC_HAND ) { // ¶ë·Á¤Î¾å¤Ç¤Ï¥«¡¼¥½¥ë¤ò¼ê¤Î·Á¤ËÊѹ¹ cursor_type = IDC_HAND gosub *ChangeCursor } if ( pointing_rect < 0 ) & ( cursor_type != IDC_ARROW ) { // ¶ë·Á¤Î³°¤Ç¤Ï¥«¡¼¥½¥ë¤òÄ̾ï¤Î·Á¤ËÊѹ¹ cursor_type = IDC_ARROW gosub *ChangeCursor } if dragging { // ¥É¥é¥Ã¥°Ãæ¤Ê¤é¤Ð¶ë·Á¤ò°ÜÆ° get_x rects( pointing_rect ), x get_y rects( pointing_rect ), y move_rect rects( pointing_rect ), x + mousex - dx, y + mousey - dy dx = mousex : dy = mousey } else { // ¥É¥é¥Ã¥°Ãæ¤Ç¤Ê¤¤¤Ê¤é¤Ð¥Ý¥¤¥ó¥È¤·¤Æ¤¤¤ë¶ë·Á¤òÄ´¤Ù¤ë get_pointing_rect rects pointing_rect = stat } // ²èÌ̤ò¹¹¿· gosub *renew_screen return // // ¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ÎÊѹ¹ *ChangeCursor SetClassLong hwnd, -12, LoadCursor( cursor_type ) mouse // ¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Î¹¹¿·¡Ê¤³¤ì¤¬¤Ê¤¤¤È¨ºÂ¤ËÈ¿±Ç¤µ¤ì¤Ê¤¤¡Ë return



¡Ê¡­¦Ø¡®¡Ë

¥ê¥ó¥¯

2012/10/4(Thu) 20:53:13|NO.49779

¤¹¤Ç¤Ë²òÅú¤¬½Ð¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ç¡¢´×ÏõÙÂê¡£

¡Ö¥á¥¤¥ó¥ë¡¼¥×¤Ç²ó¤·¤Æ¤âº¹¤·»Ù¤¨¤Ê¤µ¤½¤¦¡×¤È½ñ¤¤¤¿¤Î¤Ç¤¹¤¬¡¢¸µ¡¹¤Î¥½¡¼¥¹¤Ï
HSP¤ò»È¤Ã¤Æ¥¤¥Ù¥ó¥È¥É¥ê¥Ö¥ó¤À¤±¤Ç½èÍý¤·¤Æ¤ß¤ë¤Î¤¬ÌÜŪ¤À¤Ã¤¿¤«¤é¤½¤¦¤¤¤¦½ñ¤­Êý¤ò
¤·¤Æ¤¿¤ß¤¿¤¤¤Ç¤¹¤Í¡£

¥â¥¸¥å¡¼¥ë¤Îºî¤êÊý¤È¤«¤¬¥¹¥Æ¥­¤Ç¡¢µÕ¤Ë»ä¤âÊÙ¶¯¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¡Ê¡­¦Ø¡®¡Ë



ÂçÉÙ¹ëA

¥ê¥ó¥¯

2012/10/4(Thu) 20:54:04|NO.49780

>¤Æ¤ó¤µ¤ó
¤Ê¤ë¤Û¤É¤Ç¤¹¡ª
»þ´Ö¤ÇȽÃǤ¹¤ëÊýË¡¤Ç¤¹¤«¡£
¥¹¥¯¥ê¥×¥È¤Þ¤ÇÉÕ¤±¤Æ¤¤¤¿¤À¤¤¤Æ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£



ÂçÉÙ¹ëA

¥ê¥ó¥¯

2012/10/4(Thu) 20:56:17|NO.49782

>¡Ê¡­¦Ø¡®¡Ë¤µ¤ó
¥á¥¤¥ó¥ë¡¼¥×¤Ç²ó¤¹¤³¤È¤Ê¤É¤¤¤í¤¤¤íÃηäò¤À¤·¤Æ¤¯¤ì¤Æ¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤·¤¿¡£



ONION software Copyright 1997-2023(c) All rights reserved.