Any how this problem solved the solution if anybody need it is
Code: Select all
using std::string;
char szAppPath[MAX_PATH] = "";
string strAppDirectory;
::GetModuleFileName(NULL, szAppPath, sizeof(szAppPath) - 1);
this for getting the application file path
Code: Select all
strAppDirectory = szAppPath;
strAppDirectory = strAppDirectory.substr(0, strAppDirectory.rfind("\\"));
strAppDirectory =strAppDirectory+"\\vlc-Documents\\vlc16x16.png";
this for extracting directory
Code: Select all
const char *p;
p=strAppDirectory.c_str();
this for converting from string to char so you can assign it
To Qicon function if you need to change vlc icons.
=========================================================================
putting all to geter
Code: Select all
using std::string;
char szAppPath[MAX_PATH] = "";
string strAppDirectory;
::GetModuleFileName(NULL, szAppPath, sizeof(szAppPath) - 1);
// Extract directory
strAppDirectory = szAppPath;
strAppDirectory = strAppDirectory.substr(0, strAppDirectory.rfind("\\"));
strAppDirectory =strAppDirectory+"\\vlc-Documents\\vlc16x16.png";
//test=======================
// string l="Pranav";
const char *p;
p=strAppDirectory.c_str();