Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is this possbile??? Pin
User 665831-Jan-05 3:40
User 665831-Jan-05 3:40 
GeneralRe: Is this possbile??? Pin
rlepine31-Jan-05 3:45
rlepine31-Jan-05 3:45 
AnswerRe: Is this possbile??? Pin
David Crow31-Jan-05 3:52
David Crow31-Jan-05 3:52 
GeneralRe: Is this possbile??? Pin
rlepine31-Jan-05 3:58
rlepine31-Jan-05 3:58 
Generalmaintaining layout of window Pin
doneirik31-Jan-05 2:36
doneirik31-Jan-05 2:36 
GeneralRe: maintaining layout of window Pin
Maximilien31-Jan-05 2:42
Maximilien31-Jan-05 2:42 
GeneralRe: maintaining layout of window Pin
BlackDice31-Jan-05 5:45
BlackDice31-Jan-05 5:45 
GeneralPosting File Open Dialog Pin
Sreenivasa.Murthy.G31-Jan-05 1:53
sussSreenivasa.Murthy.G31-Jan-05 1:53 
Hi all,
i need your help urgently.
i am facing problem with posting a DoModal FileOpenDialog from property sheet. i will explian my problem this way.

I hava a dialog D1 derived from CDialog. in its OnInitDialog(), i created a propertysheet PS1 at run time with D1 as parent, and PS1 having WS_CHILD | WS_VISIBLE as creation styles. PS1 has 2 propertypages - PP1, PP2 - added to it. PP1 has OPEN button. On Clicking OPEN, i need to post FileOpenDialog Box. My code is as below:

D1.cpp
-------
BOOL CD1::OnInitDialog()
{
CPropertySheet *PS1;
PS1 = new CPropertySheet("", this, 0) ;

CPropertyPage *pp1 = new PP1() ;
CPropertyPage *pp2 = new PP2() ;

PS1->AddPage(pp1) ;
PS2->AddPage(pp2) ;

PP1->Create(this, WS_CHILD | WS_VISIBLE) ;
PP1->ShowWindow(1) ;
}

PP1.cpp

void PP1::OnBtnOpen()
{
CString fileName ;
char charFilter[256] ;
char fileExt[100] ;
char *filename ;

strcpy(charFilter, "File Filter (.mmm)|*.mmm|") ;
strcpy(fileExt, "mwf") ;


CFileDialog fileDialog(TRUE, // Open File Dialog
fileExt, // default extension
NULL, // Initial File Name
OFN_HIDEREADONLY |
OFN_OVERWRITEPROMPT |
FILE_ATTRIBUTE_DIRECTORY,
charFilter, // File Filters
AfxGetMainWnd() ); // Parent Window

if( fileDialog.DoModal() == IDOK )
{
return ;
}
}

my application hangs at fileDialog.DoModal().

Please help me in rectifying it.
GeneralRe: Posting File Open Dialog Pin
ThatsAlok31-Jan-05 2:55
ThatsAlok31-Jan-05 2:55 
GeneralResource leak Pin
Abyss31-Jan-05 1:45
Abyss31-Jan-05 1:45 
GeneralRe: Resource leak Pin
David Crow31-Jan-05 3:55
David Crow31-Jan-05 3:55 
GeneralRe: Resource leak Pin
Blake Miller31-Jan-05 5:45
Blake Miller31-Jan-05 5:45 
GeneralRe: Resource leak Pin
Abyss31-Jan-05 20:48
Abyss31-Jan-05 20:48 
GeneralTask bar does not pop up Pin
normanS31-Jan-05 1:43
normanS31-Jan-05 1:43 
GeneralStatic linking for ActiveX controls. Pin
pc_dev30-Jan-05 23:50
pc_dev30-Jan-05 23:50 
GeneralRe: Static linking for ActiveX controls. Pin
Cedric Moonen30-Jan-05 23:58
Cedric Moonen30-Jan-05 23:58 
Generalserial com port Pin
syed abbdul qavi30-Jan-05 23:26
syed abbdul qavi30-Jan-05 23:26 
GeneralRe: serial com port Pin
Cedric Moonen30-Jan-05 23:35
Cedric Moonen30-Jan-05 23:35 
GeneralRe: serial com port Pin
syed abbdul qavi7-Feb-05 18:30
syed abbdul qavi7-Feb-05 18:30 
GeneralGenerated #include lines format in VC 7.1 Pin
rbid30-Jan-05 22:46
rbid30-Jan-05 22:46 
GeneralJPG2AVI Pin
yingkou30-Jan-05 20:51
yingkou30-Jan-05 20:51 
GeneralRe: JPG2AVI Pin
Ted Ferenc31-Jan-05 0:16
Ted Ferenc31-Jan-05 0:16 
GeneralRe: JPG2AVI Pin
yingkou31-Jan-05 13:43
yingkou31-Jan-05 13:43 
General.Net Hello World - Help! Pin
Nick_Fi30-Jan-05 20:31
Nick_Fi30-Jan-05 20:31 
GeneralRe: .Net Hello World - Help! Pin
Yulianto.30-Jan-05 21:50
Yulianto.30-Jan-05 21:50 

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.