Advertisement
Java_Volume1 Windows API Call/ Explanation #96448

Autohighlight active control (SDI/1 Form)

This is a very simple and useful solution to highlight input controls without writting a function for each control. I use the SetWindowsHookEx function to receive all Windows messages in a callback function (in this example WindowProc). The WindowProc function calls the SETKILLFocus function if there is an WM_SETFOCUS or WM_KILLFOCUS message and delivers the the Handle of the control to the SETKILLFocus function.In this Example the highlighting is done only for textboxes and comboboxes but you can easily change the SETKILLFocus function to process other types of controls. I think the explanation in the source code should answer all other questions. Please vote, if you think its a good solution.

AI

KI-Zusammenfassung: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Quellcode
original-source
Upload
Originalkommentare (3)
Wiederhergestellt von der Wayback Machine