473,395 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

createwindowex api call

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
2 2983
* "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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Patrick Blackman | last post by:
Has anyone used CreateWindowEX API to create a control in C#? I want to create the Richtextbox control using this method so I can have better control over the underlying interfaces to substantial...
2
by: Patrick Blackman | last post by:
Need example of using WinAPI "CreateWindowEx" in c# any help would be appreciated.
3
by: Jan Schukat | last post by:
It s just a Windows application with a WinMain function, an own registered Window Class and a CreateWindowEx call, no mfc and other gimmicks. I made several applications with a the main window...
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
4
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage...
13
by: mitchellpal | last post by:
i am really having a hard time trying to differentiate the two..........i mean.....anyone got a better idea how each occurs?
13
by: shsingh | last post by:
I have a class A containing some map as data variables. I creat an object of class A on heap by allocatiing memory by using "malloc". This will return me the required memory but the object is not...
3
by: cberthu | last post by:
Hi all, Is it possible to have two connects in the same rexx script to different DB's? I have to get data form on DB (with specifics selects and filter out some values with RExx) and save the...
7
by: Young | last post by:
This makes me very puzzled and angry.Please have a look at : ....... ....... _hSelf=::CreateWindowEx( WS_EX_ACCEPTFILES, (LPCWSTR)_className,\ (LPCWSTR)"Web Studio 2008",\...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.