Click here to Skip to main content
15,912,082 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPrecision of double type Pin
paulb29-Jan-03 19:12
paulb29-Jan-03 19:12 
GeneralRe: Precision of double type Pin
Chris Richardson29-Jan-03 19:49
Chris Richardson29-Jan-03 19:49 
GeneralSetting Bitmap Background for CProgressCtrl Pin
Effiniti29-Jan-03 18:09
Effiniti29-Jan-03 18:09 
GeneralRe: Setting Bitmap Background for CProgressCtrl Pin
Abbas_Riazi29-Jan-03 22:12
professionalAbbas_Riazi29-Jan-03 22:12 
GeneralVisual C++ terms and agreements Pin
moraalg29-Jan-03 16:52
moraalg29-Jan-03 16:52 
GeneralRe: Visual C++ terms and agreements Pin
Christian Graus29-Jan-03 18:09
protectorChristian Graus29-Jan-03 18:09 
Generalspecial .lnk files Pin
Hervorzaubern29-Jan-03 14:01
Hervorzaubern29-Jan-03 14:01 
GeneralRe: special .lnk files Pin
Chris Losinger29-Jan-03 14:19
professionalChris Losinger29-Jan-03 14:19 
from http://www.codeproject.com/editctrl/dropedit.asp[^]

CString ExpandShortcut(CString &inFile)
{
	CString outFile = "";
	
    // Make sure we have a path
    ASSERT(inFile != _T(""));
	
    IShellLink* psl;
    HRESULT hres;
    LPTSTR lpsz = inFile.GetBuffer(MAX_PATH);
	
    // Create instance for shell link
    hres = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
        IID_IShellLink, (LPVOID*) &psl);
    if (SUCCEEDED(hres))
    {
        // Get a pointer to the persist file interface
        IPersistFile* ppf;
        hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*) &ppf);
        if (SUCCEEDED(hres))
        {
            // Make sure it's ANSI
            WORD wsz[MAX_PATH];
            ::MultiByteToWideChar(CP_ACP, 0, lpsz, -1, wsz, MAX_PATH);
			
            // Load shortcut
            hres = ppf->Load(wsz, STGM_READ);
            if (SUCCEEDED(hres)) {
				WIN32_FIND_DATA wfd;
				// find the path from that
				HRESULT hres = psl->GetPath(outFile.GetBuffer(MAX_PATH), 
					MAX_PATH,
					&wfd, 
					SLGP_UNCPRIORITY);
				
				outFile.ReleaseBuffer();
            }
            ppf->Release();
        }
        psl->Release();
    }
	
	inFile.ReleaseBuffer();
	
	// if this fails, outFile == ""
    return outFile;
}




A | B - it's not a choice.

GeneralRe: special .lnk files Pin
30-Jan-03 5:41
suss30-Jan-03 5:41 
GeneralRe: special .lnk files Pin
Hervorzaubern30-Jan-03 5:42
Hervorzaubern30-Jan-03 5:42 
Generalclistctrl in report mode: make the header not clickable. Pin
trustno129-Jan-03 14:01
trustno129-Jan-03 14:01 
GeneralRe: clistctrl in report mode: make the header not clickable. Pin
Michael Dunn29-Jan-03 14:51
sitebuilderMichael Dunn29-Jan-03 14:51 
GeneralLAN connection test Pin
Paul M Watt29-Jan-03 13:35
mentorPaul M Watt29-Jan-03 13:35 
GeneralRe: LAN connection test Pin
Mike Nordell30-Jan-03 21:22
Mike Nordell30-Jan-03 21:22 
GeneralAdding color to a row in a list control Pin
ElizabethC29-Jan-03 12:56
ElizabethC29-Jan-03 12:56 
GeneralRe: Adding color to a row in a list control Pin
Michael Dunn29-Jan-03 13:36
sitebuilderMichael Dunn29-Jan-03 13:36 
GeneralRe: Adding color to a row in a list control Pin
ElizabethC30-Jan-03 11:44
ElizabethC30-Jan-03 11:44 
GeneralAfxMessageBox: change the font size for the input string.. Pin
trustno129-Jan-03 11:52
trustno129-Jan-03 11:52 
GeneralRe: AfxMessageBox: change the font size for the input string.. Pin
Shog929-Jan-03 12:21
sitebuilderShog929-Jan-03 12:21 
QuestionWindows XP Home or Professional? Pin
Jon Sagara29-Jan-03 9:46
Jon Sagara29-Jan-03 9:46 
AnswerRe: Windows XP Home or Professional? Pin
Navin29-Jan-03 11:03
Navin29-Jan-03 11:03 
GeneralRe: Windows XP Home or Professional? Pin
Jon Sagara29-Jan-03 11:11
Jon Sagara29-Jan-03 11:11 
AnswerRe: Windows XP Home or Professional? Pin
ColinDavies29-Jan-03 22:15
ColinDavies29-Jan-03 22:15 
GeneralRe: Windows XP Home or Professional? Pin
Jon Sagara30-Jan-03 5:16
Jon Sagara30-Jan-03 5:16 
AnswerRe: Windows XP Home or Professional? Pin
Mike Nordell30-Jan-03 21:24
Mike Nordell30-Jan-03 21:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.