普通にSB_SETTEXTを送ると、送り先のアプリが落ちてしまいます。
// メモ帳を対象にする #uselib "user32.dll" #func FindWindowEx "FindWindowExA" sptr,sptr,sptr,sptr #func FindWindow "FindWindowA" sptr,sptr #define SB_SETTEXT $00000401 exec "notepad" hParent = FindWindow( "Notepad", "無題 - メモ帳") hStatusbar = FindWindowEx( hParent, 0, "msctls_statusbar32", 0) sendmsg hStatusbar, SB_SETTEXT, 0, "test"
DrawStatusText関数を使うと、一応テキストを描画することができるのですが、
フォントの種類とサイズを変更する方法が分からないです。
また、パーツごとに描画する方法も分からないです。
パーツのRECTを取得できればできるはずなのですが、
SB_GETRECTメッセージを送ってもアプリが落ちてしまい、取得ができません。
#uselib "user32.dll" #func FindWindowEx "FindWindowExA" sptr,sptr,sptr,sptr #func FindWindow "FindWindowA" sptr,sptr #func GetDC "GetDC" sptr #func GetClientRect "GetClientRect" sptr,sptr #uselib "comctl32.dll" #func DrawStatusText "DrawStatusText" sptr,sptr,sptr,sptr #define SBT_NOBORDERS $00000100 exec "notepad" hParent = FindWindow( "Notepad", "無題 - メモ帳") hStatusbar = FindWindowEx( hParent, 0, "msctls_statusbar32", 0) dim RECT,4 GetClientRect hStatusbar, varptr(RECT) DrawStatusText GetDC(hStatusbar), varptr(RECT), "test", SBT_NOBORDERS
どうすればできるのでしょうか?
ご教示ください。