Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I read that there is DTS_RIGHTALIGN to align on right but it doesn't work, I used modifiestyle

What I have tried:

I searched already in internet
Posted
Updated 20-May-20 2:03am
Comments
Member 14594285 14-Nov-19 9:27am    
i TRIED :
m_timeend.Create(WS_CHILD | WS_VISIBLE | DTS_RIGHTALIGN,CRect(10, 10, 200, 35),this, IDC_TIMEEND);

but it doesn't work
Richard MacCutchan 14-Nov-19 11:03am    
What does "it doesn't work" mean?
Member 14594285 14-Nov-19 11:08am    
I tried also:
m_timeend.ModifyStyle(0, DTS_RIGHTALIGN);
Richard MacCutchan 14-Nov-19 11:30am    
I have tested this and it works fine. The actual alignment is not clear unless you look closely. When the calendar window opens it is aligned with the left or right edge of the control. If you create two controls one with this option and one without you can easily see the difference. Although to be honest it is hardly of much use.
Member 14594285 14-Nov-19 11:56am    
so m_timeend.ModifyStyle(0, DTS_RIGHTALIGN) works? it's strange, I see that it doesn't work, I have align on left and not on right, can I see a photo?

1 solution

As you can see in this article[^], to control this alignment, change the value of the Right Align field in the Properties window. Its default value is set to True, which means that the calendar would be aligned to the right. To programmatically set this property, add the DTS_RIGHTALIGN property.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900