Advertisement

[java] Quit button (WFC)

Started by March 20, 2000 10:44 AM
5 comments, last by Delisk 24 years, 5 months ago
Im using WFC (Windows Fondation Classes)for my game. Things are going well, but i got this small problem. When the player press the quit button (the x in thr corner) i want the program to ask thr players if he really want to quit (with a dialog box). But here my problems, even if he say no the game quit! Can some here tell me how to do this!
Do you have code to show? What does your event listener look like?
Advertisement
WFC doesn''t use event listeners, it uses Microsoft''s own extension to Java called event references. I''ve tried to program with WFC and I got frustrated with it quite fast, so sorry can''t help you out Delisk.

I suggest you get your hands on JBuilder Foundation Edition (available for free from www.borland.com) and start learning JFC/Swing UI library. I think in the long run that will be a better alternative. At least there are tutorials on the web available for that.
-Pasi Keranen
I am curious. Why would anyone use WFC ?
Are you referring to MFC? I''ve never heard of WFC. MFC in and of itself is almost useless for game development. Its tricky to merge MFC and pure Win32 code together (although it can be done).

MFC _is_ however, extremely useful for throwing together tools, editors and various utilities. The learning curve is kind of steep, but that''s mostly because it relies heavily on the C++ paradigm, which I don''t think most (nonprofessional) programmers understand.
Volition, Inc.
C++ has a paradigm? That''s news to me.
Advertisement
daveb--

WFC is the MS version of JFC(Swing), or maybe the MS Java version of MFC... or whatever. In short, it''s a Microsoft specific GUI package. In Visual J++ you can use the form editor to build WFC apps visually, but not AWT/JFC.

This topic is closed to new replies.

Advertisement