window styles

Post Reply
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

window styles

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Natter,

You may use the clause STYLE:

DEFINE WINDOW oWnd STYLE nOr( WS_OVERLAPPEDWINDOW, WS_EX_CLIENTEDGE )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post 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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post 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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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.
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post by Natter »

All right. How I can compiling Winuser.h together my programm.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Put this at the top of your PRG.

#include "winuser.h"
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post by Natter »

#include "winuser.h" - it's not work. Created file My.h with WS_EX_ variables. That is work !

Thank all !
User avatar
fraxzi
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines
Contact:

Post by fraxzi »

Natter,


I used this

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

..
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post by Natter »

Thank, Fraxzi !
I work with external applications and change styles their different windows interactive.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post 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.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post 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
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Post 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
Post Reply