winapi begginer - how can i register a function as a callback to windows events?

Hi, i would like to write a callBack function and register it to different window events (for example move and resize) using the win api.
how can i do that (what api functions whould i use? how should i use them?)

sorry if im not being very accurate, since this is the first actual time im working with the winapi.

thanks!
i don't know if you're looking for this but if think you want to do this:
1
2
3
4
5
6
7
8
9
10
11
12
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
    {
    case WM_SIZE:
        your_function(bla, blub);
        break;
    case WM_MOVE:
        your_function(blub,blub);
        break;
    }
}

if you want to replace a callbackhandler from a button with your own -> SetWindowLong
Topic archived. No new replies allowed.