Listen to Windows messages in control, created with WinAPI, in VBA
问题 I had a great help with understanding how to correctly create controls (particularly, ListBox) in VBA with WinAPI. So, according to the structure, how VBA handles windows, we have three handles: hWin - UserForm's handle hClient - UserForm child's handle ( Server ) hList - ListBox's handle The question is - how to listen to Windows messages, incoming from Windows and generated by ListBox? 回答1: To listen to the messages, override the function that processes messages sent to a window, which is