height of taskbar
-
- Posts: 11
- Joined: Thu Nov 24, 2005 4:02 am
- Enrico Maria Giordano
- Posts: 8757
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: height of taskbar
Yes, but you have to subtract the value returned by the API SystemParametersInfo() with the argument SPI_GETWORKAREA.
EMG
EMG
-
- Posts: 11
- Joined: Thu Nov 24, 2005 4:02 am
- Enrico Maria Giordano
- Posts: 8757
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
This should be a working sample:
EMG
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
? GETTASKBARHEIGHT()
RETURN NIL
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
HB_FUNC( GETTASKBARHEIGHT )
{
RECT rct;
LONG nHDiff, nVDiff;
SystemParametersInfo( SPI_GETWORKAREA, 0, &rct, 0 );
nHDiff = GetSystemMetrics( SM_CXSCREEN ) - ( rct.right - rct.left );
nVDiff = GetSystemMetrics( SM_CYSCREEN ) - ( rct.bottom - rct.top );
if ( nHDiff > 0 )
hb_retnl( nHDiff );
else
hb_retnl( nVDiff );
}
#pragma ENDDUMP
EMG
-
- Posts: 11
- Joined: Thu Nov 24, 2005 4:02 am
Re:
Enrico,
This same function SystemParametersInfo() can be used to set the height of the top window border.. Am I right???
Do you think you can help me with it????? I am building a Touch Screen App, the default sysmenu is too small for that...
This same function SystemParametersInfo() can be used to set the height of the top window border.. Am I right???
Do you think you can help me with it????? I am building a Touch Screen App, the default sysmenu is too small for that...
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
- Enrico Maria Giordano
- Posts: 8757
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: Re:
Bayron wrote:This same function SystemParametersInfo() can be used to set the height of the top window border.. Am I right???
No, as far as I know.
EMG
Re: height of taskbar
Thnx Enrico...
I found a way of doing what I need, but I don't know anything about C
http://www.codeproject.com/KB/vista/AeroGlassLegacyWindowsApp.aspx

I found a way of doing what I need, but I don't know anything about C
http://www.codeproject.com/KB/vista/AeroGlassLegacyWindowsApp.aspx

=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Re: Re:
Enrico,

I think it can be done this way using c++
***********************************
from MSDN:
SPI_GETNONCLIENTMETRICS
0x0029
Retrieves the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a NONCLIENTMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(NONCLIENTMETRICS).
Public Domain Code from:
http://www.codeproject.com/KB/vista/VGGlassIntro.aspx

I think it can be done this way using c++
Code: Select all | Expand
if ( !IsThemeNull() )
GetThemeSysFont ( TMT_MSGBOXFONT, &lf );
else
{
NONCLIENTMETRICS ncm = { sizeof(NONCLIENTMETRICS) };
SystemParametersInfo ( SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncm, false );
lf = ncm.lfMessageFont;
}
***********************************
from MSDN:
SPI_GETNONCLIENTMETRICS
0x0029
Retrieves the metrics associated with the nonclient area of nonminimized windows. The pvParam parameter must point to a NONCLIENTMETRICS structure that receives the information. Set the cbSize member of this structure and the uiParam parameter to sizeof(NONCLIENTMETRICS).
Public Domain Code from:
http://www.codeproject.com/KB/vista/VGGlassIntro.aspx
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
- Enrico Maria Giordano
- Posts: 8757
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: height of taskbar
Yes, I was wrong: according to MSDN, SystemParametersInfo() can also be used to set the parameters but I never done it and can't help you, sorry.
EMG
EMG
Re: height of taskbar
Enrico,
Thanks a lot anyway; at least it's a start, maybe someone else may help...
I know that Laiton is working with FiveTechSoft to implement something like this to FiveWin....
Thanks a lot anyway; at least it's a start, maybe someone else may help...
I know that Laiton is working with FiveTechSoft to implement something like this to FiveWin....
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Re: height of taskbar
Can this be used???
http://stackoverflow.com/questions/2135068/how-to-set-the-size-of-the-non-client-area-of-a-win32-window-native
http://stackoverflow.com/questions/2135068/how-to-set-the-size-of-the-non-client-area-of-a-win32-window-native
=====>
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...
Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com
FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate
FiveWin, One line of code and it's done...