FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
¿como CrearBitmap ? codigo de delphi a C++ Builder
hola
tengo este codigo delphi que crea un bitmap. es una funcion que regresa un bitmap
Al convertirla a C++ Builder me da error. Código PHP:
y que GetDC(0) es una macro __in_opt HWND hWnd al compilar me sale este error [bcc32 Error] FrmMainU.cpp(65): E2034 Cannot convert 'HDC__ *' to 'unsigned int' Full parser context FrmMainU.cpp(47): parsing: TBitmap _fastcall TFrmMainF::GetBitmapImage(UnicodeString,int,int,int) que ando haciendo mal. ? ¿como lo puedo solucionar ? gracias. |
#2
|
|||
|
|||
avanze algo en los tipos
y ahora me da error de que [bcc32 Error] FrmMainU.cpp(74): E2108 Improper use of typedef 'DWORD' BitBlt(Result->Canvas->Handle, 0,0, Result->Width, Result->Height, DC, 0,0 SRCCOPY); no se por que no me acepta SRCCOPY Código PHP:
|
#3
|
||||
|
||||
Te falta una coma en la siguiente línea que provoca precisamente ese error:
Código:
BitBlt(Result->Canvas->Handle, 0,0, Result->Width, Result->Height, DC, 0,0 SRCCOPY); ^ | Lo digo por la línea donde veo que haces algo "raro" dentro de la función con "String". String es un typedef que según si en las propiedades del proyecto tienes "TCHAR" mapeado a "char" o a "wchar_t" se declara como AnsiString o UnicodeString respectivamente. De todas formas no debería ser necesario en teoría si en las opciones del proyecto esta mapeado para trabajar con o sin Unicode. La salida de la función la tienes como "TBitmap" y debería ser "Graphics::TBitmap*", y te falta añadir un "return Result;" al final de la función. Aunque con lo de la coma supongo que ya te habrías dado cuenta. Que una coma o un punto y coma puede volver loco a cualquiera cuando lleva muchas horas.. ;-) Última edición por _Leo fecha: 16-07-2017 a las 01:01:11. |
#4
|
|||
|
|||
Muchisimas Gracias _Leo
no vi que faltara la , y lo del resto tambien me ayuda mucho. probe el codigo y si funciona,, : Que dicha. Buen dia. ;D Última edición por JXJ fecha: 16-07-2017 a las 21:30:52. |
#5
|
|||
|
|||
Muchisimas Gracias _Leo
no vi que faltara la , y lo del resto tambien me ayuda mucho. probe el codigo y si funciona,, : Que dicha. la cosa rara con los ansi string , es por que es la unica forma que encontre de pasar el unicodestring del edit a la funcion de la libreria que solo acepta ansi o de tipo char* , no soy bueno en c++ por eso es que hize esa cosa rara aparte de que la lib qricol se compila con c++ de visual studio. y la dll el autor de qrcol la da con un wrapper para delphi. la recomendacion es usarlo con versiones delphi que soportan unicode y la png y zlib y jpeg, las compile con c++ builder xe6 Buen dia. ;D header Código PHP:
Código PHP:
Código PHP:
|
Herramientas | Buscar en Tema |
Desplegado | |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Este código Delphi como sería en C++ Builder | pepe_baile | C++ Builder | 5 | 22-02-2017 17:47:06 |
pasar codigo de delphi a c++ Builder | rxaxx9 | C++ Builder | 2 | 13-05-2012 06:27:17 |
codigo en delphi a c++ builder | zidfrid | C++ Builder | 4 | 09-07-2008 14:34:29 |
Convertir codigo Delphi a Builder | _Willa | C++ Builder | 3 | 15-02-2008 11:37:10 |
Cambiando el codigo de delphi a builder... | paco_galo | C++ Builder | 5 | 03-12-2007 22:14:54 |
|