nanogui: CreateWindow fails...


Previous by date: 12 Jan 2002 05:13:33 -0000 Re: Workaround for CreateBitmap() in uWin?, Greg Haerr
Next by date: 12 Jan 2002 05:13:33 -0000 Re: MS Fonts, Greg Haerr
Previous in thread: 12 Jan 2002 05:13:33 -0000 CreateWindow fails..., Daniel Krippner
Next in thread:

Subject: Re: [nanogui] CreateWindow fails...
From: "Greg Haerr" ####@####.####
Date: 12 Jan 2002 05:13:33 -0000
Message-Id: <028801c19b25$3d465800$3aba46a6@xmission.com>

Try creating the second window using szClassName rather
than EDIT and pass some regular WS_ values.  This will be
a quick check as to whether it's an edit box thing or something
to do with the parent/child relationship.  Check out src/demos/mwin/mdemo.c
for a working demo.

Regards,

Greg


: Another one: the following code... the second call to CreateWindow() 
: fails, returning NULL. Is there anything like GetLastError() I think 
: it's called in windows, any way I can know why the call does not work? 
: Any other hints? Please help! :-)
:     Daniel
:    
: 
:       s_hwndVisu = CreateWindow(szClassName,
:                                                         szWndName,
:                                                         
: WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
:                                                         0, 0, 0, 0,
:                                                         NULL,
:                                                         NULL,
:                                                         hInstance,
:                                                         NULL);
:      
:       if (s_hwndVisu != NULL)
:         {
:               s_hwndEditC = CreateWindow("EDIT",
:                                                                     "OK",
:                                                                     
: WS_CHILD | WS_BORDER | ES_CENTER | ES_AUTOHSCROLL,
:                                                                     0, 
: 0, 0, 0,
:                                                                      
: s_hwndVisu,
:                                                                      NULL,
:                                                                      
: hInstance,
:                                                                      NULL);
:      
:           if (s_hwndEditC != NULL)
:             {
:               if (prevWndProc == 0)
:                     prevWndProc = (int(*)())GetWindowLong(s_hwndEditC, 
: GWL_WNDPROC);
:               SetWindowLong(s_hwndEditC, GWL_WNDPROC, 
: (LONG)(WNDPROC)EditControlProc);
:             }
:         }
: 
: -- 
: 3S-Smart Software Solutions GmbH
: Fischerstr.19, D-87435 Kempten
: Tel. ++49-(0)831-54031-72
: Fax ++49-(0)831-54031-50
: email: ####@####.####
: web:   http://www.3s-software.com
: 
: 
: 
: ---------------------------------------------------------------------
: To unsubscribe, e-mail: ####@####.####
: For additional commands, e-mail: ####@####.####
: 


Previous by date: 12 Jan 2002 05:13:33 -0000 Re: Workaround for CreateBitmap() in uWin?, Greg Haerr
Next by date: 12 Jan 2002 05:13:33 -0000 Re: MS Fonts, Greg Haerr
Previous in thread: 12 Jan 2002 05:13:33 -0000 CreateWindow fails..., Daniel Krippner
Next in thread:


Powered by ezmlm-browse 0.20.