Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ceres.physics.uiowa.edu!iowasp.physics.uiowa.edu!ns-mx!ccad.uiowa.edu!cadsi Newsgroups: comp.windows.ms.programmer Subject: Re: SetDlgItemText() w/ BC++ 2.0 Message-ID: <1991Mar23.201214.14695@ccad.uiowa.edu> From: cadsi@ccad.uiowa.edu (CADSI) Date: 23 Mar 91 20:12:14 GMT References: <1991Mar15.171838.7689@dbase.A-T.COM> Organization: CAD-Research, U. of Iowa, Iowa City, Iowa Lines: 31 From article <1991Mar15.171838.7689@dbase.A-T.COM>, by awd@dbase.A-T.COM (Alastair Dallas): > In article <1991Mar4.200940.27679@ux1.cso.uiuc.edu>, tmkk@uiuc.edu (Scott Coleman) writes: >> > > I don't have BC++, just ordinary MSC, but I'm wondering if you're compiling > in small model. If so, then a quoted string literal will be passed as > a 16-bit pointer, whereas SetDlgItemText wants a LPSTR. If this is > what's biting you, the following should fix it: > > SetDlgItemText(hwnd, (LPSTR) "Something"); > You know what though, I thought ANSI 'C' states that if you use prototypes, type conversions are automatic. For instance, if you write /* prototype */ double cos(double f); . . . double x = cos(2); then the 2 (integer by default in C) will be automatically type converted to double. Then WHY doesn't the type conversion work for LPSTR above? Am I missing something here (could well be). |----------------------------------------------------------------------------| |Tom Hite | The views expressed by me | |Manager, Product development | are mine, not necessarily | |CADSI (Computer Aided Design Software Inc. | the views of CADSI. | |----------------------------------------------------------------------------|