Click to See Complete Forum and Search --> : Very simple question A Separator


buffal
October 1st, 2005, 03:54 AM
I am wondering how I can draw a separator on my dialog box, th eone same as that you see in some drop-down menu. I think it simple to you but soooo difficult to me . I need it to look like a 3d line.
Thank you

buffal
October 1st, 2005, 04:01 AM
I have 2 picture boxes and I want a separator in between

kkez
October 1st, 2005, 06:51 AM
Do you mean a splitter window? But i can't see the link between a splitter window and a dropdown menu....

buffal
October 2nd, 2005, 02:43 AM
Alt-F on your web browser, you can then see the line.
If you know how to do that, could you post something about it please?

olivthill
October 2nd, 2005, 03:04 AM
In the resource of a menu, you define MENUITEM SEPARATOR but I don't know how you can easily write a line in a dialog box.

ovidiucucu
October 2nd, 2005, 06:02 AM
I hope the attached image suggest what you must do with no other comments. ;)

buffal
October 3rd, 2005, 04:04 AM
But there are some developers who do not know how to do that, :(

buffal
October 3rd, 2005, 04:11 AM
But sadly, your image isnt what I really wanted.
So now I post an image please have a look and tell me how that can be accomplished.
Many thanks inadvance to you by the way...

kkez
October 3rd, 2005, 04:39 AM
It's a simple static or picture control (as ovidiucucu shown) with 1 pixel height and an etched border:

CreateWindow("STATIC", "", WS_CHILD | WS_VISIBLE | SS_ETCHEDFRAME, 5,5,
100, //the length
1, //1 pixel (or 2) high
hwnd, (HMENU)-1, //IDC_STATIC?
GetModuleHandle(NULL), NULL);

Can be:

SS_ETCHEDFRAME
SS_GRAYFRAME
SS_GRAYRECT
SS_BLACKFRAME
look here for more... (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/staticcontrols/staticcontrolreference/staticcontrolstyles.asp)

ovidiucucu
October 3rd, 2005, 04:43 AM
But sadly, your image isnt what I really wanted.
So now I post an image please have a look and tell me how that can be accomplished.
Many thanks inadvance to you by the way...
Let us play "Etched-Raised"... :D

change "Color" combo selection from "Etched" to "Gray"
go to "Extended Styles" tab and check "Modal frame"
drag to size the static control until see a line you like.

Not yet satisfied? Play yourself with styles/extended styles.

buffal
October 3rd, 2005, 05:32 AM
Thank you kkez and ovidiucucu. That is what I am looking for,