hawkgao | 1 Mar 2009 16:50
Picon
Favicon

Anybody have ever used CFindReplaceDialog?

I write down these 2 lines.

CFindReplaceDialog* dlg = new CFindReplaceDialog();
dlg->Create(TRUE, _T("aaa"), NULL, FR_DOWN, *this);

but, nothing popup. when i debug it, i found the window handle is
created correctly.

how can i make this common dialog out? Is there any example for this
class?

Thanks a lot,

-Hawk

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
(Continue reading)

Igor Vigdorchik | 1 Mar 2009 17:12
Picon
Favicon

Re: Anybody have ever used CFindReplaceDialog?

Try adding these lines:
dlg->SetActiveWindow();
dlg->ShowWindow(SW_SHOW);

MTPad WTL sample shows how to use this class.

Regards,
Igor.

________________________________
From: hawkgao <hawkgao@...>
To: wtl@...
Sent: Sunday, March 1, 2009 10:50:39 AM
Subject: [wtl] Anybody have ever used CFindReplaceDialog?

I write down these 2 lines.

CFindReplaceDialog* dlg = new CFindReplaceDialog( );
dlg->Create( TRUE, _T("aaa"), NULL, FR_DOWN, *this);

but, nothing popup. when i debug it, i found the window handle is
created correctly.

how can i make this common dialog out? Is there any example for this
class?

Thanks a lot,

-Hawk

(Continue reading)

hawkgao | 1 Mar 2009 17:44
Picon
Favicon

Re: Anybody have ever used CFindReplaceDialog?

Great! It's shown. MTPad is a wonderful example, but it's a little
complex for me. and no document here for it. WTL study is a tough
work, because there is no formal doc. but, these cannot prevent it's
as the best c++ ui framework on windows.

--- In wtl@..., Igor Vigdorchik <igorv007 <at> ...> wrote:
>
> Try adding these lines:
> dlg->SetActiveWindow();
> dlg->ShowWindow(SW_SHOW);
> 
> MTPad WTL sample shows how to use this class.
> 
> Regards,
> Igor.
> 
> 
> 
> 
> ________________________________
> From: hawkgao <hawkgao <at> ...>
> To: wtl@...
> Sent: Sunday, March 1, 2009 10:50:39 AM
> Subject: [wtl] Anybody have ever used CFindReplaceDialog?
> 
> 
> I write down these 2 lines.
> 
> CFindReplaceDialog* dlg = new CFindReplaceDialog( );
> dlg->Create( TRUE, _T("aaa"), NULL, FR_DOWN, *this);
(Continue reading)

hawkgao | 1 Mar 2009 17:46
Picon
Favicon

Re: Anybody have ever used CFindReplaceDialog?

Great! It's shown. Thank you so much Igor. MTPad is a wonderful
example, but it's a little complex for me. and no document here for
it. WTL study is a tough work, because there is no formal doc. but,
these cannot prevent it's as the best c++ ui framework on windows.

--- In wtl@..., Igor Vigdorchik <igorv007 <at> ...> wrote:
>
> Try adding these lines:
> dlg->SetActiveWindow();
> dlg->ShowWindow(SW_SHOW);
> 
> MTPad WTL sample shows how to use this class.
> 
> Regards,
> Igor.
> 
> 
> 
> 
> ________________________________
> From: hawkgao <hawkgao <at> ...>
> To: wtl@...
> Sent: Sunday, March 1, 2009 10:50:39 AM
> Subject: [wtl] Anybody have ever used CFindReplaceDialog?
> 
> 
> I write down these 2 lines.
> 
> CFindReplaceDialog* dlg = new CFindReplaceDialog( );
> dlg->Create( TRUE, _T("aaa"), NULL, FR_DOWN, *this);
(Continue reading)

jgdavies52 | 1 Mar 2009 20:11

Re: Anybody have ever used CFindReplaceDialog?

I have these references which may help:
// See http://www.codeproject.com/wtl/wtl4mfc9.asp for WTL wrapper for 
Open File dialog.
// Also see http://xugang2008.googlepages.com/WTLPart2.pdf

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:wtl-digest@... 
    mailto:wtl-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    wtl-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

(Continue reading)

hawkgao | 2 Mar 2009 03:32
Picon
Favicon

Re: Anybody have ever used CFindReplaceDialog?

Thank you for you material.

--- In wtl@..., "jgdavies52" <jonathangdavies <at> ...> wrote:
>
> I have these references which may help:
> // See http://www.codeproject.com/wtl/wtl4mfc9.asp for WTL wrapper for 
> Open File dialog.
> // Also see http://xugang2008.googlepages.com/WTLPart2.pdf
>

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:wtl-digest@... 
    mailto:wtl-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    wtl-unsubscribe@...
(Continue reading)

Paul Selormey | 2 Mar 2009 05:27
Picon
Favicon

Re: MDI Toolbar with 16x16 button

Hello Robert,
Thanks fo the information. After your confirmation (I had never created 
WTL MDI application, only SDI), I created another WTL sample and it 
works perfectly.
So, I starting tracing the source of the problem and found it with the 
Docking framework serialization, it was restoring a layout which was 
using the 16x15 buttons before I changed it. I deleted the registry 
entry and everything works fine.

This is not WTL problem.

Best regards,
Paul.

--- In wtl@..., "robert679078" <robert.caldecott <at> ...> wrote:
>
> I only ever use 16x16 toolbar icons with all my WTL projects so I'd
> love to see some sample code of this problem.
> 
> --- In wtl@..., "Paul Selormey" <pegroups <at> > wrote:
> >
> > I have a simple MDI application with 16x16 buttons and the buttons 
fail 
> > to appear. Setting it to 16x15 works (I am using a rebar). 
> > What is the problem?
> > 
> > Even setting the size to 16x15 in the code works, is WTL that dummy?
> > 
> > Best regards,
> > Paul.
(Continue reading)

hawkgao | 2 Mar 2009 07:05
Picon
Favicon

Another problem about CFindReplaceDialog

I type find string in text box, then hit enter on keyboard, nothing
happened. only click FindNext button can send out the find message.
finally i found main window receives the enter stroke and there is no
window proc on find & replace dialog. Can I and window proc for find &
replace dialog?

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:wtl-digest@... 
    mailto:wtl-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    wtl-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

(Continue reading)

domehead100 | 2 Mar 2009 07:41
Picon

Re: Another problem about CFindReplaceDialog

--- In wtl@..., "hawkgao" <hawkgao <at> ...> wrote:
>
> I type find string in text box, then hit enter on keyboard, nothing
> happened. only click FindNext button can send out the find message.
> finally i found main window receives the enter stroke and there is no
> window proc on find & replace dialog. Can I and window proc for find &
> replace dialog?
>

Yes, as you noted, since the find dialog is non-modal, it doesn't have 
it's own message loop and the message loop for the parent GUI thread is 
used.  

Check out the IsDialogMessage() function on MSDN.  When non-modal 
dialogs are used, you have to call this function in your message loop 
to hand off messages to non-modal dialogs.

Usually what I do is set up a PreTranslateMessage virtual function 
override like this (assuming I'm setting up a PreTranslateMessage 
handler in my CMyView class):

BOOL CMyView::PreTranslateMessage(MSG* pMsg)
{
   return CWindow::IsDialogMessage(pMsg);
}

This is one place where PreTranslateMessage is truly helpful.  If you 
don't know how to set up a CMessageFilter and PreTranslateMessage, this 
article on CodeProject.com should help:

(Continue reading)

hawkgao | 2 Mar 2009 07:50
Picon
Favicon

Re: Another problem about CFindReplaceDialog

Thank your suggestion.

--- In wtl@..., "domehead100" <domehead100 <at> ...> wrote:
>
> --- In wtl@..., "hawkgao" <hawkgao <at> > wrote:
> >
> > I type find string in text box, then hit enter on keyboard, nothing
> > happened. only click FindNext button can send out the find message.
> > finally i found main window receives the enter stroke and there is no
> > window proc on find & replace dialog. Can I and window proc for find &
> > replace dialog?
> >
> 
> Yes, as you noted, since the find dialog is non-modal, it doesn't have 
> it's own message loop and the message loop for the parent GUI thread is 
> used.  
> 
> Check out the IsDialogMessage() function on MSDN.  When non-modal 
> dialogs are used, you have to call this function in your message loop 
> to hand off messages to non-modal dialogs.
> 
> Usually what I do is set up a PreTranslateMessage virtual function 
> override like this (assuming I'm setting up a PreTranslateMessage 
> handler in my CMyView class):
> 
> 
> BOOL CMyView::PreTranslateMessage(MSG* pMsg)
> {
>    return CWindow::IsDialogMessage(pMsg);
> }
(Continue reading)


Gmane