Window created with Windows API is not visible

solidstate1991 laszloszeremi at outlook.com
Sat Jun 18 23:00:36 UTC 2022


On Saturday, 18 June 2022 at 22:46:45 UTC, rikki cattermole wrote:
> registeredClass.style = 32_769;
>
> Don't use an integer like that, stick with bit wise ors.
>
>
>
> LPCWSTR classname = toUTF16z(name);
>
> GC owned memory, that could result in surprises.
>
>
>
> const LPWSTR windowname = toUTF16z(title);
>
> Ditto
>
>
>
> I'm not sure your window callback procedure is right.
>
> For instance you are not calling DefWindowProc, and you are not 
> handling WM_PAINT in any form.
>
>
>
> But one other thing, your approach to the event loop is going 
> to come back to bite you at some point. Windows is based around 
> a push event loop model, not a pull like other system Windowing 
> libraries (such as X11). It can get recursive. I learned this 
> one the hard way.

Well, it seems like my window callback wasn't right. Now at least 
I get whiteness instead of nothing. This is going to be a long 
match.


More information about the Digitalmars-d-learn mailing list