Jalaj P. Jha Technical & Miscellaneous Ramblings

31Jan/070




WinAPI : Getting Window Texts

Window Text of a window is the caption on the title bar if the window is a form, or the text contained it the window in question here is a control on some form. Getting a window text or setting it requires calling the SendMessage function (described in More on SendMessage) with messages WM_GETTEXT and WM_SETTEXT resp.

30Jan/070




WinAPI : Prevent Setting foreground window

The earliest Windows Operating Systems allowed any process to set the foreground window. However with Windows98/Me restriction were placed for which process should be allowed to set a foreground window. That may be the process itself in the foreground or a process started by it or the process that last received the input event. Any other process can set foreground window only if there is no other process in foreground or explicitly allowed using the AllowSetForegroundWindow function or no lock has been placed using LockSetForegroundWindow function. Windows98/Me allows setting a foreground lock timeout which if set to zero makes the operating system behave as with the earlier versions.

29Jan/073




WinAPI : Working with Windows Handles

We last saw how to get handles to the windows. Now once you got the handle you can call various functions to do a variety of jobs as getting information regarding the window, or changing the window's state or style. Let's see some of these functions.

28Jan/070




Getting Window Handles

Previously we saw how to get handle to a window using a few commands. Windows have more API functions that facilates getting handle to windows in more complex or different situations. Listed here are a few of them.