Ist es möglich, die Prozedur "Probe" per SendMessage für WM_CREATE aufzurufen? Bisher habe ich ohne Erfolg diese Methode ausprobiert.
1 | class CWindow { |
2 | public: |
3 | void OnCreate(); |
4 | static void Probe(); |
5 | }; |
1 | void CWindow::Probe() { |
2 | CWindow wnd; |
3 | MessageBox(wnd.hwnd, "Erfolg!", "Erfolg!", 0); |
4 | } |
5 | |
6 | void CWindow::OnCreate() { |
7 | SendMessage(hwnd, WM_CREATE, 0, (LPARAM)Probe); |
8 | } |