[REQU] Patchou PlusWnd::Combo_GetItemText not exist why? |
Author: |
Message: |
Flash
Junior Member
All time Ready
Posts: 86 Reputation: 2
44 / /
Joined: Aug 2006
|
O.P. [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
... all words in the topic
oh and thx for the search option in the script editor
but u can add GOTO line option to plssssss?
This post was edited on 06-28-2007 at 04:26 PM by Flash.
|
|
06-28-2007 04:24 PM |
|
|
deAd
Scripting Contest Winner
Posts: 1060 Reputation: 28
– / /
Joined: Jan 2006
|
RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
You can use the LB_GETLBTEXTLEN and LB_GETLBTEXT messages to get the text of a combo box item.
|
|
06-28-2007 04:30 PM |
|
|
felipEx
Scripting Contest Winner
Posts: 378 Reputation: 24
35 / /
Joined: Jun 2006
|
RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);
Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);
|
|
06-28-2007 06:59 PM |
|
|
Flash
Junior Member
All time Ready
Posts: 86 Reputation: 2
44 / /
Joined: Aug 2006
|
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote: Originally posted by felipEx
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);
Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);
while mode
while (ww.Combo_GetCount("cbc")){
ww.Combo_RemoveItem("cbc",0);
}
|
|
06-28-2007 07:44 PM |
|
|
felipEx
Scripting Contest Winner
Posts: 378 Reputation: 24
35 / /
Joined: Jun 2006
|
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote: Originally posted by Flash
quote: Originally posted by felipEx
how about
PlusWnd::LstBox_Clear(
[string] ControlId
);
Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle(ControlId), 0x184 /* LB_RESETCONTENT */, 0, 0);
while mode
while (ww.Combo_GetCount("cbc")){
ww.Combo_RemoveItem("cbc",0);
}
works fine too but i like LB_RESETCONTENT, fast & short
|
|
06-28-2007 07:47 PM |
|
|
Flash
Junior Member
All time Ready
Posts: 86 Reputation: 2
44 / /
Joined: Aug 2006
|
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
your code not work on my combo, so
i see the w.GetControlText("cbc") return selected text on the combo good new
->
The PlusWnd::GetControlText function returns the text property of a ButtonControl, a CheckBoxControl, a RadioControl, a LinkControl, an EditControl, a RichEditControl, a RichStaticControl or a StaticControl.
quote: Originally posted by felipEx
works fine too but i like LB_RESETCONTENT, fast & short
but why u speak for reset the content is not my question man
i need to know the text in each line of my combo
|
|
06-28-2007 08:02 PM |
|
|
felipEx
Scripting Contest Winner
Posts: 378 Reputation: 24
35 / /
Joined: Jun 2006
|
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote: Originally posted by Flash
quote: Originally posted by felipEx
works fine too but i like LB_RESETCONTENT, fast & short
but why u speak for reset the content is not my question man
i need to know the text in each line of my combo
sure... but you've suggested PlusWnd::Combo_GetItemText and i've suggested PlusWnd::LstBox_Clear
so... it works fine here
code: var CB_GETCOUNT = 0x146;
var CB_GETLBTEXT = 0x148;
var CB_GETLBTEXTLEN = 0x149;
for (var i=0; i < Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETCOUNT , 0, 0) ; i++) {
var length = Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETLBTEXTLEN, i, 0);
var Data = Interop.Allocate((length * 2) + 2);
Interop.Call("user32", "SendMessageW", PlusWnd.GetControlHandle("MyComboBox"), CB_GETLBTEXT, i, Data);
Debug.Trace(Data.ReadString(0));
}
This post was edited on 06-28-2007 at 09:12 PM by felipEx.
|
|
06-28-2007 09:03 PM |
|
|
Flash
Junior Member
All time Ready
Posts: 86 Reputation: 2
44 / /
Joined: Aug 2006
|
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
i find this for combo = cb_
code: function cb_ClrCtrl(w,d) {
//Interop.Call("user32", "SendMessageW", w.GetControlHandle(d), 0x14B /* CB_RESETCONTENT */, 0, 0);
w.SendControlMessage(d,0x14B /* CB_RESETCONTENT */, 0, 0)
}
This post was edited on 06-28-2007 at 09:52 PM by Flash.
|
|
06-28-2007 09:51 PM |
|
|
felipEx
Scripting Contest Winner
Posts: 378 Reputation: 24
35 / /
Joined: Jun 2006
|
RE: RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
quote: Originally posted by Flash
i find this for combo = cb_
code: function cb_ClrCtrl(w,d) {
//Interop.Call("user32", "SendMessageW", w.GetControlHandle, 0x14B /* CB_RESETCONTENT */, 0, 0);
w.SendControlMessage(d,0x14B /* CB_RESETCONTENT */, 0, 0)
}
you seem that you're working with dispatchers functions =) . why Patchou doesn't implement programming-based on prototypes ? ^^
|
|
06-28-2007 10:21 PM |
|
|
Flash
Junior Member
All time Ready
Posts: 86 Reputation: 2
44 / /
Joined: Aug 2006
|
O.P. RE: [REQU] Patchou PlusWnd::Combo_GetItemText not exist why?
i tryed your code felip that work fine
code: function cb_GetItem(w,d,n){
var CB_GETCOUNT = 0x146
var CB_GETLBTEXT = 0x148
var CB_GETLBTEXTLEN = 0x149
var t = w.SendControlMessage(d,CB_GETCOUNT, 0, 0)
//Debug.Trace("Total= " +t)
for(var i=0; i < t; i++) {
var length = w.SendControlMessage(d, CB_GETLBTEXTLEN, i, 0)
var Data = Interop.Allocate((length * 2) + 2)
if (i == n) {
Interop.Call("user32", "SendMessageW", w.GetControlHandle(d), CB_GETLBTEXT, i, Data);
//w.SendControlMessage(d,CB_GETLBTEXT,i,Data) not work
return Data.ReadString(0)
}
}
}
quote: Originally posted by felipEx
you seem that you're working with dispatchers functions =) . why Patchou doesn't implement programming-based on prototypes ? ^^
yes i dont know how for other way :|
its possible this way code: cb_GetItem(ww,"cbc",0) -> ww.cb_GetItem("cbc",0)
??
This post was edited on 06-28-2007 at 10:26 PM by Flash.
|
|
06-28-2007 10:23 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|
|