Re: window creation

new topic     » goto parent     » topic index » view thread      » older message » newer message

Is the pointer to your callback valid?
hInstance...hmmm...have u tried simply including
instance(). How do you get values of hInstance?

----- Original Message -----
From: <1evan at sbcglobal.net>
To: "EUforum" <EUforum at topica.com>
Subject: window creation


>
> I get this:
>
> Class "Window Class" registered successfully   --generated after
> RegisterClassA function
> dwExStyle = 0x40100
> ClassName = Window Class
> title = MyWindow
> dwStyle = 0x6CF0000
> x = 0
> y = 0
> width = 621
> height = 480
> NULL
> NULL
> hInstance = 4194304
> NULL
> hWnd = 0
> Error Code : 6
>
> after this section of my program runs:
>
>     hWnd = c_func(CreateWindowExA,{dwExStyle,
>                                    ClassName,
>                                    title,
>
> or_all({WS_CLIPSIBLINGS,WS_CLIPCHILDREN,dwStyle}),
>                                    0,
>                                    0,
>                                    peek4u(WindowRect + 4) -
> peek4u(WindowRect),
>                                    peek4u(WindowRect + 12) -
> peek4u(WindowRect + 8),
>                                    NULL,
>                                    NULL,
>                                    hInstance,
>                                    NULL})
>
>     printf(1,"dwExStyle = 0x%x\nClassName = %s\ntitle = %s\ndwStyle =
> 0x%x\nx = 0\ny = 0\nwidth = %d\nheight = %d\nNULL\nNULL\nhInstance =
> %d\nNULL\n",
>
>
{dwExStyle,peek({ClassName,12}),peek({title,8}),or_all({WS_CLIPSIBLINGS,WS_C
LIPCHILDREN,dwStyle}),
> peek4u(WindowRect + 4) - peek4u(WindowRect),
>            peek4u(WindowRect + 12) - peek4u(WindowRect + 8), hInstance})
>
>     printf(1,"hWnd = %d\n",hWnd)
>
>     if hWnd = NULL then
>         printf(1,"Error code: %d\n",c_func(GetLastError,{}))
>         if message_box("Window creation
> error","Error",or_bits(MB_OK,MB_ICONEXCLAMATION)) then end if
>         return FALSE
>     end if
>
> Can anyone tell me why it fails with ERROR_INVALID_HANDLE (Error code 6)?
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu