[WINAPI] Window in D

Phil Lavoie maidenphil at hotmail.com
Fri Dec 28 08:36:36 PST 2012


On Friday, 28 December 2012 at 16:25:30 UTC, Phil Lavoie wrote:
>> Ouch! What does this function return? Shouldn't typeof(return) 
>> be LRESULT?
>>
>> extern(Windows):
> What he says is good, but I believe you should add nothrow to 
> that:
> extern( Windows ) nothrow:
>> LRESULT WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM 
>> lParam)
>> {
>> switch (message)
>> {
>>    case WM_DESTROY:
>>        PostQuitMessage (0);
>>        break;
>>    default:
>>       break;
>> }
>>
>> return DefWindowProcA (hwnd, message, wParam, lParam);
>> }

haha! Never mind that I did not realized the thread was started 
that long ago!


More information about the Digitalmars-d-dtl mailing list