Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- #include <QDebug>
- #include <commoncontrols.h>
- #include <CommCtrl.h>
- #include <shellapi.h>
- HICON JumboIcon(LPTSTR pszPath)
- {
- //const int ILD_TRANSPARENT=1;
- SHFILEINFO sfi;
- if (!SHGetFileInfo(pszPath, 0, &sfi, sizeof(sfi), SHGFI_SYSICONINDEX)) return NULL;
- IImageList *piml;
- if (FAILED(SHGetImageList(SHIL_JUMBO, IID_PPV_ARGS(&piml)))) return NULL;
- HICON hico;
- piml->GetIcon(sfi.iIcon, ILD_TRANSPARENT, &hico);
- piml->Release();
- return hico;
- }
- MainWindow::MainWindow(QWidget *parent) :
- QMainWindow(parent),
- ui(new Ui::MainWindow)
- {
- ui->setupUi(this);
- ui->tabWidget->setTabText(0,QString("Hi"));
- LPTSTR pszPath = L"C:\\Users\\Ethan Smith\\Desktop\\foo.sb2";;
- qDebug() << JumboIcon(pszPath);
- }
- MainWindow::~MainWindow()
- {
- delete ui;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement