Page 1 of 1

window styles

Posted: Mon Jun 16, 2008 6:19 pm
by Natter
Hi all !
I want set styles for window as WS_EX_CLIENTEDGE. I found this style in Borland\BCC55\Include\winuser.h
How I can use this file in my programm

Posted: Mon Jun 16, 2008 6:47 pm
by Antonio Linares
Natter,

You may use the clause STYLE:

DEFINE WINDOW oWnd STYLE nOr( WS_OVERLAPPEDWINDOW, WS_EX_CLIENTEDGE )

Posted: Mon Jun 16, 2008 6:52 pm
by Antonio Linares
Better do it this way, as it is an extended style:

#define GWL_EXSTYLE (-20)

SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE )

or

SetWindowLong( oWnd:hWnd, GWL_EXSTYLE, nOr( GetWindowLong( oWnd:hWnd, GWL_EXSTYLE ), WS_EX_CLIENTEDGE ) )

to keep the previous extended style too

Posted: Mon Jun 16, 2008 7:32 pm
by Natter
Thank, Antonio ! I do it. But I get error

"Variable WS_EX_CLIENTEDGE not found"

I must insert #INCLUDE *.ch to my program for description this WS_EX_
variables, but I found this in Winuser.h only

Posted: Mon Jun 16, 2008 8:22 pm
by James Bott
>I must insert #INCLUDE *.ch to my program for description this WS_EX_
variables, but I found this in Winuser.h only

You have found the proper solution. This manifest constant is a Windows API value.

Posted: Mon Jun 16, 2008 8:49 pm
by Natter
All right. How I can compiling Winuser.h together my programm.

Posted: Mon Jun 16, 2008 9:08 pm
by James Bott
Put this at the top of your PRG.

#include "winuser.h"

Posted: Mon Jun 16, 2008 10:34 pm
by Natter
#include "winuser.h" - it's not work. Created file My.h with WS_EX_ variables. That is work !

Thank all !

Posted: Tue Jun 17, 2008 4:42 am
by fraxzi
Natter,


I used this

...
ON INIT ownd:oWndClient:ClientEdge()

..

Posted: Tue Jun 17, 2008 9:23 am
by Natter
Thank, Fraxzi !
I work with external applications and change styles their different windows interactive.

Posted: Tue Jun 17, 2008 7:07 pm
by James Bott
Natter,

>#include "winuser.h" - it's not work.

This was probably because your PATH needed to be SET so the compiler could find it. Or, you could copy winuser.h to the application source directory.

James

Posted: Tue Jun 17, 2008 7:48 pm
by Natter
PATH is right
Well, I copy winuser.h to the application source directory

set #include "winuser.h" to my programm and compiled

see file Clip.log

winuser.h(11) Error E0024 Error in #pragma
winuser.h(38) Error F0028 Can't open #include file: 'stdarg.h'

and etc.

Posted: Tue Jun 17, 2008 8:10 pm
by James Bott
Natter,

OK, it seems like it also wants another file.

Try this instead. Instead of putting #include "winuser.h" do this:

#define WS_EX_CLIENTEDGE 512

That should solve it.

James

Posted: Tue Jun 17, 2008 8:37 pm
by Natter
Yes, I do it. You know the others value ?

#define WS_EX_ABSPOSITION ­
#define WS_EX_ACCEPTFILES
#define WS_EX_CLIENTEDGE 512
#define WS_EX_CONTEXTHELP
#define WS_EX_CONTROLPARENT
#define WS_EX_DLGMODALFRAME
#define WS_EX_LEFT
#define WS_EX_LEFTSCROLLBAR­
#define WS_EX_LTRREADING
#define WS_EX_MDICHILD
#define WS_EX_NOPARENTNOTIFY
#define WS_EX_RIGHT
#define WS_EX_RIGHTSCROLLBAR­
#define WS_EX_RTLREADING
#define WS_EX_SMCAPTION
#define WS_EX_STATICEDGE
#define WS_EX_TOOLWINDOW
#define WS_EX_TOPMOST
#define WS_EX_TRANSPARENT
#define WS_EX_WINDOWEDGE
#define WS_EX_OVERLAPPEDWINDOW
#define WS_EX_PALETTEWINDOW