hi
i used GetModuleFileName and GetModuleBaseName functions to return the path(directory) for the folder the project is in and the icon as well ...like this:
void CForm1::OnCommand1()
{
// TODO: Add your control notification handler code here
CComVariant retval; // - "AutoDim"
CString toto="ccc_ext";
CString app_path;
CString Icon;
char buffer2[2048];
HANDLE hProcess = GetCurrentProcess();
char buffer1[2048];
app_path=GetModuleFileName(NULL, buffer2, 2048)+"\\"+GetModuleBaseName(hProcess, NULL, buffer1, 2048);
Icon=GetModuleFileName(NULL, buffer2, 2048) +"\\" ;
retval = Associate_File(".ccc", app_path,toto,"My own extension",Icon);
AfxMessageBox(("Associated the file extension .ccc with this application!"));
}
but when i check the registry .... i found afolder for the extension but with no directory for the command or the icon
whats wrong ?
pleeease help me with this
thank u