g**k 发帖数: 236 | 1 试了。但是用sendmessage没反应。我试了试右下角的时间句柄,显示的句柄数字是对
的,用sendmessage双击,时间的窗口也是没反应。如果我用sendkeys的话,可以显示
跳出的时间窗口,但是我要的那个程序keyboard不是focusable的,所以不能用这个方
法。下面是用sendmessage写的程序,能帮忙看看哪里出的问题吗?谢谢了!
...
Private Declare Function ShowWindow Lib "user32.dll" ( _
ByVal hWnd As IntPtr, _
ByVal nCmdShow As SHOW_WINDOW _
) As Boolean
Private Declare Auto Function FindWindow Lib "user32" _
(ByVal ClassName As String, ByVal WindowTitle As String) As IntPtr
Private Declare Auto Function Fi... 阅读全帖 |
|
t*****s 发帖数: 124 | 2 1. write a EnumWindowsProc callback function
2. call EnumWindows(...) and pass your callback function to it.
3. you will get a window handle in the callback funtion
4. with the handle (hWnd), you can get what you want about the window
for example:
RECT rc;
GetWindowRect(hWnd, &rc);
int height = rc.bottom - rc.top;
int width = rc.right - rc.left;
for more details, please search the msdn |
|
L*********r 发帖数: 92 | 3 If the window which you talk about is window on win os,
in programming, the elegant way to kill a window is send a close message or
calling destroywindow api.
Different tech may provides high level api to wrap the two ways.
To kill a window without title or safely kill a window with title, it is not
easy. In my experience, first I get the window hwnd. Then get the related
process using the hwnd, if the process is what i deal with, i destroy the
window. It is implement in c++. I am not sure that |
|
d*****e 发帖数: 270 | 4 本例要实现的是如何创建定制的ToolControl。ToolControl是指具有ComboBox的下拉列表
或 EditBox的编辑功能的一类控件。要创建定制的ToolControl,必须在类模块中实现
ICommand 和 IToolControl接口。IToolControl接口包括hWnd属性和OnDrop, OnFocus事
件。
l 要点
·IToolControl接口的hWnd属性,接受一个Window Handle。
·IToolControl接口的OnDrop事件,支持ToolControl的拖放,传入参数barType表示Bar
类型。
·IToolControl接口的OnFocus事件,传入IcompletionNotify类型的参数complete,可以
通过执行IcompletionNotify接口的SetComplete方法告之ArcMAP,ToolControl可以失去
Focus。
l 程序说明
本例中涉及三个模块,详细描述如下,其中,在类模块中实现了IToolBarDef接口来创建自
己的ToolControl。
l 代码
'1、frmImageCom |
|
S******0 发帖数: 71 | 5 来自主题: JobHunting版 - 淡淡的忧伤
hWnd
泪奔了 T_T |
|
h**6 发帖数: 4160 | 6 来自主题: JobHunting版 - 淡淡的忧伤 握手,当初为何就误入这个歧途,学了这么久。最后只编了点游戏修改器。
hWnd |
|
D*****3 发帖数: 2683 | 7 Sub PickFiles()
Dim ofn As OPENFILENAME
Dim rtn As String
Dim str1 As String, str2 As String, str3 As String
ofn.lStructSize = Len(ofn)
ofn.hwndOwner = Application.Hwnd
'ofn.hInstance = Application.hInstance
ofn.lpstrFilter = "Txt files (*.txt)" & Chr(0) & "*.txt" & Chr(0) & _
"Rep files(*.rep)" & Chr(0) & "*.rep" & Chr(0) & _
"All files(*.*)" & Chr(0) & "*.*" & Chr(0)
'ofn.lpstrFilter = "All Files (*.*), *.txt"
ofn.lpstrFile = Space(254)
ofn.nMaxF |
|
g****y 发帖数: 212 | 8 I want to call
"LRESULT SendDlgItemMessage(HWND hDlg,
int nIDDlgItem, <-----
UINT Msg,
WPARAM wParam,
LPARAM lParam
)"
API in my app. but I can find the nIDDlgItem of my Dlgitem?
Thanks. |
|
r**d 发帖数: 316 | 9 用vb.net编程,使用了微软的web browser control,问题是如何去除上面的scrollbar?
企图用win32api,但无法获得hwnd(为0) |
|
v*****u 发帖数: 1796 | 10 A program needs to know the information of the window which will become active
if ALT+TAB are pressed. Does someone have some idea?
To be more specific:
Open notepad, then run the program, the program should know the hWnd of the
notepad. |
|
k****f 发帖数: 3794 | 11 GetDC(NULL);取得整个屏幕的DC。
或者FindWindow,然后GetDC(HWND)取得某个窗口的DC
.. |
|