Author Topic: qrencode-win32 / qrcodelib.dll (GNU License)  (Read 6474 times)

0 Members and 1 Guest are viewing this topic.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
  • Gender: Male
    • José Roca Software
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #15 on: November 22, 2011, 02:12:09 PM »
You have to use the handle of the bitmap, not the handle of the dialog.

Offline Roy Chan

  • Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #16 on: November 22, 2011, 02:24:35 PM »
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

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
  • Gender: Male
    • José Roca Software
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #17 on: November 22, 2011, 07:32:26 PM »
I don't know anything about qrcode. I never have used it.

Offline Roy Chan

  • Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #18 on: November 23, 2011, 05:08:38 AM »
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.

Code: [Select]
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

« Last Edit: November 23, 2011, 05:52:59 AM by Roy Chan »
Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 3051
  • Gender: Male
    • José Roca Software
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #19 on: November 23, 2011, 06:21:54 AM »
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.

Offline Roy Chan

  • Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #20 on: November 23, 2011, 06:38:41 AM »
 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.


Code: [Select]
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

Offline Patrice Terrier

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2211
  • Gender: Male
    • www.zapsolution.com
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #21 on: November 23, 2011, 08:01:16 AM »
WM_PRINT (PrintWindow)

...
« Last Edit: November 23, 2011, 08:05:22 AM by Patrice Terrier »
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Offline Roy Chan

  • Newbie
  • *
  • Posts: 19
  • Gender: Male
Re: qrencode-win32 / qrcodelib.dll (GNU License)
« Reply #22 on: December 04, 2011, 08:47:29 AM »
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
« Last Edit: December 06, 2011, 07:19:58 AM by Roy Chan »
Roy Chan
iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.5