Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / wxmenu/wxmenuitem

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. wxmenu/wxmenuitem
#3520
Posted by: casadrag 2004-03-17 20:42:51
i want to creat this
file->
        new->
                  new1
                  new2
                  new3
        open->
                  open1
                  open2
                  open3
        exit     
but i want a code not whit rc

amira6
Message2. Re: wxmenu/wxmenuitem
#3558
Posted by: upCASE 2004-03-23 20:21:14
Hi!
Try with

    menubar = new wxMenuBar();
    SetMenuBar(menubar);

    wxMenu* menu = new wxMenu();
    wxMenu* menu_sub = new wxMenu();
    menu_sub->Append(, wxT("new1"), wxT(""), wxITEM_NORMAL);
    menu_sub->Append(, wxT("new2"), wxT(""), wxITEM_NORMAL);
    menu_sub->Append(, wxT("new3"), wxT(""), wxITEM_NORMAL);
    menu->Append(, wxT("New"), menu_sub, wxT(""));

    wxMenu* menu_sub = new wxMenu();
    menu_sub->Append(, wxT("open1"), wxT(""), wxITEM_NORMAL);
    menu_sub->Append(, wxT("open2"), wxT(""), wxITEM_NORMAL);
    menu_sub->Append(, wxT("open3"), wxT(""), wxITEM_NORMAL);
    menu->Append(, wxT("Open"), menu_sub, wxT(""));
    menu->Append(, wxT("Exit"), wxT(""), wxITEM_NORMAL);

    menubar->Append(menu, wxT("File"));

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2022-12-2  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0