2012-11-13 13:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* harbour/extras/gtwvw/gtwvwd.c
    ! eliminated hb_wcntomb()
This commit is contained in:
Przemyslaw Czerpak
2012-11-13 12:03:26 +00:00
parent 3d4e4f5baa
commit 90d2236c45
2 changed files with 11 additions and 18 deletions

View File

@@ -16,6 +16,10 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-11-13 13:03 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* harbour/extras/gtwvw/gtwvwd.c
! eliminated hb_wcntomb()
2012-11-13 12:34 UTC+0100 Viktor Szakats (harbour syenar.net)
* contrib/hbwin/win_reg.prg
! fixed WIN_REGGET() for WIN_REG_DWORD_BIG_ENDIAN and

View File

@@ -212,7 +212,7 @@ static LRESULT CALLBACK hb_gt_wvwWndProc( HWND hWnd, UINT message, WPARAM wParam
static BOOL hb_gt_wvwAllocSpBuffer( WIN_DATA * pWindowData, USHORT col, USHORT row );
static void hb_gt_wvwSetWindowTitle( UINT usWinNum, LPCTSTR title );
static BOOL hb_gt_wvw_GetWindowTitle( UINT usWinNum, char ** title );
static PHB_ITEM hb_gt_wvw_GetWindowTitle( UINT usWinNum, PHB_ITEM pItem );
static HICON hb_gt_wvwSetWindowIcon( UINT usWinNum, int icon, const char * lpIconName );
static HICON hb_gt_wvwSetWindowIconFromFile( UINT usWinNum, LPCTSTR icon );
@@ -1597,11 +1597,7 @@ static BOOL hb_gt_wvw_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
case HB_GTI_WINTITLE:
{
char * szTitle = NULL;
if( hb_gt_wvw_GetWindowTitle( s_pWvwData->s_usCurWindow, &szTitle ) )
pInfo->pResult = hb_itemPutCPtr( pInfo->pResult, szTitle );
else
pInfo->pResult = hb_itemPutC( pInfo->pResult, NULL );
pInfo->pResult = hb_gt_wvw_GetWindowTitle( s_pWvwData->s_usCurWindow, pInfo->pResult );
if( hb_itemType( pInfo->pNewVal ) & HB_IT_STRING )
{
void * hWindowTitle;
@@ -6221,24 +6217,17 @@ static void hb_gt_wvwSetWindowTitle( UINT usWinNum, LPCSTR title )
SetWindowText( s_pWvwData->s_pWindows[ usWinNum ]->hWnd, title );
}
static BOOL hb_gt_wvw_GetWindowTitle( UINT usWinNum, char ** title )
static PHB_ITEM hb_gt_wvw_GetWindowTitle( UINT usWinNum, PHB_ITEM pItem )
{
TCHAR buffer[ WVW_MAX_TITLE_SIZE ];
int iResult;
iResult = GetWindowText( s_pWvwData->s_pWindows[ usWinNum ]->hWnd, buffer, WVW_MAX_TITLE_SIZE );
buffer[ HB_SIZEOFARRAY( buffer ) - 1 ] = TEXT( '\0' );
if( iResult > 0 )
{
#ifdef UNICODE
*title = hb_wcntomb( buffer, iResult );
#else
*title = hb_strndup( buffer, iResult );
#endif
return TRUE;
}
*title = NULL;
return FALSE;
return HB_ITEMPUTSTR( pItem, buffer );
else
return hb_itemPutC( pItem, NULL );
}