Knowledge Base

DOCERR: SetWindowPos Declaration Incorrect in On-Line Help

Article ID: 143428

Article Last Modified on 11/3/2003


APPLIES TO


This article was previously published under Q143428

SUMMARY

This article corrects a documentation error for the SetWindowPos function call as described in the Microsoft Visual Basic on-line help file (WIN31API.HLP) that shipped with Microsoft Visual Basic version 3.0 for Windows. In Example 1 for the hWnd property, if you run the code example, the following error message displays:
Bad DLL calling convention

MORE INFORMATION

The declaration is incorrectly documented as the following:
Declare Sub SetWindowPos Lib "User" (ByVal h1 As Integer,
                                     ByVal h2 As Integer,
                                     ByVal x As Integer,
                                     ByVal y As Integer,
                                     ByVal cx As Integer,
                                     ByVal cy As Integer,
                                     ByVal f As Long)
				
The correct declaration is as follows:
Declare Sub SetWindowPos Lib "User" (ByVal h1 As Integer,
                                     ByVal h2 As Integer,
                                     ByVal x As Integer,
                                     ByVal y As Integer,
                                     ByVal cx As Integer,
                                     ByVal cy As Integer,
                                     ByVal f As Integer)
				
NOTE: Each Declare statement must be entered as one, single line.

Please note that the last parameter (ByVal f As Long) is incorrectly defined as Long. It should be defined as Integer.

Additional query words: 3.00

Keywords: KB143428