WinApi Dialog modalny - Kontrolka Edit

0

Mój problem leży w kontrolce Edit w dialogu modalnym. Edit ma flagę ES_MULTILINE, lecz gdy chcę przejść do następnej linii klikając ENTER dialog mi się zamyka.

Dlaczego kontrolka nie odbiera komunikatu jako pierwsza tylko główne okno dialogu?

Zauważyłem, że w parametrze wParam wysyła mi się przy kliknięciu identyfikator IDOK, a takiego nigdzie nie używam.

Dlaczego w Edicie kursor przechodzi do kolejnej linii dopiero po wciśnięciu Ctrl+Enter a nie samego ENTER?

Jeżeli to wam pomoże to jutro wrzucę wzorzec dialogu.

2

Tak na szybko z Googluf:
http://www.google.pl/search?client=opera&rls=en&q=winapi+edit+ws_multiline+enter&sourceid=opera&ie=utf-8&oe=utf-8&channel=suggest

ES_MULTILINE
Designates a multiline edit control. The default is single-line edit control.

When the multiline edit control is in a dialog box, the default response to pressing the ENTER key is to activate the default button. To use the ENTER key as a carriage return, use the ES_WANTRETURN style.

When the multiline edit control is not in a dialog box and the ES_AUTOVSCROLL style is specified, the edit control shows as many lines as possible and scrolls vertically when the user presses the ENTER key. If you do not specify ES_AUTOVSCROLL, the edit control shows as many lines as possible and beeps if the user presses the ENTER key when no more lines can be displayed.

If you specify the ES_AUTOHSCROLL style, the multiline edit control automatically scrolls horizontally when the caret goes past the right edge of the control. To start a new line, the user must press the ENTER key. If you do not specify ES_AUTOHSCROLL, the control automatically wraps words to the beginning of the next line when necessary. A new line is also started if the user presses the ENTER key. The window size determines the position of the Wordwrap. If the window size changes, the Wordwrapping position changes and the text is redisplayed.

Multiline edit controls can have scroll bars. An edit control with scroll bars processes its own scroll bar messages. Note that edit controls without scroll bars scroll as described in the previous paragraphs and process any scroll messages sent by the parent window.

1 użytkowników online, w tym zalogowanych: 0, gości: 1