Click here to Skip to main content
15,912,756 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hello

I've developed a C++ client-server project using snorkel embedded web-server, in which the client submits some information to the server using a content-buffer containing form.
after the submitted information is processed, a QR code is generated and it is supposed to be displayed on the client-side

I was wondering how can I pop-up a window that displays the QR code image? is there some sort of C++ code that can do that???

or
how can a browser-window pop-up with the displayed image???


Regards.
Posted

1 solution

Lots of browsers have pop-up blockers. I suggest displaying the bar code image inside the page. Have a place holder image in the page DOM (say a single pixel image) that you replace later with the generated bar code image.

If you want to display the image client side from native C++ (and not a browser), you have to create a window with a window message handler that handles the WM_CREATE, WM_PAINT, and WM_DESTROY window messages. There are many examples of this on CP.

Guide to WIN32 Paint for Intermediates[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900