[問題] 原PO來謝罪了,但還是想求得答案
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
c++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
win32 api
問題(Question):
餵入的資料(Input):
無
預期的正確結果(Expected Output):
取得combobox指標
錯誤結果(Wrong Output):
取不到combobox的指標
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
寫在前頭,真的很對不起大家,搞錯自己的程式,解釋太多也是藉口
但還是希望求得解答,我想抓取一個combobox控件,它由VB寫成,
並放在groupbox裡,順序先取該程式handle,再取groupbox的指標,最後就是取combobox
HWND main = ::FindWindowA(0,"POSDLLDemo");(有拿到值)
HWND frame = ::FindWindowExA(main,0,0,"Port Config"); (也有拿到)
HWND hComboBox,hButton=0;
class name我是透過spy++去抓的,試過去抓也在groupbox下的元件,如Button
//這樣可以抓到
hButton = ::FindWindowExA(frame,0,"ThunderRT6CommandButton","Open");
再次麻煩大家指教,謝謝
附上SPY++圖檔
http://imgur.com/BZIXLIb
![](https://i.imgur.com/BZIXLIb.jpg)
我改成這樣,可是一樣抓不到,是什麼原因呢?
HWND hComboBox,hNext=0;
do{
hComboBox = ::FindWindowExA(frame,hNext,"ThunderRT6ComboBox","COM7");
}while(hComboBox!=0);
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.174.242.149
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1468906852.A.C37.html
→
07/19 14:37, , 1F
07/19 14:37, 1F
→
07/19 14:38, , 2F
07/19 14:38, 2F
→
07/19 14:38, , 3F
07/19 14:38, 3F
→
07/19 17:40, , 4F
07/19 17:40, 4F
→
07/19 17:40, , 5F
07/19 17:40, 5F
→
07/19 18:05, , 6F
07/19 18:05, 6F
→
07/19 18:05, , 7F
07/19 18:05, 7F
→
07/19 18:09, , 8F
07/19 18:09, 8F
→
07/19 18:09, , 9F
07/19 18:09, 9F
※ 編輯: areyo (1.174.242.149), 07/19/2016 21:12:29
→
07/19 22:36, , 10F
07/19 22:36, 10F
→
07/20 04:57, , 11F
07/20 04:57, 11F
→
07/20 04:58, , 12F
07/20 04:58, 12F
→
07/20 04:59, , 13F
07/20 04:59, 13F
→
07/20 07:34, , 14F
07/20 07:34, 14F
→
07/20 11:19, , 15F
07/20 11:19, 15F
→
07/20 11:57, , 16F
07/20 11:57, 16F