Cannot find Label control
Re: Cannot find Label control
The control is based on the "Static" native window class. I thought there would be a window style (SS_* constant) which makes static controls resize themselves automatically dependent on the text. But there isn't. So looks like I'll really have to measure the text and do the resizing myself.
Another problem that still exists: keyboard cues (underlining of mnemonics) do not work as expected. On Windows XP and newer, keyboard cues should be invisible by default and become visible if the ALT key is pressed. This works for my ButtonControls, but for some reason not for the label.
BTW, I'm afraid the label control has the same redrawing speed issues as the button controls.
Another problem that still exists: keyboard cues (underlining of mnemonics) do not work as expected. On Windows XP and newer, keyboard cues should be invisible by default and become visible if the ALT key is pressed. This works for my ButtonControls, but for some reason not for the label.
BTW, I'm afraid the label control has the same redrawing speed issues as the button controls.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
Well then good luck! I believe in you!
Re: Cannot find Label control
AutoSize is done, see the attachment. The bug with the frame is still there. Maybe I'll change the label control to not be based on the STATIC window class anymore and draw the text manually instead. This might help.
Oh and keyboard cues actually work, I made a mistake when testing it.
Oh and keyboard cues actually work, I made a mistake when testing it.
- Attachments
-
- UniLabelU.zip
- (101.36 KiB) Downloaded 895 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
Hello Timo!
Yes, looks good, but the problem with the Frame+Label is relatively important. As I said, when I click somewhere on the Frame, the label gets invisible.
Hans
Yes, looks good, but the problem with the Frame+Label is relatively important. As I said, when I click somewhere on the Frame, the label gets invisible.
Hans
Re: Cannot find Label control
I've changed the control to a windowless one and am drawing everything manually now.
Everything seems to work now. But I had to remove some things:
Everything seems to work now. But I had to remove some things:
- the events ContextMenu, MouseEnter, MouseHover, MouseLeave, because they don't work with windowless controls (at least not that easy)
- the events DestroyedControlWindow and RecreatedControlWindow (well, it's a windowless control now)
- the properties HoverTime and hWnd
- the rtlLayout flag (it's pointless for label controls)
- Attachments
-
- UniLabelU.zip
- (103.42 KiB) Downloaded 902 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
Hello! I cannot set RTL, it has no effect.
And the toolbox bitmap for the control is the MFC-symbol now (just in case you care).
And the toolbox bitmap for the control is the MFC-symbol now (just in case you care).
Re: Cannot find Label control
It has. Remember that rtlLayout has been removed. The remaining rtlText makes "bla:" to ":bla", i. e. it influences the placement of punctuation marks only. If you really need rtlLayout back, I think I can add it again. But this will be an emulation then. Normally rtlLayout causes the point (0,0) be placed top-right instead of top-left. Using the SetLayout API function, it's possible to make a device context RTL. But windowless controls don't have their own device context, so (0,0) will have to remain top-left.TickTick wrote:Hello! I cannot set RTL, it has no effect.
ATL, not MFC. I've changed the icon on purpose. The old one was the icon of my Animation control.TickTick wrote:And the toolbox bitmap for the control is the MFC-symbol now (just in case you care).
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
I noticed that I need it back when I tried out WordWrap. When using Autosize of course you don't need it.
A bug:
Place the label in a frame and then set RTL true, and it will have a strange background (part of the frame border), although it's nowhere near to the Frame border.
A bug:
Place the label in a frame and then set RTL true, and it will have a strange background (part of the frame border), although it's nowhere near to the Frame border.
Re: Cannot find Label control
I've added rtlLayout back. To keep it simple, the events still use left-to-right coordinates. Let me know if this is a problem.
The drawing issue is very likely another problem with my Frame control (it begins to drive me mad...).
The drawing issue is very likely another problem with my Frame control (it begins to drive me mad...).
- Attachments
-
- UniLabelU.zip
- (103.55 KiB) Downloaded 908 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
Please see my bug report in the button controls bugtracker.
Re: Cannot find Label control
How well do you know C++? As I don't find a solution for the remaining drawing bug, I'm thinking about sending you the sourcecode.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
I have given up. My dead line ended, so I don't have use for it anymore.
Regards,
Hans
Regards,
Hans
Re: Cannot find Label control
I'm sorry to hear that.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: Cannot find Label control
Timo,
if you find the time, please fix the label. My app was buggy, so I have an extended dead line now.
Regards,
Hans
if you find the time, please fix the label. My app was buggy, so I have an extended dead line now.
Regards,
Hans
Re: Cannot find Label control
Do you want the C++ source code? I have run out of ideas and do not really have time to work on the control. I think that either the device context's origin gets somehow fucked up or drawing the label validates the whole device context and not just that part that is occupied by the label.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!