By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,448 Members | 934 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,448 IT Pros & Developers. It's quick & easy.

createwindowex api call

P: n/a
I can't seen to get the createwindowex api call working,
what am I doing wrong. I am actually using visual basic 6.

here is a sample,
Public Const WC_IE = "Shell DocObject View"

Declare Function CreateWindowEx Lib "user32.dll"
Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal
lpClassName As String, ByVal lpWindowName As String, ByVal
dwStyle As Long, ByVal X As Long, ByVal y As Long, ByVal
nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As
Long, ByVal hMenu As Long, ByVal hInstance As Long,
lpParam As Any) As Long
ReturnValue = CreateWindowEx(0, WC_IE, "", WS_CHILD, 0, 0,
0, 0, Parenthandle, 0, 0, ByVal CLng(0))
I have actually wm_closed Shell DocObject View, and am
trying to re-establish it in the same parent window.

Any ideas welcome thanks.
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "Tony" <an*******@discussions.microsoft.com> scripsit:
I can't seen to get the createwindowex api call working,
what am I doing wrong. I am actually using visual basic 6.

here is a sample,

Public Const WC_IE = "Shell DocObject View"

Declare Function CreateWindowEx Lib "user32.dll"
Alias "CreateWindowExA"
Remove the 'Alias...' and declare the function as 'Auto'.
(ByVal dwExStyle As Long, ByVal
lpClassName As String, ByVal lpWindowName As String, ByVal
dwStyle As Long, ByVal X As Long, ByVal y As Long, ByVal
nWidth As Long, ByVal nHeight As Long,
Replace all 'As Long' with 'As Int32'.
ByVal hWndParent As
Long, ByVal hMenu As Long, ByVal hInstance As Long,
Replace all of the 'As Long' above with 'As IntPtr'.
lpParam As Any) As Long
Declare the last parameter as 'Int32' and the return value as 'IntPtr'.
ReturnValue = CreateWindowEx(0, WC_IE, "", WS_CHILD, 0, 0,
0, 0, Parenthandle, 0, 0, ByVal CLng(0))


Replace the 'ByVal CLng(0)' with '0'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Dilbert's words of wisdom #18: Never argue with an idiot. They drag you down
to their level then beat you with experience.
Nov 20 '05 #2

P: n/a
Hi,

http://www.mentalis.org/apilist/CreateWindowEx.shtml

You might be better asking your question in microsoft.public.vb.winapi
newsgroup this is vb.net one

Ken
-------------------------
"Tony" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
I can't seen to get the createwindowex api call working,
what am I doing wrong. I am actually using visual basic 6.

here is a sample,
Public Const WC_IE = "Shell DocObject View"

Declare Function CreateWindowEx Lib "user32.dll"
Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal
lpClassName As String, ByVal lpWindowName As String, ByVal
dwStyle As Long, ByVal X As Long, ByVal y As Long, ByVal
nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As
Long, ByVal hMenu As Long, ByVal hInstance As Long,
lpParam As Any) As Long
ReturnValue = CreateWindowEx(0, WC_IE, "", WS_CHILD, 0, 0,
0, 0, Parenthandle, 0, 0, ByVal CLng(0))
I have actually wm_closed Shell DocObject View, and am
trying to re-establish it in the same parent window.

Any ideas welcome thanks.

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.