Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Strange thing about RegisterClass: the lpfnWndProc property of WNDCLASS struct #1

@Meigyoku-Thmn

Description

@Meigyoku-Thmn

At here https://github.com/thpatch/win32_utf8/blob/master/src/user32_dll.c#L45
I find it's very strange that you just copy the lpfnWndProc without doing anything more.
A WindowProc callback can receive certain messages (such as WM_CREATE) which have string in lParam or wParam.
So if we pass a WindowProc to RegisterClassW, then it can receive wide character string.
But the WindowProc itself is programmed to handle only ANSI string (or Multibyte string). So how can it work properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions