The MASM Forum
Projects => Easy Code IDE 32/64-bit => Topic started by: Diamond Star on November 21, 2013, 09:26:12 AM
-
Hello !
I know that window's style cannot be changed at run time but only when it was being created with CreatWindowEx API.
I need to change window's direction to Right to Left mode for right-direction languages, like Arabic and Persia. So I wish in the next updates that Easy Code's author may add new property make that possible even at Designing mode
And if there is a way to do that at run time then please tell me how
and THANK YOU
-
GetWindowLong, GetWindowLongPtr, GetClassLong, GetClassLongPtr to get style/extended style bits
SetWindowLong, SetWindowLongPtr, SetClassLong, SetClassLongPtr to set style/extended style bits
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591%28v=vs.85%29.aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633591%28v=vs.85%29.aspx)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633588%28v=vs.85%29.aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633588%28v=vs.85%29.aspx)
-
Thank you
I will see it and try it
-
Try \Masm32\qEditor.exe ;)
-
looks like Greek to me
well, no, i actually know some Greek alphabet characters :P
-
The point is, if you use a RichEdit control, like qEditor does, right-to-left is automatically enabled...
-
Hi Diamond Star,
Sorry for the inconveniences.
I have never had the chance to test Right-To-Left mode, but according to Microsoft documentation it should work if the window (or control) has the WS_EX_RTLREADING style. In Easy Code that is acomplished by setting the "RightToLeft" property to TRUE for every window and child control in the project. Doesn't that work?
Regards.
-
Thank you all
my friend rsala your idea is not beneficial here
Because I want to reverse the window entirely like this:
(http://t1.gstatic.com/images?q=tbn:ANd9GcTyJHXndr-88tin6qWu4nmtx00WusQ0dALTU6HgF8xMo3HnrS2ItqGBOPk)
But no problem, I think this can be done with SetWindowLongPtr API according to what I read and find in MSDN.
-
Ok, thank you very much for the info. I'll see what I can do for Easy Code to work.
Regards.
-
Hi Diamond Star,
I'm going to test the layout direction and I'm afraid I'll need your help. Are you using Masm or GoAsm version?
Thanks in advance,
Ramon
-
I finally do it,I find the resolution with this Code:
;Revrese Window layout to RTLLAYOUT******
.ElseIf uMsg == WM_NCCREATE
Invoke SetWindowLong, hWnd, GWL_EXSTYLE, WS_EX_LAYOUTRTL
Invoke InvalidateRect, hWnd, NULL, TRUE
;End of Revrese Window layout to RTLLAYOUT******
Befor about three days I searched deeply in MSDN and find my request exactly
I find it in MSDN in a document about windows layout and mirroring, where they talk
exactly about what I need where the programmer may need to change window layout after
creating it for making multi-langusge applications and put an example.
I get that code from it and insert it in WM_NCCREATE message as they said earlier
in thee document ans it works good
Thiscode should be inserted in WM_NCCREATE to redirect the window and all its child
controls ,but if it is inserted in other place then only the window will be affected
-
rather than using InvalidateRect, you might want to use RedrawWindow, instead
include the RDW_FRAME, RDW_INVALIDATE, and RDW_UPDATENOW flags
http://msdn.microsoft.com/en-us/library/windows/desktop/dd162911%28v=vs.85%29.aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/dd162911%28v=vs.85%29.aspx)
-
it's typical microsoft documentation - lol
sorry - my previous post was mis-leading
i was thinking of RedrawWindow but i meant to refer to SetWindowPos
but, i remembered that RedrawWindow had specific flags pertaining to redrawing the nonclient area (ie frame)
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx)
If you have changed certain window data using SetWindowLong, you must call SetWindowPos for the changes to take effect. Use the following combination for uFlags: SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED.
-
Thank You !
But I used only the code I put Previously and it works perfectly
and every thing goes well
SetWindowLong and InvalidateRect is enough and hit the target I wanted
the window redirected with all its child controls
Thanks for every one help in this topic