OpenDialog - Como abrir a janela do windows para selec...?
Moderador: Moderadores
- Daiane
- Usuário Nível 3

- Mensagens: 122
- Registrado em: 28 Out 2014 16:19
- Localização: Feira de Santana - BA
OpenDialog - Como abrir a janela do windows para selec...?
Pessoal,como faço para abrir aquela janela do windows para selecionar um arquivo?
vou mandar um print para melhor entendimento
vou mandar um print para melhor entendimento
Editado pela última vez por Toledo em 16 Ago 2015 19:01, em um total de 1 vez.
Razão: O presente tópico foi movido da seção Harbour, uma vez que seu conteúdo não tem relação com os objetivos daquela seção, onde só podem constar dúvidas técnicas de programação diretamente relacionadas com o [x]Harbour.
Razão: O presente tópico foi movido da seção Harbour, uma vez que seu conteúdo não tem relação com os objetivos daquela seção, onde só podem constar dúvidas técnicas de programação diretamente relacionadas com o [x]Harbour.
XHb 1.2.1 + FW 12.05 + Pelles C IDE
"Eu adoraria mudar o mundo, mas não me deram o código-fonte."
"Eu adoraria mudar o mundo, mas não me deram o código-fonte."
-
Kapiaba
- Colaborador

- Mensagens: 1908
- Registrado em: 07 Dez 2012 16:14
- Localização: São Paulo
- Contato:
OpenDialog - Como abrir a janela do windows para selec...?
Código: Selecionar todos
#include 'fivewin.ch'
#define OFN_PATHMUSTEXIST 0x00000800
#define OFN_NOCHANGEDIR 0x00000008
#define OFN_ALLOWMULTISELECT 0x00000200
#define OFN_EXPLORER 0x00080000 // new look commdlg
#define OFN_LONGNAMES 0x00200000 // force long names for 3.x modules
#define OFN_ENABLESIZING 0x00800000
#define OFN_HIDEREADONLY 0x00000004 // Oculta a caixa de seleção Somente leitura.
#define OFN_NONETWORKBUTTON 0x20000 // Desabilita o botão [ REDE ] da Dlg
function aGetFiles( cMask, cTitle, nDefaultMask, cInitDir )
local cSelect, nAt, aFiles := {}
/*
local nFlags := nOr( OFN_PATHMUSTEXIST , OFN_NOCHANGEDIR , ;
OFN_ALLOWMULTISELECT , OFN_EXPLORER , ;
OFN_LONGNAMES, OFN_ALLOWMULTISELECT )
*/
local nFlags := nOr( OFN_PATHMUSTEXIST, OFN_NOCHANGEDIR, OFN_ALLOWMULTISELECT, ;
OFN_LONGNAMES, OFN_NONETWORKBUTTON )
SKINBUTTONS()
//cSelect := cGetFile( cMask, cTitle, nDefaultMask, cInitDir, .f., .t., nFlags )
cSelect := cGetFile( "Bitmap (*.bmp)| *.bmp|"+ ;
"DIB (*.dib)| *.dib|" + ;
"PCX (*.pcx)| *.pcx|" + ;
"JPEG (*.jpg)| *.jpg|" + ;
"GIF (*.gif)| *.gif|" + ;
"TARGA (*.tga)| *.tga|" + ;
"RLE (*.rle)| *.rle|" + ;
"Todos os Arquivos (*.*)|*.*|" ;
,"Selecione a Foto Desejada",1,,.F.,, nFlags )
cSelect := Left( cSelect, At( Chr( 0 ) + Chr( 0 ), cSelect ) - 1 )
if ! Empty( cSelect )
cSelect := StrTran( cSelect, Chr( 0 ), "," )
aFiles := hb_aTokens( cSelect, "," )
if Len( aFiles ) > 1
for nAt := 2 TO Len( aFiles )
aFiles[ nAt ] := aFiles[ 1 ] + "\" + aFiles[ nAt ]
next nAt
ADel( aFiles, 1 )
ASize( aFiles, Len( aFiles ) - 1 )
endif
endif
return aFiles
OpenDialog - Como abrir a janela do windows para selec...?
Inclua este código no seu aplicativo.
D:\TEMP_FIN = pasta inicial para procura, informe a que desejar, ou deixe em branco para iniciar a partir do da pasta raiz do so.
cFolder:=HBG_GETFOLDER(Nil,"Informe o destino (Pasta padrão: D:\TEMP_FIN)",Nil,Nil,"D:\TEMP_FIN")
D:\TEMP_FIN = pasta inicial para procura, informe a que desejar, ou deixe em branco para iniciar a partir do da pasta raiz do so.
cFolder:=HBG_GETFOLDER(Nil,"Informe o destino (Pasta padrão: D:\TEMP_FIN)",Nil,Nil,"D:\TEMP_FIN")
Código: Selecionar todos
#pragma BEGINDUMP
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include "hbapi.h"
#include <commdlg.h>
#include <shlobj.h>
#include <commctrl.h>
#include "hbapi.h"
HB_FUNC ( HBG_PUTFILE )
{
OPENFILENAME ofn;
char buffer[512];
int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER ;
if ( hb_parl(4) )
{
flags = flags | OFN_NOCHANGEDIR ;
}
strcpy( buffer, "" );
memset( (void*) &ofn, 0, sizeof( OPENFILENAME ) );
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = GetActiveWindow() ;
ofn.lpstrFilter = hb_parc(1) ;
ofn.lpstrFile = buffer;
ofn.nMaxFile = 512;
ofn.lpstrInitialDir = hb_parc(3);
ofn.nFilterIndex = hb_parni(5);
ofn.lpstrTitle = hb_parc(2) ;
ofn.Flags = flags;
if( GetSaveFileName( &ofn ) )
{
hb_stornl(ofn.nFilterIndex, 5 );
hb_retc( ofn.lpstrFile );
}
else
{
hb_retc( "" );
}
}
int CALLBACK BrowseCallbackProc( HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData )
{
TCHAR szPath[ MAX_PATH ];
switch( uMsg )
{
case BFFM_INITIALIZED: if( lpData )
SendMessage( hWnd, BFFM_SETSELECTION, TRUE, lpData );
break;
case BFFM_SELCHANGED: SHGetPathFromIDList( ( LPITEMIDLIST ) lParam, szPath ); SendMessage( hWnd, BFFM_SETSTATUSTEXT, 0, ( LPARAM ) szPath );
}
return 0;
}
HB_FUNC( HBG_GETFOLDER ) // Syntax: C_BROWSEFORFOLDER([<hWnd>],[<cTitle>],[<nFlags>],[<nFolderType>],[<cInitPath>])
{
HWND hWnd = HB_ISNIL( 1 ) ? GetActiveWindow() : ( HWND ) hb_parnl( 1 );
BROWSEINFO BrowseInfo;
char * lpBuffer = ( char * ) hb_xgrab( MAX_PATH + 1 );
LPITEMIDLIST pidlBrowse;
SHGetSpecialFolderLocation( hWnd, HB_ISNIL( 4 ) ? CSIDL_DRIVES : hb_parni( 4 ), &pidlBrowse );
BrowseInfo.hwndOwner = hWnd;
BrowseInfo.pidlRoot = pidlBrowse;
BrowseInfo.pszDisplayName = lpBuffer;
BrowseInfo.lpszTitle = HB_ISNIL( 2 ) ? "Select a Folder" : hb_parc( 2 );
BrowseInfo.ulFlags = HB_ISCHAR( 5 ) ? BIF_STATUSTEXT : hb_parni( 3 );
BrowseInfo.lpfn = HB_ISCHAR( 5 ) ? BrowseCallbackProc : NULL;
BrowseInfo.lParam = HB_ISCHAR( 5 ) ? ( LPARAM ) ( char * ) hb_parc( 5 ) : 0;
BrowseInfo.iImage = 0;
pidlBrowse = SHBrowseForFolder( &BrowseInfo );
if( pidlBrowse )
{
SHGetPathFromIDList( pidlBrowse, lpBuffer );
hb_retc( lpBuffer );
}
else
hb_retc( "" );
hb_xfree( lpBuffer );
}
#pragma ENDDUMP
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
OpenDialog - Como abrir a janela do windows para selec...?
A função do colega funcionou certinho com harbour 3.2. Asimões, sabe se o harbour 3.2 tem essa função nativamente?asimoes escreveu:Inclua este código no seu aplicativo
Ate+
Clipper 5.2e / Blinker 5.1 / Harbour 3.2 / GTwvg
OpenDialog - Como abrir a janela do windows para selec...?
Andril,
Essa função foi copiada da minigui.
O harbour não tem essa função no seu projeto.
Essa função foi copiada da minigui.
O harbour não tem essa função no seu projeto.
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
OpenDialog - Como abrir a janela do windows para selec...?
Seleção de arquivos:
* Seleção multipla
a := Getfile ( { {'All Files','*.*'} } , 'Open File(s)' , HB_DirBase() , .t. , .t. )
msginfo(VALTOPRG(a))
* Seleção simples
cFile:=Getfile ( , 'Open a File' , , , .t. )
msginfo(cFile)
Função GetFile
* Seleção multipla
a := Getfile ( { {'All Files','*.*'} } , 'Open File(s)' , HB_DirBase() , .t. , .t. )
msginfo(VALTOPRG(a))
* Seleção simples
cFile:=Getfile ( , 'Open a File' , , , .t. )
msginfo(cFile)
Função GetFile
Código: Selecionar todos
*-----------------------------------------------------------------------------*
FUNCTION GetFile( aFilter, title, cIniFolder, multiselect, lNoChangeCurDir, nFilterIndex )
*-----------------------------------------------------------------------------*
LOCAL fileslist:={}
LOCAL cFilter:=""
LOCAL n, files
hb_default( @multiselect, .F. )
hb_default( @nFilterIndex, 1 )
IF HB_ISARRAY( aFilter )
AEval( aFilter, { | x | cFilter += x[1] + Chr( 0 ) + x[2] + Chr( 0 ) } )
cFilter += Chr( 0 )
ENDIF
files := HBG_SelectFile( cFilter, title, cIniFolder, multiselect, lNoChangeCurDir, nFilterIndex )
IF multiselect
IF Len( files ) > 0
IF ValType( files ) == "A"
FOR n := 1 TO Len( files )
IF At( "\\", files[n] ) > 0 .AND. Left( files[n], 2 ) != "\\"
files[n] := StrTran( files[n] , "\\", "\" )
ENDIF
NEXT
fileslist := AClone( files )
ELSE
AAdd( fileslist, files )
ENDIF
ENDIF
ELSE
fileslist := files
ENDIF
RETURN ( fileslist )
Código: Selecionar todos
#pragma BEGINDUMP
#define _WIN32_WINNT 0x0400
#include <windows.h>
#include "hbapi.h"
#include <commdlg.h>
#include <shlobj.h>
#include <commctrl.h>
#include "hbapi.h"
#define HB_PARNL( n, x ) hb_parvnl( n, x )
#define HB_STORC( n, x, y ) hb_storvc( n, x, y )
#define HB_STORL( n, x, y ) hb_storvl( n, x, y )
#define HB_STORNI( n, x, y ) hb_storvni( n, x, y )
#define HB_STORNL( n, x, y ) hb_storvnl( n, x, y )
HB_FUNC ( HBG_PUTFILE )
{
OPENFILENAME ofn;
char buffer[512];
int flags = OFN_FILEMUSTEXIST | OFN_EXPLORER ;
if ( hb_parl(4) )
{
flags = flags | OFN_NOCHANGEDIR ;
}
strcpy( buffer, "" );
memset( (void*) &ofn, 0, sizeof( OPENFILENAME ) );
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = GetActiveWindow() ;
ofn.lpstrFilter = hb_parc(1) ;
ofn.lpstrFile = buffer;
ofn.nMaxFile = 512;
ofn.lpstrInitialDir = hb_parc(3);
ofn.nFilterIndex = hb_parni(5);
ofn.lpstrTitle = hb_parc(2) ;
ofn.Flags = flags;
if( GetSaveFileName( &ofn ) )
{
hb_stornl(ofn.nFilterIndex, 5 );
hb_retc( ofn.lpstrFile );
}
else
{
hb_retc( "" );
}
}
int CALLBACK BrowseCallbackProc( HWND hWnd, UINT uMsg, LPARAM lParam, LPARAM lpData )
{
TCHAR szPath[ MAX_PATH ];
switch( uMsg )
{
case BFFM_INITIALIZED: if( lpData )
SendMessage( hWnd, BFFM_SETSELECTION, TRUE, lpData );
SetWindowText( hWnd , lpData );
//SendMessage( hWnd, WM_SETTEXT, 0, "Teste" );
break;
case BFFM_SELCHANGED: SHGetPathFromIDList( ( LPITEMIDLIST ) lParam, szPath ); SendMessage( hWnd, BFFM_SETSTATUSTEXT, 0, ( LPARAM ) szPath );
}
return 0;
}
HB_FUNC( HBG_GETFOLDER ) // Syntax: C_BROWSEFORFOLDER([<hWnd>],[<cTitle>],[<nFlags>],[<nFolderType>],[<cInitPath>])
{
HWND hWnd = HB_ISNIL( 1 ) ? GetActiveWindow() : ( HWND ) hb_parnl( 1 );
BROWSEINFO BrowseInfo;
char * lpBuffer = ( char * ) hb_xgrab( MAX_PATH + 1 );
LPITEMIDLIST pidlBrowse;
SHGetSpecialFolderLocation( hWnd, HB_ISNIL( 4 ) ? CSIDL_DRIVES : hb_parni( 4 ), &pidlBrowse );
BrowseInfo.hwndOwner = hWnd;
BrowseInfo.pidlRoot = pidlBrowse;
BrowseInfo.pszDisplayName = lpBuffer;
BrowseInfo.lpszTitle = HB_ISNIL( 2 ) ? "Select a Folder" : hb_parc( 2 );
BrowseInfo.ulFlags = HB_ISCHAR( 5 ) ? BIF_STATUSTEXT : hb_parni( 3 );
BrowseInfo.lpfn = HB_ISCHAR( 5 ) ? BrowseCallbackProc : NULL;
BrowseInfo.lParam = HB_ISCHAR( 5 ) ? ( LPARAM ) ( char * ) hb_parc( 5 ) : 0;
BrowseInfo.lParam = hb_parc( 2 );
BrowseInfo.iImage = 0;
pidlBrowse = SHBrowseForFolder( &BrowseInfo );
SendMessage( hWnd, WM_SETTEXT, 0, "Teste" );
if( pidlBrowse )
{
SHGetPathFromIDList( pidlBrowse, lpBuffer );
SendMessage( hWnd, WM_SETTEXT, 0, "Teste" );
//SetWindowText( hWnd , "" );
//SetWindowText(GetDlgItem(hWnd, IDC_FILE), "Teste");
hb_retc( lpBuffer );
}
else
hb_retc( "" );
hb_xfree( lpBuffer );
}
HB_FUNC( HBG_SELECTFILE )
{
OPENFILENAME ofn;
char buffer[ 32768 ];
char cFullName[ 256 ][ 1024 ];
char cCurDir[ 512 ];
char cFileName[ 512 ];
int iFilterIndex = 1;
int iPosition = 0;
int iNumSelected = 0;
int n;
DWORD flags = OFN_FILEMUSTEXIST;
buffer[ 0 ] = 0;
if( hb_parl( 4 ) )
flags = flags | OFN_ALLOWMULTISELECT | OFN_EXPLORER;
if( hb_parl( 5 ) )
flags = flags | OFN_NOCHANGEDIR;
if( hb_parni( 6 ) )
iFilterIndex = hb_parni( 6 );
memset( ( void * ) &ofn, 0, sizeof( OPENFILENAME ) );
ofn.lStructSize = sizeof( ofn );
ofn.hwndOwner = GetActiveWindow();
ofn.lpstrFilter = hb_parc( 1 );
ofn.nFilterIndex = ( DWORD ) iFilterIndex;
ofn.lpstrFile = buffer;
ofn.nMaxFile = sizeof( buffer );
ofn.lpstrInitialDir = hb_parc( 3 );
ofn.lpstrTitle = hb_parc( 2 );
ofn.nMaxFileTitle = 512;
ofn.Flags = flags;
if( GetOpenFileName( &ofn ) )
{
if( ofn.nFileExtension != 0 )
hb_retc( ofn.lpstrFile );
else
{
wsprintf( cCurDir, "%s", &buffer[ iPosition ] );
iPosition = iPosition + strlen( cCurDir ) + 1;
do
{
iNumSelected++;
wsprintf( cFileName, "%s", &buffer[ iPosition ] );
iPosition = iPosition + strlen( cFileName ) + 1;
wsprintf( cFullName[ iNumSelected ], "%s\\%s", cCurDir, cFileName );
}
while( ( strlen( cFileName ) != 0 ) && ( iNumSelected <= 255 ) );
if( iNumSelected > 1 )
{
hb_reta( iNumSelected - 1 );
for( n = 1; n < iNumSelected; n++ )
HB_STORC( cFullName[ n ], -1, n );
}
else
hb_retc( &buffer[ 0 ] );
}
}
else
hb_retc( "" );
}
// JK JP
HB_FUNC( C_PUTFILE )
{
OPENFILENAME ofn;
char buffer[ 512 ];
char cExt[ 4 ];
int iFilterIndex = 1;
DWORD flags = OFN_FILEMUSTEXIST | OFN_EXPLORER;
if( hb_parl( 4 ) )
flags = flags | OFN_NOCHANGEDIR;
if( strlen( hb_parc( 5 ) ) != 0 )
strcpy( buffer, hb_parc( 5 ) );
else
strcpy( buffer, "" );
strcpy( cExt, "" );
if( hb_parni( 6 ) )
iFilterIndex = hb_parni( 6 );
memset( ( void * ) &ofn, 0, sizeof( OPENFILENAME ) );
ofn.lStructSize = sizeof( ofn );
ofn.hwndOwner = GetActiveWindow();
ofn.lpstrFilter = hb_parc( 1 );
ofn.nFilterIndex = ( DWORD ) iFilterIndex;
ofn.lpstrFile = buffer;
ofn.nMaxFile = 512;
ofn.lpstrInitialDir = hb_parc( 3 );
ofn.lpstrTitle = hb_parc( 2 );
ofn.Flags = flags;
ofn.lpstrDefExt = cExt;
if( GetSaveFileName( &ofn ) )
{
if( ofn.nFileExtension == 0 )
{
ofn.lpstrFile = strcat( ofn.lpstrFile, "." );
ofn.lpstrFile = strcat( ofn.lpstrFile, ofn.lpstrDefExt );
}
if( HB_ISBYREF( 6 ) )
hb_storni( ( int ) ofn.nFilterIndex, 6 );
hb_retc( ofn.lpstrFile );
}
else
hb_retc( "" );
}
#pragma ENDDUMP
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
- Daiane
- Usuário Nível 3

- Mensagens: 122
- Registrado em: 28 Out 2014 16:19
- Localização: Feira de Santana - BA
OpenDialog - Como abrir a janela do windows para selec...?
Obrigada a todos pela ajuda.
consegui fazer da forma que o Kapiaba mandou
consegui fazer da forma que o Kapiaba mandou
XHb 1.2.1 + FW 12.05 + Pelles C IDE
"Eu adoraria mudar o mundo, mas não me deram o código-fonte."
"Eu adoraria mudar o mundo, mas não me deram o código-fonte."
-
Kapiaba
- Colaborador

- Mensagens: 1908
- Registrado em: 07 Dez 2012 16:14
- Localização: São Paulo
- Contato:
OpenDialog - Como abrir a janela do windows para selec...?
Parabéns!! Mas poste suas dúvidas na seção FiveWin, fica mais fácil para ajudá-la, senão dá a impressão que você está usando outra ferramenta que não seja FiveWin. Você usa FiveWin for xHarbour. Abs.
OpenDialog - Como abrir a janela do windows para selec...?
Bom dia, pessoal.
Também desejo "ABRIR JANELA DO WINDOWS PARA SELECIONAR ARQUIVOS" em Xharbour e nesse tópico tem várias dicas, só que em HARBOUR
Alguém poderia me passar uma função que faça o mesmo em Xharbour ??
Grato
Também desejo "ABRIR JANELA DO WINDOWS PARA SELECIONAR ARQUIVOS" em Xharbour e nesse tópico tem várias dicas, só que em HARBOUR
Alguém poderia me passar uma função que faça o mesmo em Xharbour ??
Grato
lugab
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
OpenDialog - Como abrir a janela do windows para selec...?
Olhem com atenção todos os exemplos anteriores.
Agora vejam quando existe uma função "wrapper" padronizada.
É isso que chamo de padronizar.
Não apenas a questão do nome ou localização, mas usar diretamente no fonte Harbour.
Tudo seria melhor se fosse padronizado.
Só fazer igual no xHarbour, e usar nas LIBs.... Todo mundo ganharia com isso.
o resultado (não sei se o ícone igual aplicativo é normal)
Agora vejam quando existe uma função "wrapper" padronizada.
Código: Selecionar todos
cFileExcel := win_GetOpenFileName(, "Arquivo a importar", "importa\", "XLS", "*.XLS", 1 )
Não apenas a questão do nome ou localização, mas usar diretamente no fonte Harbour.
Tudo seria melhor se fosse padronizado.
Só fazer igual no xHarbour, e usar nas LIBs.... Todo mundo ganharia com isso.
o resultado (não sei se o ícone igual aplicativo é normal)
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
OpenDialog - Como abrir a janela do windows para selec...?
Quintas, eu sei que se trata de Fivewin, só quis aproveitar a temática e pedir o mesmo código para Xharbour,
como outros precisavam e pediram em harbour...
Eu testei todos os códigos antes de concluir q não funcionam pra Xharbour e inclusive testei esse que vc postou e
que também acusou erros na compilação em Xharbour 1.0.0
É q nenhuma dessas postagens anteriores apresenta a função
como outros precisavam e pediram em harbour...
Eu testei todos os códigos antes de concluir q não funcionam pra Xharbour e inclusive testei esse que vc postou e
que também acusou erros na compilação em Xharbour 1.0.0
É q nenhuma dessas postagens anteriores apresenta a função
Código: Selecionar todos
win_GetOpenFileName() lugab
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
OpenDialog - Como abrir a janela do windows para selec...?
Pensei que postaram rotinas pra xHarbour.
Então a falta de padronização está pior do que eu pensava.
A função que postei faz parte do HARBOUR.
Se as rotinas acima NÃO SÃO pra XHarbour, não sei pra que servem.
Então a falta de padronização está pior do que eu pensava.
A função que postei faz parte do HARBOUR.
Se as rotinas acima NÃO SÃO pra XHarbour, não sei pra que servem.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
OpenDialog - Como abrir a janela do windows para selec...?
Veja... fonte completo, com tudo:
Por isso pensei que as rotinas fossem pra xHarbour.
Infelizmente não mexo com xHarbour e não posso ajudar.
Mas alguém deve saber.
Código: Selecionar todos
PROCEDURE Main
LOCAL cFileExcel
cFileExcel := win_GetOpenFileName(, "Arquivo a importar", "importa\", "XLS", "*.XLS", 1 )
? cFileExcel
RETURN
Por isso pensei que as rotinas fossem pra xHarbour.
Infelizmente não mexo com xHarbour e não posso ajudar.
Mas alguém deve saber.
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- JoséQuintas
- Administrador

- Mensagens: 20267
- Registrado em: 26 Fev 2007 11:59
- Localização: São Paulo-SP
OpenDialog - Como abrir a janela do windows para selec...?
Infelizmente faltou mencionar:
A função do colega funcionou certinho com harbour 3.2. Asimões, sabe se o harbour 3.2 tem essa função nativamente?Essa função foi copiada da minigui.
O harbour não tem essa função no seu projeto.
d:\>hbmk2 -find openfile
gtwvg.hbc (installed):
wvt_GetOpenFileName()
hbwin.hbc (installed):
win_GetOpenFileName()
xhb.hbc (installed):
NetOpenFiles()
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"
https://github.com/JoseQuintas/
- deividdjs
- Usuário Nível 3

- Mensagens: 377
- Registrado em: 19 Set 2006 09:39
- Localização: Foz do Iguaçu / Pr
OpenDialog - Como abrir a janela do windows para selec...?
Boa tarde Prezados ...
Estou utilizando o exemplo dos arquivos para selecionar arquivos .. ficou show !! compila e funciona perfeito, porém dá um solicitação de "WARNINGS" na ultima linha e não entendi porque .. alguem já passou por isso ??
é na ultima linha .. não tem nada aí !!
"W8080 PrtToPrt64 is declared but never used"
estou usando HARBOUR 3.2 + BCC582 + GTWVG
Abraço!
Estou utilizando o exemplo dos arquivos para selecionar arquivos .. ficou show !! compila e funciona perfeito, porém dá um solicitação de "WARNINGS" na ultima linha e não entendi porque .. alguem já passou por isso ??
é na ultima linha .. não tem nada aí !!
"W8080 PrtToPrt64 is declared but never used"
estou usando HARBOUR 3.2 + BCC582 + GTWVG
Abraço!
Windows 11 + Harbour 3.2 + MINGW64 gcc 14.1.0 + Visual Lib + GTWVG + LETODBF WINDOWNS/LINUX
