Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/01/2013, 14:44
vosk
 
Fecha de Ingreso: agosto-2012
Mensajes: 601
Antigüedad: 11 años, 8 meses
Puntos: 83
Respuesta: Windows API: Crear Menú

En el archivo de recursos debes añadir la cabecera de windows.h y en la declaracion de clase ventana debes asignar el nombre del menu al campo lpszMenuName o hacerlo tal como lo tienes en la funcion de crear ventana:

Código:
#include <windows.h>
#include "Menu.hpp"

Menu MENU
BEGIN
    ...
END


//en la declaracion de clase ventana
wincl.lpszMenuName = "Menu";

//o tal como lo tienes
hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           szClassName,         /* Classname */
           "Code::Blocks Template Windows App",       /* Title Text */
           WS_OVERLAPPEDWINDOW, /* default window */
           CW_USEDEFAULT,       /* Windows decides the position */
           CW_USEDEFAULT,       /* where the window ends up on the screen */
           544,                 /* The programs width */
           375,                 /* and height in pixels */
           HWND_DESKTOP,        /* The window is a child-window to desktop */
           LoadMenu(hThisInstance,"Menu"),                /* No menu */
           hThisInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );
Saludos
vosk