• Advertisement

Archived

This topic is now archived and is closed to further replies.

01.03 - Comments and Suggestions

This topic is 5241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Dragon Shadow-X: WARNING: you won''t be able to use Win32 menus for full-screen DirectX games...

  1. Go to File|New and create a new resource script

  2. Right-click on the name of the script that appears in the main window, and select Insert Menu

  3. Double-click on the menu location you wish to edit. Popups open new menus, and therefore don''t have IDs. Name the popup File and you''ll see a new entry below it appear

  4. Double-click the new entry (below File) and enter an ID and caption (i.e. New...)

  5. Save your script file, and make sure that you include RESOURCE.H in your other project files (that use resources)


Depending on whether or not you use MFC, you''ll either process menu commands via your Window Procedure (Win32) or through a message map (MFC). Details on command messages for both can be found in the online help.

Is that what you were looking for?

Teej

Share this post


Link to post
Share on other sites
Advertisement
Heard about your trouble with hosting, I would suggest trying freedom2surf, I''ve been using their free hosting for about a year, and their servers have always worked fine for me. Plus, you don''t get any annoying banners or popups on your site. Good luck.

------------------
It''s me again!

Share this post


Link to post
Share on other sites
Thanks a lot Teej! Now I just need to know how to attach that menu to my window. [the ways the 2 books I have on it don''t work and I can''t seem to find it in the online help for VC++]

Direct X 7 in 24hrs:
window.lpszMenuNam = MAKEINTRESOURCE(IDR_MENU1);
I do this and no errors but I get a window with no menu.

Game Programming for Dummies[teaches DX 5 though]:
they say make menu in a text file and attach it like this:

CreateWindow(......,LoadMenu(hInstance, "MYMENU"),....);

Which I don''t understand either and doesn''t work even when I copy everything they did exactly!

Also a question about ID''s. When I tried to make "E&xit" they had several name id''s already there, IDCLOSE, got my attention. But then windows didn''t recognize it until I #defined it and gave it a number. If I want to make my own ID like ID_EXIT or something do I #define it in the resource header myself and then fill the name "ID_EXIT" in under "ID:" when I''m making a menu under the graphical interface?

P>S>Yeah I knew I wouldn''t be able to make a menu for a full screen dx application. I''m experimenting with windowed programs. Will you ever be covering those? I''d like to make a game that can run full screen or in a window on the desktop.

Share this post


Link to post
Share on other sites
When I do menus they seem to work, what I do is name them as a string, with qoutes around the resource name and specify that in wc.lpszMenuName, but MAKEINTRESOURCE should work if you havent used quotes.
I think the answer to your problem is also the answer to your second problem, visual c++ does make defines for all the integer values (menu name, and all the commands) and it plonks them in a header file for you. Just add #include "resource.h" at the top, and it should work fine.

Share this post


Link to post
Share on other sites
Well since no one[not the guy who posted after me or Teej] is responding to my e-mails I''ll post here:

Can anyone explain to me what he means by "what I do is name them as a string, with qoutes around the resource name and specify that in wc.lpszMenuName, but MAKEINTRESOURCE should work if you havent used quotes." How does one name their menu as a string/or use MAKEINTRESOURCE?

I''m a COMPLETE newbie when it comes to menus. Can ANYONE give me an example of how they name their menu and how to attach it to the window? I''m soooo close to making a windowed app but none of the resources I have is any help with menu''s!!

Any help will be SERIOUSLY appreciated!

Shadow Dragon-X

Share this post


Link to post
Share on other sites
Sorry I didn''t reply sooner, I was away on holiday. I just read the sentance that I posted and it just confuses me too.

What you do to make a menu:
1) design it

2) in the resource view on the left name the resource "Menu" or something like that with the qoutes, or MENU.

3) add to the top of the file: #include "rosource.h" - this has all the constants for the menu name / selections etc.

4) when you are setting up your window class add:
wc.szMenuName = "Menu"
or
wc.szMenuName = MAKEINTRESOURCE(MENU)
depemnding on how you named it in step 2

5) in the message handler (WndProc) when you are interpreting the message (in the switch(msg) section) add:

case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_FILE_NEW: // the ID for the menu item
// add your code for this menu item here
break;
case default:
break;
}

I realise that I may have gone on a bit, but I thought that I might as well be complete to help other people in the forum

Share this post


Link to post
Share on other sites
Shadow Dragon-X I dont know if you're still confused about menus but if you are, I highly recommend the tutorial on:

http://www.winprog.org/

It is simply the best tutorial on basic windows programming in C++,it will explain to you intirely about MAKEINTRESOURCE. It may not cover any Direct-X but I think it will clear up alot of confusion for you.

You can also try the tutorials on:

http://spiff.tripnet.se/~iczelion/

But all though they cover alot of details with standard windows programming, they are in assembaly language and could easilly confuse you further. *I only recommend you use this as a last choice alternative, if you are still stuck (Or know assembaly)*


Crash,


We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success

Edited by - crash on August 26, 2001 7:31:10 AM

Share this post


Link to post
Share on other sites
Great Job!

But I can''t find the second set(5+) of the tutorials... are they on this forum? A different page? Well I''ll keep looking, but I can''t find them anywhere.

Share this post


Link to post
Share on other sites
Kaezin,

The 5+ tutorials were removed a few days ago. I guess TeeJ removed them to save making the forum too big. Unfortunately I have just got back from a long break, and have also missed them so TeeJ if you''re reading this, Im another member who would like to see those tutorials back again.

Crash,



We Must Move Forwards NOT Backwards, Sideways NOT Forwards And Always Twirling Twirling Towards Success

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Can''t way for next topics... Hope they''ll be back soon. won''t they, Teej??

Share this post


Link to post
Share on other sites
The new topics are back up! Just click on page 2 at the bottom of the forum

Share this post


Link to post
Share on other sites
Here''s a suggestion, which most may take with a grain of salt. Now, I understand Teej''s game projects are both to do a game and to learn while doing it, but how about a section where any user could propose a game project, people could join said project, and could then learn through that? I know there are people on many different programming levels, but if a project is solid enough, even the most novice programmer could chip in a few lines or so if the project leader is good enough. What do other people think of something like this? It''d be for learning purposes only, of course, no pay, and don''t expect to be paid, but it could be great experience for a lot of people, if anyone still checks these forums, that is.

Piotyr
Software Engineer by day, Game developer by night

The early bird may get the worm, but the second mouse gets the cheese.

Share this post


Link to post
Share on other sites
i think that is a great idea Piotyr
would be of great help for alot of the less experienced programmers (myself included) to feel a part of a project that would be out of reach for the indivdual i dont know if i would be out of bounds to start a new topic but if one is created you can garentee ill be posting in it

asylum in cali

Share this post


Link to post
Share on other sites
You rock Teej,

Thanks for the great tutorials. You''ve helped many aspiring people.


Thanks,

-- Darin

Share this post


Link to post
Share on other sites
Keep the flow of DirectX and Win32 flowing please. You can never know enough of DirectX and Win32.

-joe

Defending the Free World, One Electron at a Time.

URL: http://www.zeroxfour.com *Site Under Construction*

*Stationed Currently in Iwakuni, Japan.*

Share this post


Link to post
Share on other sites
good on ya teej!
appreciate the opportunity to persue what i love most
you deserve a lot of credit mate
good luck, and may our paths cross oneday

Share this post


Link to post
Share on other sites
hey i wonder something!
Teej are we gonna make a D3D app or another DD app next project?
I would really like to do both (i know. you are only person).

maybe now would be a good time for everyone to say what we should learn next very involved (and complicated: physics, AI, alpha blending(?)) 2D game, a 3D rendered 2D game, a 3D game or a mod?

drop the line

Knowledge is what you learn, wisdom is how you apply it.






find your element
at mutedfaith.com.
<º>

Share this post


Link to post
Share on other sites
Hello! I am a newbie here and I need some help. Where can I found a great tutorial for D3D 8s alpha blending?

Share this post


Link to post
Share on other sites
Teej,

Just wanted to say a big, "Thank you!", for helping so many aspiring games programmers, on the road to fulfilling their dreams.

--hellz

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Will any one be doing a c#/Direct3D(9.0) that is what i want.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi,my name is AlexZander and am currently creating a mod for Quake 1,(I''m going to put a vehicle in it like a Warthog!) but first I need to learn C++ sooo....
could anyone direct me to C++ turtoiral like this-a-one?
Thanx, and...
Great Job!
Boo-yah!

Share this post


Link to post
Share on other sites

  • Advertisement