Loading ...
Sorry, an error occurred while loading the content.

Re: combobox select

Expand Messages
  • Dennis K. Paulsen
    Thanks. I ve added a couple more useful combo box functions in the latest CVS build, available at http://dkpinteractive.ath.cx/ (under projects). Regards, D
    Message 1 of 2 , Dec 23, 2004
    • 0 Attachment
      Thanks. I've added a couple more useful combo box functions in the
      latest CVS build, available at http://dkpinteractive.ath.cx/ (under
      projects).


      Regards,
      D

      --- In perlguitest@yahoogroups.com, "David Wang" <yahoogroups@d...>
      wrote:
      >
      >
      > Hi,
      >
      > Thanks for all the good work on this module. i have a very
      > simple patch to recontribute. it implements a combobox
      > index select. we already have combobox get, and all
      > kinds of other selects (listview selects, menu selects),
      > but combobox select was missing. this patches against
      > cvs on 12/10/2004.
      >
      > -dave
      >
      >
      > -begin------------------------------------------------
      > --- Win32-GuiTest.orig/guitest.pm Sat Nov 20 08:00:24 2004
      > +++ Win32-GuiTest/guitest.pm Fri Dec 10 13:41:54 2004
      > @@ -122,6 +122,7 @@
      > GetListViewContents SelListViewItem SelListViewItemText
      > IsListViewItemSel
      > GetTabItems SelTabItem SelTabItemText IsTabItemSel
      > SelTreeViewItemPath GetTreeViewSelPath MouseMoveWheel
      > + SelComboItem
      > )],
      > VARS => [ qw(
      > $debug
      > --- Win32-GuiTest.orig/guitest.xs Sat Nov 20 08:00:27 2004
      > +++ Win32-GuiTest/guitest.xs Fri Dec 10 14:28:14 2004
      > @@ -345,6 +345,20 @@
      > return g_bRetVal;
      > }
      >
      > +BOOL SelComboItem(HWND hWnd, int iItem, BOOL bMulti)
      > +{
      > + g_hWnd = hWnd;
      > +
      > + g_hHook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)
      HookProc,
      > + g_hDLL, GetWindowThreadProcessId
      (hWnd,
      > NULL));
      > + if (g_hHook == NULL)
      > + return FALSE;
      > +
      > + SendMessage(hWnd, CB_SETCURSEL, iItem, bMulti);
      > +
      > + return g_bRetVal;
      > +}
      > +
      > BOOL SelLVItemText(HWND hWnd, char *lpItem, BOOL bMulti)
      > {
      > g_hWnd = hWnd;
      > @@ -1494,6 +1508,16 @@
      > OUTPUT:
      > RETVAL
      >
      > +BOOL
      > +SelComboItem(hWnd, iItem, bMulti=FALSE)
      > + HWND hWnd
      > + int iItem
      > + BOOL bMulti
      > +CODE:
      > + RETVAL = SelComboItem(hWnd, iItem, bMulti);
      > +OUTPUT:
      > + RETVAL
      > +
      > SV*
      > GetListText(hwnd, index)
      > HWND hwnd;
      > -end--------------------------------------------------
    Your message has been successfully submitted and would be delivered to recipients shortly.