CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    8

    Slider probrem!!! - urgent (really)

    I am writing an app using MFC. I created a class:
    CFormCommandView derived from CFormView. I want to embed a slider control in it. I did it using a Class Wizard, but obviously something is wrong - when I call SetRange I get an 'assertion failed' notice - it looks like my slider is not attached to any window - ASSERT(::IsWindow(m_hWnd)) fails.
    What's wrong? MSDN says I do not have to call Create when I use Wizard.

    Thank you very much in advance!


  2. #2
    Join Date
    May 1999
    Posts
    12

    Re: Slider probrem!!! - urgent (really)

    your problem is due to the fact that you may be trying to set range before the window is being created.
    try doing it in the WM_INITDIALOG handler for the formview derived class.


  3. #3
    Join Date
    May 1999
    Posts
    8

    Re: Slider probrem!!! - urgent (really)

    I call the SetRange in OnCreate (WM_CREATE). I wanted to call in in OnInitDialog like you suggested, but WM_INITDIALOG doesn't appear in the Wizard's message map window. Is there a message I could use instead???


  4. #4
    Join Date
    May 1999
    Posts
    12

    Re: Slider probrem!!! - urgent (really)

    after you open class wizard go to the class info tab. there set the filter to Dialog . you will get the
    WM_INITDIALOG message in the Messages tab.

    sri


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured