Results 1 to 2 of 2

Thread: resource files???

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2001
    Location
    USA
    Posts
    1,026

    resource files???

    I have a menu in a resource file named simpmenu.rc

    How do I use this resource file to impliment my menu in my program???


    Any help would be appreciated!

    THanx,

    ~Squirrelly1
    Now happily married and still crankin' away at the keyboard. Life is grand for a coder, no?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    VC++ creates a resource.h file that you nee3d to include everywhere you want to use the menu. then there are two ways:

    1) When initializing the WNDCLASS(EX) struct:
    wc.szMenuName = MAKEINTRESOURCE(IDM_MYMENU);
    IDM_MYMENU is whatever ID you assigned to your menu.

    2)
    Code:
    HMENU hMenu = LoadMenu(hInstance, MAKEINTRESOURCE(IDM_MYMENU));
    CreateWindow(..., hMenu, ...);
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width