如何在C ++中弹出窗口或浏览器 [英] How to pop-up a window or browser in C++

查看:129
本文介绍了如何在C ++中弹出窗口或浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我使用snorkel嵌入式web服务器开发了一个C ++客户端服务器项目,客户端使用内容向服务器提交一些信息-buffer包含表格。

处理完提交的信息后,生成一个二维码,它应该显示在客户端



我想知道如何弹出一个显示QR码图像的窗口?是否有某种C ++代码可以做到这一点???





怎样才能弹出一个浏览器窗口显示的图像???





问候。

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.

推荐答案

很多浏览器有弹出窗口阻止程序。我建议在页面内显示条形码图像。在页面DOM(比如单个像素图像)中放置一个占位符图像,稍后用生成的条形码图像替换它。



如果要显示图像从本机C ++(而不是浏览器)的客户端,您必须创建一个窗口,其中包含一个处理WM_CREATE,WM_PAINT和WM_DESTROY窗口消息的窗口消息处理程序。在CP上有很多例子。



中间体WIN32油漆指南 [ ^ ]
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[^]


这篇关于如何在C ++中弹出窗口或浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆