I have problem with the message EM_SETTABSTOPS: if i set the tab character
size on message WM_CREATE all works, but if i try to set it in other place
in program it doesn't works.
Example:
OnCreate(HWND hwnd, CREATESTRUCT *lpCreateStruct)
{
hwndEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", 0,
WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL |
ES_AUTOVSCROLL | ES_MULTILINE | ES_WANTRETURN,
rect.left, rect.top,
(rect.right - rect.left), (rect.bottom -
rect.top),
hwnd,
(HMENU)IDE_MAINEDIT,lpCreateStruct->hInstance, 0);
FORWARD_WM_SETFONT(hwndEdit, (HFONT)GetStockObject(OEM_FIXED_FONT),
0,SendMessage);
Edit_SetTabStops(hwndEdit, 1, &wTabSpacing);
}
This code works, but if i try to call Edit_SetTabStops in other functions
independently from wTabSpacing value the tab characters become huge, even if
i call SendMessage instead of Edit_SetTabStops macro: result doesn't change.
I have tried also to destroy the edit control and recreate it and send
message EM_SETTABSTOPS, but it doesn't works.
Please help me.
|