

Task-switching applications need to get window text so they can display the window title in the switcher window.
GETWINDOWTEXT SAMPLE CODE
Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. FindWindow () needs to get window text in order to find a window. The winuser.h header defines GetWindowTextLength as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. * Copyright (C) 1995, 2016 Softel vdm, Inc. GetWindowText has a problem: Window text needs to be readily available without hanging. * SftTree/DLL 7.5 - Tree Control for C/C++ */ to fetch window caption lnlengthgetwindowtext(lncurrentwindow. Also note that the SendMessage will return the number of characters placed.

Replace it with the following and it should work.

When using the WMGETEXT message you need to supply the buffer into which the text is to be placed.
GETWINDOWTEXT SAMPLE WINDOWS
The source code is located at C:\Program Files (x86)\Softelvdm\SftTree DLL 7.5\Samples\MFC\CellEditing\SamplVw.cpp or C:\Program Files\Softelvdm\SftTree DLL 7.5\Samples\MFC\CellEditing\SamplVw.cpp (on 32-bit Windows versions). For example, if you are calling the function: GetWindowText(HWND hwnd, LPSTR lpsz, int cch) declare it as follows (remember that ints and all handles are 32. This sample illustrates cell editing using an edit control and a combo box, with cell navigation and restricted cells.
