Advertisement

Help with Dialog Boxes

Started by June 04, 2001 03:08 PM
1 comment, last by Ratman 23 years, 8 months ago
Ive spent entirely too long trying to get this to work. I havent touched windows programming (WINAPI) in about 6 months. I just need one lousy function to create a dialog box. I want to put this in my Assert. I want there to be an "ok" and a "Ignore" button. The ignore buttom will make it ignore that assert next frame. I can handle the ignore part, I just need a function that I can call like this: bool doAssertDialog(char* msg); It will return true if they click ignore, and false if they click ok. The char* msg is the message that will appear on the box. The game can (and should) stop while the box is up. I know I can create dialog boxes as resources (msvc++6.0) But I cant seem to make dynamic text. There is a function is MSDN http://msdn.microsoft.com/library/psdk/winui/dlgboxes_8jqx.htm that creates one on the fly, but Im not quite sure how to use it (program crashes when I try to use it, Im not sure what to pass as the 3rd param) If someone can help me I''d be extremely gratefull. I really hate WINAPI stuff, I just need this one function. Thanks a lot. --------------- Ratfest.org
  switch MessageBox(hWnd, "My Code Sucks", "Bad shit''s afoot", MB_ABORTRETRYIGNORE){case IDOK://press-onbreak;case IDIGNORE://don''t even tell me about this assert againbreak;case IDABORT://break_asm{int3};break;default://damn, even the assert is messed up_asm{int 3};}  


Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
great that worked, but the program crashes whenever I click a button.... is there something else I need to add?

---------------
Ratfest.org

This topic is closed to new replies.

Advertisement