If you can get LUA running, then I would suggest doing all of your GUI widgets (which is what a menu is comprised of) in Lua, and let them handle all of the "if mouseX< 98484" logic and event handling. In my games, I just pass pertinent render code from Lua to C++ so it can communicate with OpenGL - C++ itself has no idea how or what a widget does, it knows only how to pass it a generic event structure and how to get back render data. Completely rewriting a menu is a snap at this point, as is adding new widgets or changing their behavior. Also remember to compartmentalize your data into objects as it will save you quite a bit of frustration, and make this sort of thing much simpler in the long run.
---Edit---
1) Be sure you give your CPU a rest in those while loops, unless you want your game to eat as much processor as it can get its hands on in nothing more than a menu. SFML has a delay or sleep function, add that at the end of your loop. It's not necessary, but I find it to be a nice gesture for those that run multiple applications.
2) Make sure the coordinates correspond to what you're expecting. When I first started, I didn't pay attention to the orientation of coordinate systems (naively assuming they'd all use the "standard" one in math text books). The button may be working, but not in the region you think the coordinates describe.
3) Without a debugger, finding crashes is a pain. I would suggest you get familiar with a debugger. Still, if you're into hackish style coding, you can comment out every line and test the application, uncommenting line by line until you find the line that prompts the crash (or, if you're familiar with "binary searching" you can use that rather than brute force...). But get a debugger.
4) I generally avoid while loops, except the main loop (there are appropriate places for them, but I don't think a menu is one). What happens if you get a WMQUIT message during that while loop? Your program looks to windows like its not responding. There are also a host of other events that ought to be handled. Instead of a while loop, implement a finite state machine.
while (game_is_running){
switch(game_current_state){
case MENU:
gameMenu();
break;
case GAME:
gamePlay();
break;
}
}That's ugly, but an example of what I mean. No more while loop, and you can handle events before, after, or even during these function calls.