471,850 Members | 1,004 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,850 software developers and data experts.

VC++6.0 Problem with SetFocus()

hex
I put function OnInitDialog in child dialog wich made by class CSecond:

BOOL CSecond::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
m_ed.SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
But focus doesn't set. :(

Source located at http://hex.org.ua/SetFocus.zip

Jul 30 '06 #1
2 6456
hex wrote:
I put function OnInitDialog in child dialog wich made by class
CSecond:

BOOL CSecond::OnInitDialog()
{ [..]
Your question is about Windows programming, MFC, and not about C++
_language_. Please consider a different place for your inquiry,
since MFC and Windows are off-topic here. Thanks.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 30 '06 #2
hex wrote:
I put function OnInitDialog in child dialog wich made by class CSecond:

BOOL CSecond::OnInitDialog()
{
CDialog::OnInitDialog();

// TODO: Add extra initialization here
m_ed.SetFocus();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
But focus doesn't set. :(
Did you read the comment in your code?

--
Scott McPhillips [VC++ MVP]

Jul 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Darren DeCoste | last post: by
2 posts views Thread by thx606 | last post: by
reply views Thread by MrsLeigh | last post: by
3 posts views Thread by Jim Devenish | last post: by
aboka
reply views Thread by aboka | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.