Mercurial > dwindows
comparison os2/dw.c @ 16:ca7a8215487a
Removed structure packing option to fix a crash in dw_mle_search() when
built as a DLL. Also added dw_mle_set_word_wrap() functionality on OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 12 Jul 2001 21:27:13 +0000 |
parents | 81833f25b1aa |
children | f1002d51d959 |
comparison
equal
deleted
inserted
replaced
15:81833f25b1aa | 16:ca7a8215487a |
---|---|
3930 * handle: Handle to the MLE. | 3930 * handle: Handle to the MLE. |
3931 * state: TRUE if it wraps, FALSE if it doesn't. | 3931 * state: TRUE if it wraps, FALSE if it doesn't. |
3932 */ | 3932 */ |
3933 void dw_mle_set_word_wrap(HWND handle, int state) | 3933 void dw_mle_set_word_wrap(HWND handle, int state) |
3934 { | 3934 { |
3935 WinSendMsg(handle, MLM_SETWRAP, MPFROMLONG(state), 0); | |
3935 } | 3936 } |
3936 | 3937 |
3937 /* | 3938 /* |
3938 * Sets the current cursor position of an MLE box. | 3939 * Sets the current cursor position of an MLE box. |
3939 * Parameters: | 3940 * Parameters: |
3955 */ | 3956 */ |
3956 int dw_mle_search(HWND handle, char *text, int point, unsigned long flags) | 3957 int dw_mle_search(HWND handle, char *text, int point, unsigned long flags) |
3957 { | 3958 { |
3958 MLE_SEARCHDATA msd; | 3959 MLE_SEARCHDATA msd; |
3959 | 3960 |
3961 /* This code breaks with structure packing set to 1 (/Sp1 in VAC) | |
3962 * if this is needed we need to add a pragma here. | |
3963 */ | |
3960 msd.cb = sizeof(msd); | 3964 msd.cb = sizeof(msd); |
3961 msd.pchFind = text; | 3965 msd.pchFind = text; |
3962 msd.pchReplace = NULL; | 3966 msd.pchReplace = NULL; |
3963 msd.cchFind = strlen(text); | 3967 msd.cchFind = strlen(text); |
3964 msd.cchReplace = 0; | 3968 msd.cchReplace = 0; |