by Antonio Linares » Mon Jul 11, 2011 8:18 am
http://koti.mbnet.fi/vaultec/files/miscellaneous/undocw95/common.htmlcomdlg32.prg
- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
MsgInfo( PickIconDlg() )
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
BOOL WINAPI PickIconDlg(
HWND hwndOwner,
LPSTR lpstrFile,
DWORD nMaxFile,
LPDWORD lpdwIconIndex );
HB_FUNC( PICKICONDLG )
{
DWORD dwIconIndex = 0;
char buffer[ 256 ];
memset( buffer, 0, 256 );
if( PickIconDlg( ( HWND ) hb_parnl( 1 ), buffer, 256, &dwIconIndex ) )
hb_retnl( dwIconIndex );
}
#pragma ENDDUMP
-
Antonio Linares
- Site Admin
-
- Posts: 42084
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
-
by Antonio Linares » Mon Jul 11, 2011 8:32 am
http://www.codeproject.com/KB/shell/runfiledlg.aspx- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
// MsgInfo( PickIconDlg() )
RunFileDlg()
return nil
#pragma BEGINDUMP
#include <windows.h>
#include <hbapi.h>
BOOL WINAPI PickIconDlg(
HWND hwndOwner,
LPSTR lpstrFile,
DWORD nMaxFile,
LPDWORD lpdwIconIndex );
typedef void WINAPI ( * PRUNFILEDLG ) (
HWND hwndOwner,
HICON hIcon,
LPCSTR lpstrDirectory,
LPCSTR lpstrTitle,
LPCSTR lpstrDescription,
UINT uFlags );
HB_FUNC( PICKICONDLG )
{
DWORD dwIconIndex = 0;
char buffer[ 256 ];
memset( buffer, 0, 256 );
if( PickIconDlg( ( HWND ) hb_parnl( 1 ), buffer, 256, &dwIconIndex ) )
hb_retnl( dwIconIndex );
}
HB_FUNC( RUNFILEDLG )
{
FARPROC pRunFileDlg = GetProcAddress( GetModuleHandle( "shell32.dll" ), ( LPCSTR ) 61 );
PRUNFILEDLG p = ( PRUNFILEDLG ) pRunFileDlg;
p( ( HWND ) hb_parnl( 1 ), ( HICON ) hb_parnl( 2 ), hb_parc( 3 ), hb_parc( 4 ), hb_parc( 5 ), hb_parnl( 6 ) );
}
#pragma ENDDUMP
-
Antonio Linares
- Site Admin
-
- Posts: 42084
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
-
Return to FiveWin for Harbour/xHarbour
Who is online
Users browsing this forum: No registered users and 81 guests