Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

API Call FindWindow

107 views
Skip to first unread message

Dale & Brenda Mills

unread,
Nov 19, 1999, 3:00:00 AM11/19/99
to
Win api call in VB syntax is:

FindWindow(byval lpClassName as string,byval lpWindowName as string)

Does anybody know what the "correct" lpClassName value is for Autocad
r14.01

I have a vb application that returns the classname for all current windows.
When I launch it it returns the class name for the Main autocad window as
Afx:400000:28:0:58e022b and the command line window as
Afx:400000:8:10009:0:0. It seems each time I relaunch Autocad it uses a
different class name. I am attempting to get the window handle so that I
can message directly to Autocad. This approach works with Excel
(lpClassName = "XLMain"). Any one done this before? Your help is
appreciated.

Drm

Frank Oquendo

unread,
Nov 19, 1999, 3:00:00 AM11/19/99
to
I think what you're getting is the name for the specific instance of
AutoCAD's window class, not the class name itself. The class name is
Afx:400000:8:1

Dale & Brenda Mills <da...@halifax.com> wrote in message
news:94302234...@helium.cstone.net...

Denis Gagne

unread,
Nov 19, 1999, 3:00:00 AM11/19/99
to
Frank, Dale & Brenda,

You may have noticed that AutoCAD and
other C++ apps are creating a top level
window or subclassed window having this
classname scheme:

Afx:400000:8:1:0:XXXX
where XXXX corresponds to the
Window Icon handle

Better not rely only on this classname
to get a window handle using FindWindow
but EnumThreadWindows may be more
appropriate

Denis


Frank Oquendo a écrit dans le message
<813sl7$a8...@adesknews2.autodesk.com>...

Bryan Ebert

unread,
Nov 29, 1999, 3:00:00 AM11/29/99
to
Try this:

hWnd = Findwindow (vbNullString, AcadApp.Caption)

0 new messages