468,513 Members | 1,750 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,513 developers. It's quick & easy.

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 6340
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
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.