Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Does a Pseudo-Group-Box Control Exist
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Does a Pseudo-Group-Box Control Exist

 Post Reply Post Reply
Author
Message
Warren View Drop Down
Groupie
Groupie
Avatar

Joined: 23 February 2005
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote Warren Quote  Post ReplyReply Direct Link To This Post Topic: Does a Pseudo-Group-Box Control Exist
    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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Warren View Drop Down
Groupie
Groupie
Avatar

Joined: 23 February 2005
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote Warren Quote  Post ReplyReply Direct Link To This Post 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



Back to Top
Warren View Drop Down
Groupie
Groupie
Avatar

Joined: 23 February 2005
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote Warren Quote  Post ReplyReply Direct Link To This Post 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

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

Warren
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Warren View Drop Down
Groupie
Groupie
Avatar

Joined: 23 February 2005
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote Warren Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.031 seconds.