Click here to Skip to main content
16,004,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Adding static control to childvew [modified] Pin
Cedric Moonen9-Jun-06 4:06
Cedric Moonen9-Jun-06 4:06 
GeneralRe: Adding static control to childvew Pin
rajeev829-Jun-06 18:19
rajeev829-Jun-06 18:19 
GeneralRe: Adding static control to childvew Pin
Cedric Moonen9-Jun-06 22:17
Cedric Moonen9-Jun-06 22:17 
QuestionOpen Dialog "Filter for file names" Pin
Nitefall20609-Jun-06 3:21
Nitefall20609-Jun-06 3:21 
AnswerRe: Open Dialog "Filter for file names" Pin
David Crow9-Jun-06 3:46
David Crow9-Jun-06 3:46 
GeneralRe: Open Dialog "Filter for file names" Pin
Nitefall20609-Jun-06 4:41
Nitefall20609-Jun-06 4:41 
QuestionRe: Open Dialog "Filter for file names" Pin
David Crow9-Jun-06 5:27
David Crow9-Jun-06 5:27 
AnswerRe: Open Dialog "Filter for file names" Pin
Nitefall206012-Jun-06 4:53
Nitefall206012-Jun-06 4:53 
After messing with this a bit I also got it to work. Thanks alot.


I am now having issues with a variation of this, I am trying to get the name my save and load dialog boxes display, to be dynamic based on the file the user is currently working on.

My application creates several files based on the original file.

For Example: if a user names the original file bob my application will create a bob_section1.txt and a bob_section2.txt.

The purpose of this filter is to only display the files that were created durring a single run of my application.

bob.txt
bob_section1.txt
bob_section2.txt

I can get the filter to work if I statically put in ofn.lpstrFilter = "Bob files (Bob*.*)\0Bob*.txt\0"; Or using a character array called Filtername[256] and building the same filter.

Filtername[256] = "Bob files (Bob*.*)\0Bob*.txt\0";
ofn.lpstrFilter = Filtername;

What I am trying to acomplish is the following

Filtername[256] = "Section files (.txt)\0Filename*.txt\0";

Where Filename is the name of the current file. This way it will display the created file and all of the secondary files created from it.

I have tried

strcpy(Filtername, "Section files (.txt)");
strcat(Filtername, "\0");
strcat(Filtername, Filename);
strcat(Filtername, "*.txt\0\0");

This however fails miserably and I get either No files to display or every file in the entire directory. I am pretty sure it is an issue with the null charcters not getting put into the character array correctly but I am not sure what exactly is going wrong.

Any Ideas.........Confused | :confused:

Nitefall
GeneralRe: Open Dialog "Filter for file names" Pin
David Crow12-Jun-06 5:00
David Crow12-Jun-06 5:00 
GeneralRe: Open Dialog "Filter for file names" Pin
Nitefall206012-Jun-06 5:10
Nitefall206012-Jun-06 5:10 
GeneralRe: Open Dialog "Filter for file names" Pin
David Crow12-Jun-06 5:13
David Crow12-Jun-06 5:13 
GeneralRe: Open Dialog "Filter for file names" Pin
Nitefall206014-Jun-06 2:32
Nitefall206014-Jun-06 2:32 
GeneralRe: Open Dialog "Filter for file names" Pin
David Crow14-Jun-06 2:55
David Crow14-Jun-06 2:55 
QuestionActiveX control on VC6 Cdailog in MFC dll Pin
ns9-Jun-06 3:08
ns9-Jun-06 3:08 
AnswerRe: ActiveX control on VC6 Cdailog in MFC dll Pin
Cedric Moonen9-Jun-06 3:22
Cedric Moonen9-Jun-06 3:22 
Questionhow we can set the co-ordinates for popup dialog box Pin
happy_ram9-Jun-06 3:04
happy_ram9-Jun-06 3:04 
AnswerRe: how we can set the co-ordinates for popup dialog box Pin
Cedric Moonen9-Jun-06 3:06
Cedric Moonen9-Jun-06 3:06 
GeneralRe: how we can set the co-ordinates for popup dialog box Pin
_AnsHUMAN_ 9-Jun-06 3:14
_AnsHUMAN_ 9-Jun-06 3:14 
QuestionMenu and threads Pin
Russell'9-Jun-06 2:33
Russell'9-Jun-06 2:33 
AnswerRe: Menu and threads Pin
Viorel.9-Jun-06 3:00
Viorel.9-Jun-06 3:00 
GeneralRe: Menu and threads Pin
Russell'9-Jun-06 3:16
Russell'9-Jun-06 3:16 
GeneralRe: Menu and threads Pin
Viorel.9-Jun-06 3:44
Viorel.9-Jun-06 3:44 
GeneralRe: Menu and threads Pin
Russell'9-Jun-06 4:05
Russell'9-Jun-06 4:05 
Questionlogin in mfc(VC++) [modified] Pin
yogendra kaushik9-Jun-06 2:18
yogendra kaushik9-Jun-06 2:18 
AnswerRe: login in mfc(VC++) Pin
Sarath C9-Jun-06 2:26
Sarath C9-Jun-06 2:26 

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.