DarkBASIC Professional日本語版@Wiki

sample-メッセージボックス

最終更新:

匿名ユーザー

- view
だれでも歓迎! 編集
code base から もってきました。
MessageBoxNP というオリジナル関数を定義して使えるようになります。
user32.dllを利用しているようです。

if mouseclick()=2
 foo = MessageBoxNP( "This is the Message", "Message Title", MB_ABORTRETRYIGNORE )
endif
print foo
wait mouse


`make a standard windows message box, NULL PARENT(NP)
function MessageBoxNP( message$, title$, MB_OPTION )
 #constant   MB_OK                       0
 #constant   MB_OKCANCEL                 1
 #constant   MB_ABORTRETRYIGNORE         2
 #constant   MB_YESNOCANCEL              3
 #constant   MB_YESNO                    4
 #constant   MB_RETRYCANCEL              5
 op = 0x00000000 + MB_OPTION
 #constant USER32_DLL 1
 load dll "user32.dll",   USER32_DLL
 result = call dll( USER32_DLL, "MessageBoxExA", (), message$, title$, op )
 delete dll USER32_DLL
endfunction result

タグ:

+ タグ編集
  • タグ:
記事メニュー
人気記事ランキング
ウィキ募集バナー