Hi,
The following code creates a RichEdit control and places some text in it. According to the Win32 API Reference and to MSDN, SendMessage_() used as you can see should right-align the text. Well, it doesn't. Any API guru around who can help me solve this?
Code: Select all
If OpenWindow(0, #CW_USEDEFAULT, #CW_USEDEFAULT, #CW_USEDEFAULT, #CW_USEDEFAULT, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget, "RichEdit sample")
RichEditID = CreateWindowEx_(0, @"RichEdit20A", @"This text should appear right aligned after the following code is executed", #WS_CHILD|#WS_VISIBLE|#WS_VSCROLL|#ES_MULTILINE|#ES_AUTOVSCROLL|#ES_NOHIDESEL|#WS_CLIPSIBLINGS, 0, 0, WindowWidth(), WindowHeight(), WindowID(), 0, LoadLibrary_("RICHED20.DLL"), 0)
pf.PARAFORMAT
pf\cbSize = SizeOf(PARAFORMAT)
pf\dwMask = #PFM_ALIGNMENT
pf\wAlignment = #PFA_RIGHT
SendMessage_(RichEditID, #EM_SETPARAFORMAT, 0, @pf)
Repeat
Until WaitWindowEvent()=#PB_EventCloseWindow
EndIf
El_Choni
