Ich bin total verblödet
-
ich habs nu:
LRESULT CALLBACK WindowProcedure (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { LPFINDREPLACE fr; switch (message) /* handle the messages */ { case WM_CREATE: { ... break; } case WM_COMMAND: { switch (LOWORD (wParam)) { case mSEARCH: /* Suchfenster öffnen */ { if (fr != NULL) delete fr; try { fr = new FINDREPLACE; } catch (...) {} if (fr == NULL) MessageBox (hWnd, "Fehler", "", MB_OK); // Initialize FINDREPLACE fr->lStructSize = sizeof(FINDREPLACE); fr->hwndOwner = hWnd; fr->lpstrFindWhat = szFindWhat; fr->wFindWhatLen = 80; fr->Flags = 0; hSearch = FindText(fr); break; } case mSEARCHAGAIN: /* Suchen */ { break; } default: break; } break; } case WM_DESTROY: { PostQuitMessage (0); /* send a WM_QUIT to the message queue */ break; } default: /* for messages that we don't deal with */ return DefWindowProc (hWnd, message, wParam, lParam); } return 0; }