There is in the program CListCtrl and you need to print it. BUT, because I do not know how to do this)) I will export to a file with HTML markup, i.e. I'll write down my table there.

Question: How to call the browser (browser) used by default and transfer this file there right away (as if we opened the file with a double click). Well, it would be ideal to call the print page. All this is desirable without user intervention.

  • 2
    1. Write the file to% TMP% 2. ShellExecute 3. ???? 4. PROFIT! - karmadro4

3 answers 3

The first part of the task was solved surprisingly simply

#include <stdio.h> main () { system ("start c:\\users\\avp\\ttt.htm"); } 

True, if the browser is running, it just opens a new page in it. Naturally, a.exe terminates and the page remains. Those. questions of the tax must be addressed in some other way.

  • The difference between this and a similar minted answer escapes me ... - karmadro4
  • one
    @ karmadro4, the point is the word start. - skegg 8:49 pm
  • one
    @ karmadro4, in fact there is no difference, the page in both cases appears in the browser. Unfortunately, this is another example of the appraisers' incompetence. - avp
  • @mikillskegg,> To call non-executable files through the type-mapping mechanism of the> files, simply enter the file name on the command line. > For example, the WORD.DOC command starts the application associated with the name extension of the .DOC file. - karmadro4

system ("C: \\ address \\ of file \\ file.html");

    Solved the issue through

     ShellExecute(0, 'Open', 'file.html', NULL, NULL, SW_SHOW); 
    • one
      ShellExecute (0, 'print', 'file.html', NULL, NULL, SW_SHOW); //? - Sioshka
    • @ Siroshka Not working ((But it was worth trying. - Ray
    • In my opinion, Internet Explorer registers the verb "print" ... - karmadro4