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[
^]