Definition of hDlg

Question:
I want to make a list-combo visible but, I can’t get using API function :SendDlgItemMessage.What is “hDlg” in the following declaration?

Declare function SendDlgItemMessage Lib “User” (Byval hDlg as Integer, Byval nIDDlgItem As Integer, ByVal wParam as integer, lParam as Any) as Long

Answer:
Typically, the parameters beginning with an “h” are handles. Try giving it the hWnd of your window/form. I’d save my project before I did it, though. Playing with this stuff can get very dangerous. I would imagine that hDlg means “handle to the dialog”. You can also check the Win 3.1 SDK help file included with VB3, if you’re using version 3.If you’ve got the list-combo on your form and just want to make it visible you don’t really need an API call, simply set it’s visible property to True in your code:

Combo1.Visible = True

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: