Print Page | Close Window

Does a Pseudo-Group-Box Control Exist

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=3198
Printed Date: 09 November 2025 at 5:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Does a Pseudo-Group-Box Control Exist
Posted By: Warren
Subject: Does a Pseudo-Group-Box Control Exist
Date Posted: 10 November 2005 at 9:44am
Easy Question. Maybe an easy answer?

I'm looking for a control that draws a divider line, like Microsoft uses (the image is from the Word 2003->Tools->Options dialog). I call it a Pseudo-Group Box, because the colours/theme are the same as a group box, but it's just the top edge of the group box.



Is this in the Xtreme Toolkit? I've looked around, but the Toolkit has so much functionality that I though I might have just overlooked it.

I could make them out of separate controls (e.g. a divider line overlapped by some static text, that is coloured differently), but I didn't think that was very elegant. What I was hoping for is one static control, that I could stretch out to the whole width, and the control would put the text on one side, and just draw the line from a slight bit past the end of the text to the other side of the control.

Thanks

Warren



Replies:
Posted By: Oleg
Date Posted: 11 November 2005 at 2:47am

Hi,

In Xtreme Toolkit pro there is no such control but, you right it can be separate controls

See Options page of Customise Dialog (you can find this line)

CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,122,9,101,1



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Warren
Date Posted: 11 November 2005 at 7:54am
Yes, that's the work-around I have used before (i.e. the horizontal etched line), but that doesn't give the text the "Themed" Blue text, and the horizontal etched line is a bit darker than the pseudo-group-box control used by Microsoft.

If I think of a good solution, I'll try to post something...

Warren





Posted By: Warren
Date Posted: 17 November 2005 at 12:50pm
This is resolved.  I ended up writing this control myself (I wrote the whole thing myself - it's not based on any Codejock code) I posted the results as an article on CodeProject, if anyone else is interested in adding something like this to their project, the article is here:

http://www.codeproject.com/useritems/GroupLine.asp - http://www.codeproject.com/useritems/GroupLine.asp

Codejock: If you want to add my control / any parts of it to the Xtreme Tookit, you're welcome to it...

Warren


Posted By: Oleg
Date Posted: 06 December 2005 at 9:27am

Hi,

Hint for you article:

I saw in you code color of group box hardcoded. to get color you can use:

COLORREF clrLine;

GetThemeColor(theme, BP_GROUPBOX, GBS_NORMAL, TMT_BORDERCOLORHINT, &clrLine)

 

ps... We implemented our version of CGroupLine :) for CommandBars Customize Dialog.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Warren
Date Posted: 06 December 2005 at 10:43am
Thanks Oleg !

I hated hardcoding that colour (as you could probably tell by the comment in my code), but I couldn't find the proper colour in the enourmous list of possible values for the theme API, and I didn't want to spend all day tracking it down.

I found the documentation for the Theme API is unusually bad by Microsoft's standards - maybe they had a summer student write it up

I will update my code and article.

Thanks again...

Warren



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net