window styles

window styles

Postby Natter » Mon Jun 16, 2008 6:19 pm

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

Postby Antonio Linares » Mon Jun 16, 2008 6:47 pm

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: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Antonio Linares » Mon Jun 16, 2008 6:52 pm

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

Postby Natter » Mon Jun 16, 2008 7:32 pm

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

Postby James Bott » Mon Jun 16, 2008 8:22 pm

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

Postby Natter » Mon Jun 16, 2008 8:49 pm

All right. How I can compiling Winuser.h together my programm.
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Postby James Bott » Mon Jun 16, 2008 9:08 pm

Put this at the top of your PRG.

#include "winuser.h"
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Natter » Mon Jun 16, 2008 10:34 pm

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

Thank all !
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Postby fraxzi » Tue Jun 17, 2008 4:42 am

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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Postby Natter » Tue Jun 17, 2008 9:23 am

Thank, Fraxzi !
I work with external applications and change styles their different windows interactive.
Natter
 
Posts: 1224
Joined: Mon May 14, 2007 9:49 am

Postby James Bott » Tue Jun 17, 2008 7:07 pm

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

Postby Natter » Tue Jun 17, 2008 7:48 pm

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

Postby James Bott » Tue Jun 17, 2008 8:10 pm

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

Postby Natter » Tue Jun 17, 2008 8:37 pm

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests