Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT Pin
CPallini13-Dec-09 20:39
mveCPallini13-Dec-09 20:39 
AnswerRe: Help with arrays Pin
LunaticFringe13-Dec-09 9:50
LunaticFringe13-Dec-09 9:50 
GeneralRe: Help with arrays Pin
Chidori-chan13-Dec-09 10:16
Chidori-chan13-Dec-09 10:16 
GeneralRe: Help with arrays Pin
Richard MacCutchan13-Dec-09 10:26
mveRichard MacCutchan13-Dec-09 10:26 
GeneralRe: Help with arrays Pin
LunaticFringe13-Dec-09 10:29
LunaticFringe13-Dec-09 10:29 
QuestionVisual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 6:54
ilu200713-Dec-09 6:54 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
ilu200713-Dec-09 10:29
ilu200713-Dec-09 10:29 
AnswerRe: Visual C++ Drag and Drop and get filename and complete path Pin
Nelek15-Dec-09 20:51
protectorNelek15-Dec-09 20:51 
Well,

I have not used the Visual C++ 2005, but in Visual C++ 6 you can get the filename and the complete path with:

extern CMyApp theApp;
CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;

char FileName[MAX_PATH];
GetModuleFileName(NULL, FileName, MAX_PATH);  // Here you have the whole path with the app name

// Here I was extracting the path of the app, to create a new file with other extension in the same folder that my app
CString m_szName = FileName;
m_szName = m_szName.Left(m_szName.ReverseFind('\\'));
m_szName += "\\MyNewName.ext";
CFile f (m_szName, CFile::modeCreate | CFile::modeReadWrite);

// other stuff...


Regards.
--------
M.D.V. Wink | ;)

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.

QuestionSpacebar: Animating a Circle to move across the screen, instead of jumping Pin
Chidori-chan12-Dec-09 21:30
Chidori-chan12-Dec-09 21:30 
AnswerRe: Spacebar: Animating a Circle to move across the screen, instead of jumping Pin
Cedric Moonen12-Dec-09 22:16
Cedric Moonen12-Dec-09 22:16 
GeneralRe: Spacebar: Animating a Circle to move across the screen, instead of jumping Pin
Chidori-chan13-Dec-09 8:32
Chidori-chan13-Dec-09 8:32 
QuestionUsing RFX_Text_Bulk Pin
Larry Mills Sr12-Dec-09 13:35
Larry Mills Sr12-Dec-09 13:35 
AnswerRe: Using RFX_Text_Bulk Pin
Richard MacCutchan12-Dec-09 23:12
mveRichard MacCutchan12-Dec-09 23:12 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 3:02
Larry Mills Sr13-Dec-09 3:02 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 3:18
mveRichard MacCutchan13-Dec-09 3:18 
GeneralRe: Using RFX_Text_Bulk [modified] Pin
Larry Mills Sr13-Dec-09 4:28
Larry Mills Sr13-Dec-09 4:28 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 4:50
mveRichard MacCutchan13-Dec-09 4:50 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 6:18
Larry Mills Sr13-Dec-09 6:18 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 6:47
mveRichard MacCutchan13-Dec-09 6:47 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr13-Dec-09 9:20
Larry Mills Sr13-Dec-09 9:20 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 9:48
mveRichard MacCutchan13-Dec-09 9:48 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan13-Dec-09 23:19
mveRichard MacCutchan13-Dec-09 23:19 
GeneralRe: Using RFX_Text_Bulk Pin
Larry Mills Sr14-Dec-09 0:56
Larry Mills Sr14-Dec-09 0:56 
GeneralRe: Using RFX_Text_Bulk Pin
Richard MacCutchan14-Dec-09 4:48
mveRichard MacCutchan14-Dec-09 4:48 
QuestionSDI app executes CFrameWnd::OnCreate throwing Invalid Address specified to RtlValidateHeap Pin
sharion12-Dec-09 7:36
sharion12-Dec-09 7:36 

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.