Category : Files from Magazines
Archive   : JUN92.ZIP
Filename : 3N06031A

 
Output of file : 3N06031A contained in archive : JUN92.ZIP
Listing 1

/*****************************************************/
/* comboed.c */
/* -- Subclass the EditItem of a ComboBox. */
/*****************************************************/

#include
#include "comboed.h"

FARPROC
LpfnSubclassComboEdit(FARPROC lpfn, HWND hwndCombo)
/*****************************************************/
/* -- If the given ComboBox contains an EditItem, */
/* subclass it with the given window proc. */
/* -- Return the EditItem's original window */
/* procedure, or NULL for failure. */
/* -- lpfn : Procedure instance of subclasser. */
/* -- hwndCombo : ComboBox window handle. */
/*****************************************************/
{
HWND hwndChild;
FARPROC lpfnEdit;

/* Loop over all the child windows of the */
/* ComboBox. Stop if we find an EditItem. */
for (hwndChild = GetWindow(hwndCombo, GW_CHILD);
hwndChild != NULL;
hwndChild = GetWindow(hwndChild, GW_HWNDNEXT))
{
char szClass[10];

GetClassName(hwndChild, szClass,
sizeof szClass);
if (lstrcmpi(szClass, "edit") == 0)
break;
}

if (hwndChild == NULL)
return NULL; /* Must be CBS_DROPDOWNLIST. */

lpfnEdit =
(FARPROC)GetWindowLong(hwndChild, GWL_WNDPROC);
SetWindowLong(hwndChild, GWL_WNDPROC, (LONG)lpfn);
return lpfnEdit;
}



  3 Responses to “Category : Files from Magazines
Archive   : JUN92.ZIP
Filename : 3N06031A

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/