Handle of Listbox Part from Combobox

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 1446
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 267 times
Been thanked: 415 times

Handle of Listbox Part from Combobox

Post by AUGE_OHR »

hi,

i like to set "TabStops" in ComboBox so i need Handle of Listbox Part when "open" ComboBox
how can i get Handle of "ComboLBox" :idea:
have fun
Jimmy

gisjr134
Posts: 5
Joined: Tue Dec 08, 2020 11:37 am
DBs Used: DBF
Been thanked: 1 time

Post by gisjr134 »

Hi To All ,

You can use GetControlHandle


Ex:GetControlHandle( 'br_grid', cActiveJan )

User avatar
AUGE_OHR
Posts: 1446
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 267 times
Been thanked: 415 times

Post by AUGE_OHR »

hi,
gisjr134 wrote:
Fri Jul 23, 2021 3:32 pm
You can use GetControlHandle
Ex:GetControlHandle( 'br_grid', cActiveJan )
you need a "Name" of Control which is a Combobox.

a Combobox have 2 x "Parts" : TEXTBOX + LISTBOX

but i only want the Handle of Listbox "Part" which have "no Name" ...
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 1446
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 267 times
Been thanked: 415 times

Post by AUGE_OHR »

hi,

got more Information
when CBN_DROPDOWN notification code is send Listbox Part will open
Then use FindWindowEx() to get the handle of the control ...
this is one Way

other Way COMBOBOXINFO structure (winuser.h)
https://docs.microsoft.com/de-de/window ... mboboxinfo
hwndCombo Handle to the combo box.
hwndItem Handle to the edit box.
hwndList Handle to the drop-down list.
to get Information use GetComboBoxInfo function (winuser.h)
https://docs.microsoft.com/de-de/window ... mboboxinfo

now i have to look how to get it work under harbour
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 1446
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 267 times
Been thanked: 415 times

Post by AUGE_OHR »

hi,

i found "Handle" of Listbox-Part in Combobox : COMBOBOXINFO Structure (winuser.h)
https://docs.microsoft.com/de-de/window ... mboboxinfo

i have found that COMBOBOXINFO Structure is used by some FiveWin HB_FUNC which i modify for HMG

after found out that Constant

Code: Select all

#define LBS_USETABSTOPS        128  //    0x80
is not used in HMG i try to "add" it with

Code: Select all

   HMG_ChangeWindowStyle( nHwnd1    , LBS_USETABSTOPS , NIL , .T. )
than i call HB_FUNC

Code: Select all

   LISTBOXSETMULTITAB(nHwnd1, aTabStops )
from MiniGUI Extendet Version but it does not work ... :(
TABSTOPS.ZIP
(2.43 KiB) Downloaded 3 times
what í´m doing wrong :idea:
have fun
Jimmy

Post Reply