Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use NativeCall;
- class WindowClass is repr('CStruct') {
- has uint32 $.style;
- has &.lpfnWndProc(OpaquePointer, uint32, uint32, uint32);
- has int32 $.cbClsExtra;
- has int32 $.cbWndExtra;
- has OpaquePointer $.hInstance;
- has OpaquePointer $.hIcon;
- has OpaquePointer $.hCursor;
- has OpaquePointer $.hbrBackground;
- has Pointer[int16] $.lpszMenuName;
- has Pointer[int16] $.lpszClassName;
- sub RegisterClass(WindowClass) returns int32 is native('user32') is symbol('RegisterClassW') { * }
- method Register() { RegisterClass(self) }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement