As far as I know, Combobox consists of two components: Edit and ListBox. How can I get a Handle of Combobox if I have an Edit field handle? I tried using GetWindow (MyHandle, GW_HWNDNEXT), where MyHandle is the Edit descriptor that I know, but the result is always 0. Does anyone have any ideas?
thanks a lot.
The "Edit" window is a child of the ComboBox window: use GetParent.
GetParent
TCustomCombo ListHandle EditHandle. , , :
TCustomCombo
ListHandle
EditHandle
type TCheatComboBox = class(TComboBox); function GetListHandle(Combo: TComboBox): HWND; begin Result := TCheatComboBox(Combo).ListHandle; end;
How did you get the Edit pen? If you execute Combobox1.Handle, you get a handle to the class window COMBOBOX.
Combobox1.Handle
COMBOBOX
Read http://msdn.microsoft.com/en-us/library/bb775792(VS.85).aspx
Source: https://habr.com/ru/post/1779401/More articles:Draw a stroke bar with gradient - performanceHow can I name the constructor of the parent class? - javaHaskell modules: hidden names and ghci - moduleNumber of weeks in MySQL and New Year - mysqlPspad "The contents of the file has been modified. Reboot?" dialogue error - editorSQLite database in android and java - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1779403/mapping-properties-to-differently-named-foreign-key-fields-in-entity-framework-ctp5&usg=ALkJrhgmjHg8jcxw-6DIktIsLqF9lBxuQQReturn and finally suggestion - inconsistent behavior - c #C # Hide () at startup, without ShowInTaskbar to false - .netBinding calculated property data in Entity Framework - c #All Articles