by carlosmora » Mon Jan 30, 2006 3:05 pm
Ya está, me respondo solito y de paso para poner el parche o incluirlo de alguna manera en la Fw:
[code]
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
#include <Windows.h>
#include <CommDlg.h>
#ifdef __FLAT__
#include <shlobj.h>
#endif
#define OFN_LONGNAMES 0x00200000
#define WF_WINNT 0x4000
#define LOGPIXELSX 88
BOOL IsWin95(VOID);
BOOL CALLBACK ComDlgHkFile(HWND hDlg, UINT uMsg,
WPARAM wParam, LPARAM lPar);
/*
static far BOOL b95Look = FALSE;
static far char SelDir[] = "Select directory";
static far char IniDir[] = ".\\";
static far char File[] = "__test__.tmp";
static far char Font[] = "MS Sans Serif";
static far int PixelX = 0;
static far char Driver[] = "DISPLAY";
*/
HB_FUNC( CGETDIR )
{
BROWSEINFO lpbi;
char lpstrTitle[ 512 ], lpstrDisplayName[ MAX_PATH ];
LPCITEMIDLIST lpIDList;
_bset( ( char * ) &lpbi, 0, sizeof( lpbi ) );
lpbi.hwndOwner = GetActiveWindow();
lpbi.lpszTitle = hb_parc( 1 );
lpbi.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN + BIF_USENEWUI;
lpIDList = SHBrowseForFolder( &lpbi);
if( lpIDList )
{
SHGetPathFromIDList( lpIDList, lpstrDisplayName );
hb_retc( lpstrDisplayName );
}
else
hb_retc( "" );
}
#pragma ENDDUMP[/code]
lo agregado es el BIF_USENEWUI. Una tontera, pero habia que buscar...
Saludos