There's an access violation when you run this. See if you can figure out the
error.

Guess what the cause is?
HINT: It would've been a 2-second fix instead of a 300-second fix, if D
hadn't been so shortsighted and hadn't removed typedef's...

import win32.windows;
void main() {
   auto hwnd = CreateWindow("STATIC", "Hi!", WS_OVERLAPPEDWINDOW |
WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
null, null, null, null);
   BOOL bRet;
   MSG msg;
   while ((bRet = GetMessage(null, &msg, 0, 0)) != 0) {
       if (bRet == -1) { break; }
       else {
           TranslateMessage(&msg);
           DispatchMessage(&msg);
       }
   }
}

Reply via email to