|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object jp.hishidama.win32.api.WinUser
public final class WinUser
winuser.hの関数.
JWnd
メソッドの概要 | |
---|---|
static boolean |
CheckDlgButton(long hdlg,
int nIDButton,
int uCheck)
ダイアログボックス:チェックボタン設定. |
static boolean |
CheckRadioButton(long hdlg,
int nIDFirstButton,
int nIDLastButton,
int nIDCheckButton)
ダイアログボックス:ラジオボタン設定. |
static long |
ChildWindowFromPoint(long hwnd,
int x,
int y)
指定位置子ウィンドウ取得. |
static long |
ChildWindowFromPointEx(long hwnd,
int x,
int y,
int flags)
指定位置子ウィンドウ取得. |
static boolean |
ClientToScreen(long wnd,
Point point)
スクリーン座標変換. |
static boolean |
EnableScrollBar(long wnd,
int bar,
int arrows)
スクロールバー可否設定. |
static boolean |
EnableWindow(long wnd,
boolean enable)
入力可否設定. |
static boolean |
EnumChildWindows(long hwnd,
List list)
子ウィンドウ列挙. |
static boolean |
EnumWindows(List list)
トップレベルウィンドウ列挙. |
static long |
FindWindow(String className,
String windowName)
トップレベルウィンドウ検索. |
static long |
GetActiveWindow()
アクティブウィンドウ取得. |
static long |
GetAncestor(long wnd,
int flags)
祖先ウィンドウ取得. |
static String |
getClassName(long hwnd)
ウィンドウクラス名取得. |
static boolean |
GetClientRect(long wnd,
Rectangle r)
クライアント領域取得. |
static long |
GetDesktopWindow()
デスクトップ取得. |
static int |
GetDlgCtrlID(long hctl)
ダイアログボックス:コントロール識別子取得. |
static long |
GetDlgItem(long hdlg,
int id)
ダイアログボックス:コントロール取得. |
static int |
GetDlgItemInt(long hdlg,
int id,
boolean[] translated,
boolean signed)
ダイアログボックス:コントロール数値取得. |
static String |
GetDlgItemText(long hdlg,
int id,
int len)
ダイアログボックス:コントロールテキスト取得. |
static long |
GetFocus()
キーボードフォーカスウィンドウ取得. |
static long |
GetForegroundWindow()
フォアグラウンドウィンドウ取得. |
static long |
GetNextDlgGroupItem(long hdlg,
long hctl,
boolean previous)
ダイアログボックス:グループ内の次コントロール取得. |
static long |
GetNextDlgTabItem(long hdlg,
long hctl,
boolean previous)
ダイアログボックス:タブ移動可能な次コントロール取得. |
static long |
GetNextWindow(long hwnd,
int cmd)
次ウィンドウ取得. |
static long |
GetParent(long wnd)
親ウィンドウ取得. |
static long |
GetTopWindow(long hwnd)
一番上の子ウィンドウ取得. |
static long |
GetWindow(long wnd,
int cmd)
ウィンドウ取得. |
static int |
GetWindowLong(long hwnd,
int index)
ウィンドウ情報取得. |
static boolean |
GetWindowRect(long wnd,
Rectangle r)
ウィンドウ領域取得. |
static String |
getWindowText(long wnd)
ウィンドウテキスト取得. |
static int |
GetWindowTextLength(long wnd)
ウィンドウテキスト長取得. |
static boolean |
IsChild(long hwndParent,
long hwnd)
子ウィンドウ判断. |
static int |
IsDlgButtonChecked(long hdlg,
int nIDButton)
ダイアログボックス:チェックボタン状態取得. |
static boolean |
IsIconic(long wnd)
アイコン状態判断. |
static boolean |
IsWindow(long hwnd)
ウィンドウ存在判断. |
static boolean |
IsWindowEnabled(long wnd)
入力可否判断. |
static boolean |
IsWindowVisible(long wnd)
表示状態判断. |
static boolean |
IsZoomed(long wnd)
最大化状態判断. |
static int |
MessageBox(long wnd,
String text,
String caption,
int type)
メッセージボックス. |
static boolean |
MoveWindow(long hwnd,
int x,
int y,
int width,
int height,
boolean repaint)
ウィンドウ移動. |
static boolean |
PostMessage(long hwnd,
int msg,
int wparam,
int lparam)
メッセージキューへの送信. |
static boolean |
ScreenToClient(long wnd,
Point point)
クライアント座標変換. |
static int |
SendMessage(long hwnd,
int msg,
int wparam,
byte[] lparam)
メッセージ送信. |
static int |
SendMessage(long hwnd,
int msg,
int wparam,
int lparam)
メッセージ送信. |
static int |
SendMessage(long hwnd,
int msg,
int wparam,
String lparam)
メッセージ送信. |
static long |
SetActiveWindow(long wnd)
アクティブウィンドウ設定. |
static boolean |
SetDlgItemInt(long hdlg,
int id,
int value,
boolean signed)
ダイアログボックス:コントロール数値設定. |
static boolean |
SetDlgItemText(long hdlg,
int id,
String text)
ダイアログボックス:コントロールテキスト設定. |
static long |
SetFocus(long wnd)
キーボードフォーカス設定. |
static boolean |
SetForegroundWindow(long wnd)
フォアグラウンドウィンドウ設定. |
static long |
SetParent(long wnd,
long wndParent)
親ウィンドウ設定. |
static int |
SetWindowLong(long hwnd,
int index,
int value)
ウィンドウ情報設定. |
static boolean |
SetWindowPos(long hwnd,
long hWndInsertAfter,
int x,
int y,
int cx,
int cy,
int flags)
ウィンドウ位置設定. |
static boolean |
SetWindowText(long wnd,
String string)
ウィンドウテキスト設定. |
static boolean |
ShowScrollBar(long wnd,
int bar,
boolean show)
スクロールバー表示状態設定. |
static boolean |
ShowWindow(long wnd,
int cmdShow)
ウィンドウ表示状態設定. |
static long |
WindowFromPoint(int x,
int y)
指定位置ウィンドウ取得. |
クラス java.lang.Object から継承されたメソッド |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
メソッドの詳細 |
---|
public static int SendMessage(long hwnd, int msg, int wparam, int lparam)
hwnd
- HWNDmsg
- メッセージ(WM_*)wparam
- WPARAMlparam
- LPARAM
public static int SendMessage(long hwnd, int msg, int wparam, String lparam)
hwnd
- HWNDmsg
- メッセージ(WM_*)wparam
- WPARAMlparam
- LPARAM(文字列)
public static int SendMessage(long hwnd, int msg, int wparam, byte[] lparam)
hwnd
- HWNDmsg
- メッセージ(WM_*)wparam
- WPARAMlparam
- LPARAM(バイト配列)
public static boolean PostMessage(long hwnd, int msg, int wparam, int lparam)
hwnd
- HWNDmsg
- メッセージ(WM_*)wparam
- WPARAMlparam
- LPARAM
public static boolean IsWindow(long hwnd)
hwnd
- HWND
public static boolean IsChild(long hwndParent, long hwnd)
hwndParent
- 親ウィンドウのHWNDhwnd
- 調査するHWND
public static boolean ShowWindow(long wnd, int cmdShow)
wnd
- HWNDcmdShow
- 表示方法(WinUserConst.SW_HIDE
等)
public static boolean MoveWindow(long hwnd, int x, int y, int width, int height, boolean repaint) throws Win32Exception
ウィンドウの位置とサイズを変更する。
トップレベルウィンドウはスクリーン座標、親ウィンドウを持つウィンドウはクライアント座標で指定する。
hwnd
- HWNDx
- Xy
- Ywidth
- 幅height
- 高さrepaint
- 再描画オプション(true:ウィンドウにWM_PAINTが送られる)
Win32Exception
- 失敗時public static boolean SetWindowPos(long hwnd, long hWndInsertAfter, int x, int y, int cx, int cy, int flags) throws Win32Exception
ウィンドウの位置・サイズ・Zオーダーを変更する。
hwnd
- HWNDhWndInsertAfter
- 配置順序のHWNDx
- Xy
- Ycx
- 幅cy
- 高さflags
- ウィンドウ位置オプション(SWP_*)
Win32Exception
- 失敗時public static boolean IsWindowVisible(long wnd)
wnd
- HWND
public static boolean IsIconic(long wnd)
wnd
- HWND
public static boolean IsZoomed(long wnd)
wnd
- HWND
public static long GetDlgItem(long hdlg, int id) throws Win32Exception
hdlg
- HWNDid
- コントロールの識別子
Win32Exception
- 失敗時public static boolean SetDlgItemInt(long hdlg, int id, int value, boolean signed) throws Win32Exception
hdlg
- HWNDid
- コントロールの識別子value
- 値signed
- 符号を付けるかどうか
Win32Exception
- 失敗時public static int GetDlgItemInt(long hdlg, int id, boolean[] translated, boolean signed) throws Win32Exception
hdlg
- HWNDid
- コントロールの識別子translated
- 0番に、成功したかどうかの状態を返す(nullの場合は何も返さない)signed
- true:符号付きとして扱う
Win32Exception
- 失敗時public static boolean SetDlgItemText(long hdlg, int id, String text) throws Win32Exception
hdlg
- HWNDid
- コントロールの識別子text
- 文字列
Win32Exception
- 失敗時public static String GetDlgItemText(long hdlg, int id, int len) throws Win32Exception
hdlg
- HWNDid
- コントロールの識別子len
- 文字列の最大サイズ
Win32Exception
- 失敗時public static boolean CheckDlgButton(long hdlg, int nIDButton, int uCheck) throws Win32Exception
hdlg
- HWNDnIDButton
- コントロールの識別子uCheck
- 値(BST_*)
Win32Exception
- 失敗時public static boolean CheckRadioButton(long hdlg, int nIDFirstButton, int nIDLastButton, int nIDCheckButton) throws Win32Exception
hdlg
- HWNDnIDFirstButton
- グループ内の最初のボタンの識別子nIDLastButton
- グループ内の最後のボタンの識別子nIDCheckButton
- 選択したいボタンの識別子
Win32Exception
- 失敗時public static int IsDlgButtonChecked(long hdlg, int nIDButton)
hdlg
- HWNDnIDButton
- ボタンの識別子
WinUserConst.BST_CHECKED
等public static long GetNextDlgGroupItem(long hdlg, long hctl, boolean previous) throws Win32Exception
hdlg
- HWNDhctl
- コントロールのHWNDprevious
- 方向フラグ(true:前のコントロール、false:次のコントロール)
Win32Exception
- 失敗時public static long GetNextDlgTabItem(long hdlg, long hctl, boolean previous) throws Win32Exception
hdlg
- HWNDhctl
- コントロールのHWNDprevious
- 方向フラグ(true:前のコントロール、false:次のコントロール)
Win32Exception
- 失敗時public static int GetDlgCtrlID(long hctl) throws Win32Exception
hctl
- コントロールのHWND
Win32Exception
- 失敗時public static long SetFocus(long wnd) throws Win32Exception
wnd
- HWND
Win32Exception
- 失敗時public static long GetFocus()
GetForegroundWindow()
public static long SetActiveWindow(long wnd) throws Win32Exception
ウィンドウをアクティブにする。
wnd
- HWND
Win32Exception
- 失敗時public static long GetActiveWindow()
GetForegroundWindow()
public static boolean EnableWindow(long wnd, boolean enable) throws Win32Exception
無効にするとマウス入力やキーボード入力を受け付けない。グレーアウト状態?
wnd
- HWNDenable
- true:有効、false:無効
Win32Exception
- 失敗時public static boolean IsWindowEnabled(long wnd)
マウス入力やキーボード入力を受け付ける状態(グレーアウト?)かどうかを返す。
wnd
- HWND
public static boolean SetForegroundWindow(long wnd)
ウィンドウをフォアグラウンド(かつアクティブ)にする。
wnd
- HWND
public static long GetForegroundWindow()
public static boolean ShowScrollBar(long wnd, int bar, boolean show) throws Win32Exception
wnd
- HWNDbar
- 設定対象(SB_*)show
- true:表示、false:非表示
Win32Exception
- 失敗時public static boolean EnableScrollBar(long wnd, int bar, int arrows) throws Win32Exception
wnd
- HWNDbar
- 設定対象(SB_*)arrows
- 矢印の有効無効設定(ESB_*)
Win32Exception
- 失敗時public static boolean SetWindowText(long wnd, String string) throws Win32Exception
ウィンドウのタイトルやコントロールのテキストを変更する。
他アプリケーションのテキストは変更できない。
wnd
- HWNDstring
- テキスト
Win32Exception
- 失敗時public static String getWindowText(long wnd) throws Win32Exception
ウィンドウのタイトルやコントロールのテキストを取得する。
wnd
- HWND
Win32Exception
- 失敗時public static int GetWindowTextLength(long wnd) throws Win32Exception
wnd
- HWND
Win32Exception
- 失敗時public static boolean GetClientRect(long wnd, Rectangle r) throws Win32Exception
クライアント領域をクライアント座標で返すので、左上は常に(0,0)となる。
wnd
- HWNDr
- 座標値(クライアント座標系)
Win32Exception
- 失敗時public static boolean GetWindowRect(long wnd, Rectangle r) throws Win32Exception
wnd
- HWNDr
- 座標値(スクリーン座標系)
Win32Exception
- 失敗時public static int MessageBox(long wnd, String text, String caption, int type) throws Win32Exception
wnd
- HWNDtext
- テキストcaption
- タイトルtype
- スタイル(WinUserConst.MB_OK
等)
WinUserConst.IDOK
等)
Win32Exception
- 失敗時public static boolean ClientToScreen(long wnd, Point point) throws Win32Exception
wnd
- HWNDpoint
- クライアント座標(スクリーン座標に変換される)
Win32Exception
- 失敗時public static boolean ScreenToClient(long wnd, Point point) throws Win32Exception
wnd
- HWNDpoint
- スクリーン座標(クライアント座標に変換される)
Win32Exception
- 失敗時public static long WindowFromPoint(int x, int y)
x
- Xy
- Y
ChildWindowFromPoint(long, int, int)
public static long ChildWindowFromPoint(long hwnd, int x, int y)
x
- X(クライアント座標系)y
- Y(クライアント座標系)
ChildWindowFromPointEx(long, int, int, int)
public static long ChildWindowFromPointEx(long hwnd, int x, int y, int flags)
x
- X(クライアント座標系)y
- Y(クライアント座標系)flags
- 無視する対象を示すオプション(CWP_*)
public static int GetWindowLong(long hwnd, int index) throws Win32Exception
hwnd
- HWNDindex
- 情報のオフセット
Win32Exception
- 失敗時SetParent(long, long)
public static int SetWindowLong(long hwnd, int index, int value) throws Win32Exception
hwnd
- HWNDindex
- 情報のオフセットvalue
- 新しい値
Win32Exception
- 失敗時SetParent(long, long)
public static long GetDesktopWindow()
GetWindow(long, int)
public static long GetParent(long wnd) throws Win32Exception
wnd
- HWND
Win32Exception
- 失敗時GetAncestor(long, int)
public static long SetParent(long wnd, long wndParent) throws Win32Exception
wnd
- HWNDwndParent
- 親ウィンドウ(nullの場合、デスクトップ)
Win32Exception
- 失敗時public static boolean EnumChildWindows(long hwnd, List list) throws Win32Exception
hwnd
- HWNDlist
- 子ウィンドウ(JWnd
)が入れられる
Win32Exception
- 失敗時GetWindow(long, int)
public static boolean EnumWindows(List list) throws Win32Exception
list
- ウィンドウ(JWnd
)が入れられる
Win32Exception
- 失敗時GetWindow(long, int)
public static long FindWindow(String className, String windowName) throws Win32Exception
className
- クラス名windowName
- ウィンドウ名
Win32Exception
- 失敗時getClassName(long)
,
getWindowText(long)
public static String getClassName(long hwnd) throws Win32Exception
hwnd
- HWND
Win32Exception
- 失敗時public static long GetTopWindow(long hwnd) throws Win32Exception
hwnd
- HWND
Win32Exception
- 失敗時public static long GetNextWindow(long hwnd, int cmd) throws Win32Exception
hwnd
- HWNDcmd
- 方向(GW_HWNDNEXT または GW_HWNDPREV)
Win32Exception
- 失敗時public static long GetWindow(long wnd, int cmd) throws Win32Exception
wnd
- HWNDcmd
- 関係(GW_*)
Win32Exception
- 失敗時public static long GetAncestor(long wnd, int flags)
wnd
- HWNDflags
- パラメータ(GA_*)
GetParent(long)
|
||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |