Changeset 11953


Ignore:
Timestamp:
Oct 19, 1999, 9:26:08 PM (26 years ago)
Author:
sandervl
Message:

Combobox + getWindowTextA/W fixes

Location:
tags/trunk/src/user32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified tags/trunk/src/user32/Makefile

    r11853 r11953  
    1 # $Id: Makefile,v 1.31 1999-10-13 14:24:24 sandervl Exp $
     1# $Id: Makefile,v 1.32 1999-10-19 19:26:07 sandervl Exp $
    22
    33#
     
    124124win32wbasepos.obj: win32wbasepos.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h dc.h pmframe.h win32wdesktop.h
    125125win32wnd.obj:   win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h
    126 win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h
     126win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h oslibmsg.h $(PDWIN32_INCLUDE)\win\controls.h
    127127win32wndchild.obj: win32wndchild.cpp win32wndchild.h gen_object.h
    128128win32wmdiclient.obj: win32wmdiclient.cpp win32wbase.h win32wmdiclient.h win32wmdichild.h gen_object.h
  • TabularUnified tags/trunk/src/user32/combo.cpp

    r11792 r11953  
    1 /* $Id: combo.cpp,v 1.4 1999-10-08 21:23:37 cbratschi Exp $ */
     1/* $Id: combo.cpp,v 1.5 1999-10-19 19:26:07 sandervl Exp $ */
    22/*
    33 * Combo controls
     
    2525 */
    2626
    27 #define CB_GETPTR( hwnd )      (*(LPHEADCOMBO*)(GetInfoPtr(hwnd)))
     27#define CB_GETPTR( hwnd )      ((LPHEADCOMBO)(GetInfoPtr(hwnd)))
    2828#define CB_NOTIFY( lphc, code ) \
    2929        (SendMessageA( (lphc)->owner, WM_COMMAND, \
     
    12381238  if(ptr)
    12391239  {
    1240     lphc =  (*(LPHEADCOMBO*)(ptr));
     1240    lphc =  (LPHEADCOMBO )ptr;
    12411241    if( lphc ) return lphc->hWndLBox;
    12421242  }
     
    17751775
    17761776      if(ptr)
    1777         lphc = (*(LPHEADCOMBO*)(ptr));
     1777        lphc = (LPHEADCOMBO)ptr;
    17781778
    17791779      //TRACE("[%04x]: msg %s wp %08x lp %08lx\n",
  • TabularUnified tags/trunk/src/user32/controls.cpp

    r11604 r11953  
    1 /* $Id: controls.cpp,v 1.3 1999-09-23 10:33:59 sandervl Exp $ */
     1/* $Id: controls.cpp,v 1.4 1999-10-19 19:26:07 sandervl Exp $ */
    22/* File: controls.cpp -- Win32 common controls
    33 *
     
    1010#include "misc.h"
    1111
    12 #include "controls.h"
    1312#include "button.h"
    1413#include "static.h"
     
    1817#include "win32dlg.h"
    1918#include "win32wdesktop.h"
     19#include "controls.h"
     20
     21ATOM controlAtoms[MAX_CONTROLS] = {0};
    2022
    2123/* registration */
     
    4648
    4749  dprintf(("Register BUTTON class"));
    48   if (!BUTTON_Register()) dprintf(("failed!!!"));
     50  controlAtoms[BUTTON_CONTROL] = BUTTON_Register();
     51  if (!controlAtoms[BUTTON_CONTROL]) dprintf(("failed!!!"));
    4952
    5053  dprintf(("Register STATIC class"));
    51   if (!STATIC_Register()) dprintf(("failed!!!"));
     54  controlAtoms[STATIC_CONTROL] = STATIC_Register();
     55  if (!controlAtoms[STATIC_CONTROL]) dprintf(("failed!!!"));
    5256
    5357  dprintf(("Register SCROLLBAR class"));
    54   if (!SCROLLBAR_Register()) dprintf(("failed!!!"));
     58  controlAtoms[SCROLLBAR_CONTROL] = SCROLLBAR_Register();
     59  if (!controlAtoms[SCROLLBAR_CONTROL]) dprintf(("failed!!!"));
    5560
    5661  dprintf(("Register LISTBOX class"));
    57   if (!LISTBOX_Register()) dprintf(("failed!!!"));
     62  controlAtoms[LISTBOX_CONTROL] = LISTBOX_Register();
     63  if (!controlAtoms[LISTBOX_CONTROL]) dprintf(("failed!!!"));
    5864
    5965  dprintf(("Register COMBOLBOX class"));
    60   if (!COMBOLBOX_Register()) dprintf(("failed!!!"));
     66  controlAtoms[COMBOLBOX_CONTROL] = COMBOLBOX_Register();
     67  if (!controlAtoms[COMBOLBOX_CONTROL]) dprintf(("failed!!!"));
    6168
    6269  dprintf(("Register COMBOBOX class"));
    63   if (!COMBOBOX_Register()) dprintf(("failed!!!"));
     70  controlAtoms[COMBOBOX_CONTROL] = COMBOBOX_Register();
     71  if (!controlAtoms[COMBOBOX_CONTROL]) dprintf(("failed!!!"));
    6472
    6573  dprintf(("Register EDIT class"));
    66   if (!EDIT_Register()) dprintf(("failed!!!"));
     74  controlAtoms[EDIT_CONTROL] = EDIT_Register();
     75  if (!controlAtoms[EDIT_CONTROL]) dprintf(("failed!!!"));
    6776
    6877  dprintf(("Register MDICLIENT class"));
    69   if (!MDICLIENT_Register()) dprintf(("failed!!!"));
     78  controlAtoms[MDICLIENT_CONTROL] = MDICLIENT_Register();
     79  if (!controlAtoms[MDICLIENT_CONTROL]) dprintf(("failed!!!"));
    7080
    7181  dprintf(("Register DIALOG class"));
    72   if (!DIALOG_Register()) dprintf(("failed!!!"));
     82  controlAtoms[DIALOG_CONTROL] = DIALOG_Register();
     83  if (!controlAtoms[DIALOG_CONTROL]) dprintf(("failed!!!"));
    7384
    7485  dprintf(("Register DESKTOP class"));
    75   if (!DESKTOP_Register()) dprintf(("failed!!!"));
     86  controlAtoms[DESKTOP_CONTROL] = DESKTOP_Register();
     87  if (!controlAtoms[DESKTOP_CONTROL]) dprintf(("failed!!!"));
    7688}
    7789
     
    110122
    111123
     124BOOL WIDGETS_IsControl(Win32BaseWindow *window, int control)
     125{
     126  if(control >= MAX_CONTROLS || window == NULL || window->getClass() == NULL)
     127        return FALSE;
     128
     129  return controlAtoms[control] == window->getClass()->getAtom();
     130}
     131
  • TabularUnified tags/trunk/src/user32/win32wbase.cpp

    r11945 r11953  
    1 /* $Id: win32wbase.cpp,v 1.55 1999-10-19 12:52:30 sandervl Exp $ */
     1/* $Id: win32wbase.cpp,v 1.56 1999-10-19 19:26:08 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    641641  else
    642642  {
     643        dprintf(("Set window ID to %x", cs->hMenu));
    643644        setWindowId((DWORD)cs->hMenu);
    644645  }
     
    24532454int Win32BaseWindow::GetWindowTextA(LPSTR lpsz, int cch)
    24542455{
     2456    if(windowNameA == NULL) {
     2457        *lpsz = 0;
     2458        return 0;
     2459    }
    24552460    strncpy(lpsz, windowNameA, cch);
    24562461    return wndNameLength;
     
    24602465int Win32BaseWindow::GetWindowTextW(LPWSTR lpsz, int cch)
    24612466{
     2467    if(windowNameW == NULL) {
     2468        *lpsz = 0;
     2469        return 0;
     2470    }
    24622471    lstrcpynW((LPWSTR)lpsz, windowNameW, cch);
    24632472    return wndNameLength;
Note: See TracChangeset for help on using the changeset viewer.