Click here to Skip to main content
15,916,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionListView Pin
nitin36-Nov-07 0:03
nitin36-Nov-07 0:03 
AnswerRe: ListView Pin
CPallini6-Nov-07 0:11
mveCPallini6-Nov-07 0:11 
AnswerRe: ListView Pin
Nelek6-Nov-07 1:57
protectorNelek6-Nov-07 1:57 
AnswerRe: ListView Pin
Sam Hobbs6-Nov-07 16:06
Sam Hobbs6-Nov-07 16:06 
QuestionContext Menu problem Pin
neha.agarwal275-Nov-07 23:49
neha.agarwal275-Nov-07 23:49 
Questioncan anybody tell me how to print the datagrid.I am using ado to load the datagrid Pin
SnaKeBeD5-Nov-07 23:49
SnaKeBeD5-Nov-07 23:49 
AnswerRe: can anybody tell me how to print the datagrid.I am using ado to load the datagrid Pin
chandu0046-Nov-07 1:40
chandu0046-Nov-07 1:40 
QuestionHow could I use ffmpeg library in my MFC application? Pin
H4u325-Nov-07 23:24
H4u325-Nov-07 23:24 
QuestionDLL into the Activex Project Pin
ashishbhatt5-Nov-07 23:19
ashishbhatt5-Nov-07 23:19 
QuestionTo get HICON Pin
KASR15-Nov-07 23:14
KASR15-Nov-07 23:14 
AnswerRe: To get HICON Pin
Nelek5-Nov-07 23:30
protectorNelek5-Nov-07 23:30 
AnswerRe: To get HICON Pin
Hamid_RT5-Nov-07 23:52
Hamid_RT5-Nov-07 23:52 
Questionhow to initialize a form? Pin
panthal5-Nov-07 23:13
panthal5-Nov-07 23:13 
AnswerRe: how to initialize a form? Pin
Nelek5-Nov-07 23:28
protectorNelek5-Nov-07 23:28 
GeneralRe: how to initialize a form? Pin
panthal5-Nov-07 23:36
panthal5-Nov-07 23:36 
QuestionError in calling a function that gets an array of pointers to base class [modified] Pin
mrobeda5-Nov-07 22:52
mrobeda5-Nov-07 22:52 
AnswerRe: Error in calling a function that gets an array of pointers to base class Pin
Cedric Moonen5-Nov-07 22:59
Cedric Moonen5-Nov-07 22:59 
AnswerRe: Error in calling a function that gets an array of pointers to base class Pin
jhwurmbach5-Nov-07 23:50
jhwurmbach5-Nov-07 23:50 
GeneralRe: Error in calling a function that gets an array of pointers to base class Pin
mrobeda5-Nov-07 23:58
mrobeda5-Nov-07 23:58 
GeneralRe: Error in calling a function that gets an array of pointers to base class Pin
Cedric Moonen6-Nov-07 0:12
Cedric Moonen6-Nov-07 0:12 
GeneralRe: Error in calling a function that gets an array of pointers to base class Pin
jhwurmbach6-Nov-07 0:33
jhwurmbach6-Nov-07 0:33 
GeneralRe: Error in calling a function that gets an array of pointers to base class Pin
mrobeda6-Nov-07 2:34
mrobeda6-Nov-07 2:34 
QuestionBrowse the file and read it. Pin
CodingLover5-Nov-07 22:44
CodingLover5-Nov-07 22:44 
On my MFC application I read file and do some process on it. Here is the code I used to open and read only.

<br />
CFile srf_ReadFile;<br />
char * srf_FilePath = "ReadFile_001.txt";<br />
if(srf_ReadFile.Open(srf_FilePath, CFile::modeRead))<br />
{<br />
// Do the required process here on ReadFile_001.txt<br />
}<br />


So, the file should be always in the same folder which the project/solution contain. If I want to read another file, say ReadFile_002.txt, have to do it manually, go to the code and gives the new file name.

char * srf_FilePath = "ReadFile_002.txt";

It is too boring. So I want to make it more reliable to use. I want to add a browse button(I think that is the correct word, which is used to find the file in Windows) and set it as the file which I want to read.

How can I do it. Can you guys explain.



I appreciate your help all the time...
Eranga Smile | :)

AnswerRe: Browse the file and read it. Pin
Cedric Moonen5-Nov-07 22:55
Cedric Moonen5-Nov-07 22:55 
GeneralRe: Browse the file and read it. Pin
CodingLover5-Nov-07 23:05
CodingLover5-Nov-07 23:05 

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.