FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Listar bmps de uma dlls
Posts: 34
Joined: Thu Jun 22, 2006 02:33 PM
Listar bmps de uma dlls
Posted: Thu Aug 09, 2007 12:13 PM

Pessoal é possivel fazer uma lista dos Bmp de uma dll?´
se possivel posso imprimir esses bmps tambem?

Marcelo Michels Alexandre

xHarbour 1.1 + Ws + Xmate + FW8.01 + BCC 5.82
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Listar bmps de uma dlls
Posted: Thu Aug 09, 2007 01:31 PM

Marcelo,

Te refieres a hacerlo en tiempo de ejecución, desde tu aplicación ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 34
Joined: Thu Jun 22, 2006 02:33 PM
Listar bmps de uma dlls
Posted: Thu Aug 09, 2007 02:00 PM

Sim em tempo de execução.

Marcelo Michels Alexandre

xHarbour 1.1 + Ws + Xmate + FW8.01 + BCC 5.82
Posts: 205
Joined: Fri Oct 07, 2005 05:07 PM
Listar bmps de uma dlls
Posted: Thu Aug 09, 2007 05:24 PM
Voce pode experimentar :

........
aBitMaps := EnumResourcesBitMap()
................



#pragma BEGINDUMP

#include <WinTen.h>
#include <windows.h>
#include <CommDlg.h>
#include <ClipApi.h>

static far int nResourceIndex = 0;
static far BOOL bGetName = FALSE;

static int CALLBACK EnumResourceFunc( HANDLE hModule, // resource-module handle
                                      LPCTSTR lpszType,  // pointer to resource type
                                      LPTSTR lpszName,   // pointer to resource name
                                      LONG lParam  // application-defined parameter
                                      )
{
  #ifdef __XPP__
     void * params = _params;
  #endif

  ++nResourceIndex;
  if ( bGetName )
     _storc( lpszName, -1, nResourceIndex );
  return 1;
}

HB_FUNC( ENUMRESOURCESBITMAP )
{
  ENUMRESNAMEPROC  lpEnumResourceFunc = ( ENUMRESNAMEPROC  )
      MakeProcInstance( ( FARPROC ) EnumResourceFunc, GetInstance() );

  // Get the number of recurs bitmap
  nResourceIndex = 0;
  bGetName = FALSE;
  EnumResourceNames( NULL, RT_BITMAP, lpEnumResourceFunc, NULL );

  // Get the recurso bitmap names
  _reta( nResourceIndex );
  nResourceIndex = 0;
  bGetName = TRUE;
  EnumResourceNames( NULL, RT_BITMAP, lpEnumResourceFunc, NULL );

  FreeProcInstance( ( FARPROC ) EnumResourceFunc );
}

#pragma ENDDUMP
Saludos/regards

RenOmaS



skype: americo.balboa

Continue the discussion