Changeset 4408 for trunk/src


Ignore:
Timestamp:
Oct 3, 2000, 7:29:22 PM (25 years ago)
Author:
sandervl
Message:

EnumDisplaySettingsA fix + edit fix (numeric keys)

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/display.cpp

    r3934 r4408  
    1 /* $Id: display.cpp,v 1.7 2000-08-02 17:32:27 bird Exp $ */
     1/* $Id: display.cpp,v 1.8 2000-10-03 17:29:20 sandervl Exp $ */
    22/*
    33 * Display/Monitor Win32 apis
     
    1616#include <os2win.h>
    1717#include <misc.h>
     18#include <string.h>
    1819#include <heapstring.h>
    1920#include "pmwindow.h"
     
    280281        LPCSTR name,            /* [in] huh? */
    281282        DWORD n,                /* [in] nth entry in display settings list*/
    282         LPDEVMODEA devmode      /* [out] devmode for that setting */
    283 )
    284 {
    285         dprintf(("USER32:  EnumDisplaySettingsA %d", n));
    286         if (n==0) {
     283        LPDEVMODEA devmode)     /* [out] devmode for that setting */
     284{
     285        dprintf(("USER32: EnumDisplaySettingsA %s %d %x", name, n, devmode));
     286        if(devmode == NULL) {
     287                SetLastError(ERROR_INVALID_PARAMETER);
     288                return FALSE;
     289        }
     290        //SvL: VMWare calls this with -1; valid in NT4, SP6
     291        //     Other negative numbers too. Don't know what they mean.
     292        if(n == 0xFFFFFFFF) {
     293                n = 0;
     294        }
     295        memset(devmode, 0, sizeof(*devmode));
     296        devmode->dmSize = sizeof(*devmode);
     297        if(n==0) {
    287298                devmode->dmBitsPerPel = ScreenBitsPerPel;
    288299                devmode->dmPelsHeight = ScreenHeight;
     
    296307                return TRUE;
    297308        }
     309        SetLastError(ERROR_INVALID_PARAMETER);
    298310        return FALSE;
    299311}
  • trunk/src/user32/edit.cpp

    r4344 r4408  
    1 /* $Id: edit.cpp,v 1.40 2000-09-29 22:28:10 sandervl Exp $ */
     1/* $Id: edit.cpp,v 1.41 2000-10-03 17:29:22 sandervl Exp $ */
    22/*
    33 *      Edit control
     
    30113011                  if (es->style & ES_NUMBER)
    30123012                  {
    3013                     if (((BYTE)c < '0') || ((BYTE)c > '9')) MessageBeep(MB_ICONEXCLAMATION);
    3014                     return;
     3013                        if (((BYTE)c < '0') || ((BYTE)c > '9')) {
     3014                                MessageBeep(MB_ICONEXCLAMATION);
     3015                                return;
     3016                        }
    30153017                  }
    30163018                  str[0] = c;
Note: See TracChangeset for help on using the changeset viewer.