MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / GetImageIndex

Method GetImageIndex

WinArk/ProcessInfoEx.cpp:190–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190int ProcessInfoEx::GetImageIndex(CImageList images) const {
191 if (_image < 0) {
192 _image = 0;
193 HICON hIcon = nullptr;
194 ::ExtractIconEx(GetExecutablePath().c_str(), 0, nullptr, &hIcon, 1);
195 if (!hIcon) {
196 SHFILEINFO sfi;
197 ::SHGetFileInfo(GetExecutablePath().c_str(), FILE_ATTRIBUTE_NORMAL, &sfi, sizeof(sfi), SHGFI_ICON|SHGFI_USEFILEATTRIBUTES);
198 hIcon = sfi.hIcon;
199 }
200 if (hIcon)
201 _image = images.AddIcon(hIcon);
202 }
203 return _image;
204}

Callers 1

GetRowImageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected