• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

qrencode-win32 / qrcodelib.dll (GNU License)

Started by Roy Chan, November 08, 2011, 08:06:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

You have to use the handle of the bitmap, not the handle of the dialog.

Roy Chan

Dear  José ,

I didn't create any bitmap for the graphic control which show the qrcode pattern. How can I create a bitmap and copy the existing qrcode pattern to the bitmap ? I have search the PowerBASIC document and FireFly forum. I don't know which command is for this purpose.
Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5

José Roca

I don't know anything about qrcode. I never have used it.

Roy Chan

#18
Dear José


I use "CreateCompatibleBitmap" to create a bitmap.  I have checked that hDC and hBitmap is not empty. But the application crashed at the last line.


Global hDC As Dword
Global hBitmap As Dword

Graphic Get DC To hdc
hBitmap=CreateCompatibleBitmap(hdc,glngqrcodewidth,glngqrcodeheight)
ztrace Str$(hdc)& "/" & Str$(hbitmap)
         
Clipboard Reset
Clipboard Set Bitmap hbitmap

Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5

José Roca

You can't mix SDK and DDT. Handles returned by CreateBitmap or CreateCompatibleBitmap aren't compatible with DDT's Graphic or Clipboard statements.

What I mean is that I don't know how to copy the qrcode pattern to the bitmap because I never have used qrencode.

You must decide if you want to use SDK (Windows API) or DDT. You can't mix them.

Roy Chan

 Dear José         

Thank you for your reply everytime.  I am a newbie of PowerBASIC. So I confused with DDT and SDK. But finally I found the solution to copy the contents of graphic control into  clipboard.



Local hGraphic As Dword

Clipboard Reset
Control Handle   hWndGraphicDlg,IDC_FRMMAIN_CUSTOMCONTROL1 To  hGraphic                   
Clipboard Set Bitmap hGraphic

Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5

Patrice Terrier

#21
WM_PRINT (PrintWindow)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Roy Chan

#22
I can not overcome the Unicode problem. So you can not input the Unicode character.  I will share the soure code to everyone 3 months later.

The qrcode encode library is developed by :
qrcodelib.dll  -   Kentaro Fukuchi <kentaro@fukuchi.org>





Download Address :
https://docs.google.com/leaf?id=0B_EW83tN7qz-NjUzNGE2OGYtNTA3Ni00MTZkLWI1YzctNmVhMzk1MTQzZmI3&sort=name&layout=list&num=50
Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5