Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!sol.ctr.columbia.edu!ira.uka.de!iraul1!tremmel From: tremmel@iraul1.ira.uka.de (Wolfgang Tremmel) Newsgroups: comp.windows.ms Subject: Re: Help with EDITTEXT in modal dialog box Message-ID: <90.214.10:38:42@ira.uka.de> Date: 2 Aug 90 10:38:42 GMT References: <4033@zap.sw.mcc.com> Sender: news@ira.uka.de (USENET News System) Organization: University of Karlsruhe, FRG Lines: 32 In article <4033@zap.sw.mcc.com> adrian@zap.sw.mcc.com (Adrian Lao) writes: > >The dialog box pops up fine and everything works except the multline edit >control window. According to the manual, if I specified ES_AUTOVSCROLL and >ES_MULTILINE, it should go to the next line in multiline edit window whenever >I press the "Enter" key, but not in this case, nothing happens when I press >the "Enter" key (of course, the focus is in the multi line edit control window). See the README (or TIPS) file: You have to use Control - Return. Enter is reserved for the DefPushButton. >The multi line edit control window just won't go to the next line. > >So what happens? > Solution: - Define a STATIC control with an ID 1 - Insert the following statements in the command - case: case WM_COMMAND: . . . if (wParam == IDOK) { /* send a WM_CHAR message with 0x0a as wParam to your edit - window */ return(TRUE); } btw, the edit - window works fine if it is not child of a dialog - box. Has anybody a better solution? Wolfgang Tremmel, tremmel@ira.uka.de