main_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
           if (msg->message == WM_BUTTON_1_UP, WM_BUTTON_2_UP)
{
  ...
}

main_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
           if (msg->message == WM_CHAR)
{
  ...
}

main_wnd_proc (pstruct -w reply, p_program_state -&w state, p_msg msg)
           if (msg->message == WM_PAINT)
{
  ps = begin_paint (msg->window);
  ...
}
/
{    
  free (&ps);
}
