Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple question 4

Status
Not open for further replies.

sedawk

Programmer
Joined
Feb 5, 2002
Messages
247
Location
US
I want to make some modification to windows version "hello world" program by splitting into 2-pane window. My purpose is to use CSplitterWnd::CreateStatic() function to create the splitted window.

However, the error messages I got are:
error C2027: use of undefined type 'CSplitterWnd'
and
error C2065: 'CreateStatic' : undeclared identifier

I put CSplitterWnd::CreateStatic(hwnd,1,2) right after showwindow() and updatewindow().

What is the problem about this? Is it necessary to embed CreateStatic() in an OnCreateClient() method?

Thank in advance.
 
I answer my own question here:

I forgot to include "afxext.h" for CSplitterWnd::CreateStatic() function. So I got those errors.

But anyone can give me an example how to define CWnd* ParentWnd when using CreateStatic(). If I used the parent window handle, I got this error:

error C2664: 'CreateStatic' : cannot convert parameter 1 from 'struct HWND__ *' to 'class CWnd *'

Does it mean I have to create a CWnd class in order to use CSplitterWnd::CreateStatic()?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top