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

    SetParent Function causing Overflow (Error 6) in NT?

    I'm using this Function in my program

    Declare Function SetParent Lib "user32" (byval hWndChild as Long, byval hWndNewParent as Long) as Long



    This is how it is called.

    r% = SetParent(MCOption1(Index).hwnd, MCPanel
    (Index).hwnd)



    But, when I run the program in NT, I get an Overflow!(error 6) on any screen that has an MCOption control.

    Any ideas on why it would work fine in Win 95/98, but not NT?




  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: SetParent Function causing Overflow (Error 6) in NT?

    Just a thought, but could it be because :


    r% = SetParent(MCOption1(Index).hwnd, MCPanel(Index).hwnd)




    means that 'r%' is an integer and the SetParent call returns a long ?

    You are using Option Explicit aren't you ?

    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

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