MFC
CFileDialog::GetOFNã§ãOPENFILENAMEæ§é ä½ãåå¾ãããCFileDialog ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã¯ãããããã Item1-2ãæ¼ãã¨ãItem1-2ãæ¼ãã¨ã "ååãä»ãã¦ä¿å"ãªã®ã§"test2.txt"ã¨æå®ã"ååãä»ãã¦ä¿å"ãªã®ã§"test2.txt"ã¨æå®ãâ¦
CFileDialogã¯ãã¡ã¤ã«é¸æãã¤ã¢ãã°ã¯ã©ã¹ãCFileDialog ã¯ã©ã¹ | Microsoft Learnã³ã³ã¹ãã©ã¯ã¿ã®ç¬¬1å¼æ°ãFALSEã ã¨"ååãä»ãã¦ä¿å"ãã¤ã¢ãã°ã«ãªãã resource.hã¯ãID_ITEM_1_2ã追å ã CFileDialog.rcã¯ãItem1-2ã追å ã CFrameWnd_.hã¯ãOnUpdâ¦
MFCã§ã¯ãCFileDialog::DoModalã§ããã¡ã¤ã«é¸æãã¤ã¢ãã°ã表示ãããCFileDialog ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãOnItem1_1ã§ãCFileDialogã®ã³ã³ã¹ãã©ã¯ã¿å¼æ°ã®æåãTRUEã«ããã¨ã"ãã¡ã¤ã«ãéã"ãã¤ã¢ãã°ã¨ãã¦è¡¨ç¤ºãããã Item1-1â¦
CMenu::DeleteTempMapã§ãCMenu::FromHandleã®æã«ä½æãããä¸æãªãã¸ã§ã¯ãããããåé¤ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãããããã¨ã ãã®æç¹ã§ãã³ãã«ã¯ããããã®æç¹ã§ãã³ãã«ã¯ããã ããã¾ã§è¡ãã¨ãããã¡ãã¥ã¼ãã³ãâ¦
ã¡ãã¥ã¼ã®ã©ã¸ãªé ç®ã«ãã§ãã¯ãä»ããã«ã¯ãCMenu::CheckMenuRadioItemã使ããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã Item1-2ãæ¼ãã¨ãItem1-2ãæ¼ãã¨ã ãã§ãã¯ãä»ãããã§ãã¯ãä»ããSample/mfc/CMenu/CheckMenuRadioItem/srâ¦
é ç®IDã®é£ç¶ããç¯å²ã1ã¤ã®ãã³ãã©é¢æ°ã«ãããããã«ã¯ãON_COMMAND_RANGEã使ããã¡ãã»ã¼ã¸ ããã ãã¯ã (MFC) | Microsoft Learnã¡ãã¥ã¼ã®ã©ã¸ãªé ç®ã¨ãã®ã¤ãã³ããæ¾ãæã¯ããã使ãã CFrameWnd_.hã¯ãã¨ããã CFrameWnd_.cppã¯ãã¨ããã â¦
CMenu::CheckMenuItemã§ãæå®ã®ã¡ãã¥ã¼é ç®ã«ãã§ãã¯ãä»ãããå¤ãããã§ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãã¨ã ãã§ãã¯ãä»ãã¦ãã¾ãæ¼ãã¨ããã§ãã¯ãä»ãã¦ãã¾ãæ¼ãã¨ã ãã§ãã¯â¦
CMenu::GetMenuStateã§ãã¡ãã¥ã¼é ç®ã®ç¶æ ãåå¾ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.hã¯ãã¨ããã CFrameWnd_.cppã¯ãã¨ããã Item1-4æ¼ãã¨ãItem1-4æ¼ãã¨ã ãããåºã¦ããããåºã¦ã ãããåºã¦ããããåºã¦ã ãããåºãããããåºãâ¦
CMenu::ModifyMenuã§ãã¡ãã¥ã¼é ç®ã®ããã¹ããæå®ããæååã«æ´æ°ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã¨ã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãã¨ã ãããªãããããªããSample/mfc/CMenu/ModifyMenu/src/CMenu at master · bg1bâ¦
CMenu::GetMenuStringã§ãæå®ã®é ç®ã®ããã¹ããåå¾ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã æ¼ããããæ¼ãããã ãããªãããããªããSample/mfc/CMenu/GetMenuString/src/CMenu at master · bg1bgst333/Sample · GitHub
CMenu::GetMenuItemIDã§ãæå®ä½ç½®ã®é ç®IDãåå¾ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãã¨ã 0çªç®ã®é ç®IDã¯ID_ITEM_1_1ã¨åã0çªç®ã®é ç®IDã¯ID_ITEM_1_1ã¨åããSample/mfc/CMenu/GetMenuItemIâ¦
CMenu::GetMenuItemCountã§ãã¡ãã¥ã¼é ç®æ°ãåå¾ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãã¨ã é ç®æ°ã¯4ãé ç®æ°ã¯4ãSample/mfc/CMenu/GetMenuItemCount/src/CMenu at master · bg1bgst333/Samplâ¦
CMenu::GetDefaultItemã§ãã©ããæ¢å®ã®ã¡ãã¥ã¼é ç®ããå¤å®ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãã¨ããã ãã®ã¾ã¾Item1-3ãæ¼ãã¨ããã®ã¾ã¾Item1-3ãæ¼ãã¨ã æ¢å®ã®é ç®ããªãã®ã§ãããªããæ¢å®ã®é ç®ããªãã®ã§ãããªãã Item1-1â¦
CMenu::SetDefaultItemã§ãæ¢å®ã®ã¡ãã¥ã¼é ç®ã«ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãItem1-1ãæ¼ãããããItem1-2ãæ¢å®ã®é ç®ã«ããã æ¼ããããæ¼ãããã æ¢å®ã®é ç®ã®ç¹å¾´ã§ãã太åã«ãªããããªãã§æååéä¸ã§åãããã ããæ¢â¦
CMenu::EnableMenuItemã§ãã¡ãã¥ã¼é ç®ã®æå¹åããç¡å¹åããã°ã¬ã¼ã¢ã¦ããã»ãããããCMenu ã¯ã©ã¹ | Microsoft Learn EnableMenuItem: æ¥ã é¡resource.hã¯ãé ç®4ã¤ã CMenu.rcã¯ãããããã CFrameWnd_.hã¯ããããã¦ãCFrameWnd_.cppã¯ããããããâ¦
CMenu::DeleteMenuã§ã¡ãã¥ã¼é ç®ãåé¤ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãItem1-3ãæ¼ããããã1çªç®ãåé¤ã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãã¨ã Item1-2ãæ¿å ¥ãããã®ã§ãItem1-3ãæ¼ãã¨ãItem1-2ãæ¿å ¥ãããã®ã§ãItem1-3ãæ¼â¦
CMenu::InsertMenuã§ãã¡ãã¥ã¼é ç®ãæ¿å ¥ãããCMenu ã¯ã©ã¹ | Microsoft Learnresource.hã¯ãID_ITEM_1_1ããID_ITEM_1_3ã®3ã¤ã CMenu.rcã¯ãããã©ã«ã表示ã¯ãItem1-1ã¨Item1-3ã CFrameWnd_.hã¯ãItem1-1ããItem1-3ã¾ã§ã®ãã³ãã©ã CFrameWnd_.cppã¯â¦
CMenu::GetSubMenuã§ããµãã¡ãã¥ã¼ãåå¾ãããCMenu ã¯ã©ã¹ | Microsoft Learnresource.hã¯ãID_ITEM_1_2ã ãå¢ããã CWinApp_.cppã¯ãLoadFrameã§IDM_MAINMENUããã¼ãã CFrameWnd_.hã¯ãOnUpdateItem1_2ããOnItem1_2ã追å ã CFrameWnd_.cppã¯ãOnIteâ¦
CMenu::CreatePopupMenuã§ããããã¢ããã¡ãã¥ã¼(ãµãã¡ãã¥ã¼)ãä½æãããCMenu ã¯ã©ã¹ | Microsoft Learnresource.hã¯ãã¡ãã¥ã¼å·®ãæ¿ãå¾ã¯9ã¤ã®é ç®ã CMenu.rcã¯ãæåã¯Item1-1ã ãã CFrameWnd_.hã¯ããããã¢ããã¡ãã¥ã¼ã¯ã¡ã³ãã¼ã¨ãã¦æã£ã¦â¦
CWnd::DrawMenuBarã§ãã¡ãã¥ã¼ãã¼ãæç»ãããCWnd ã¯ã©ã¹ | Microsoft LearnCWinApp_.cppã¯ãpFrameWnd_->LoadFrameã§IDM_MAINMENUããã¼ãã CFrameWnd_.cppã¯ã // ãã³ãã©OnItem1_1() void CFrameWnd_::OnItem1_1(){ // ã¡ãã¥ã¼é ç®Item1_1ã®ã³ãã³â¦
CMenu::Detachã§ãã¡ãã¥ã¼ãã³ãã«ã¨CMenuãªãã¸ã§ã¯ãã®ç´ä»ãã解é¤ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ã // ãã³ãã©OnItem1_1() void CFrameWnd_::OnItem1_1(){ // ã¡ãã¥ã¼é ç®Item1_1ã®ã³ãã³ããã³ãã© // ã¡ãã¥ã¼é ç®ã®è¿½å . Câ¦
CMenu::Attachã§ãã¡ãã¥ã¼ãã³ãã«ã¨CMenuãªãã¸ã§ã¯ããç´ä»ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ããããã£ãå ´åã¯ãDetachã¯ä¸è¦ã ç ´æ£ããåæã¨ããã®ãããããcMenu.DestroyMenuã®ä¸ã§Detachãã¦DestroyMenuãã¦m_hMenuã¯NULLã«â¦
CMenu::FromHandleã§ãã¡ãã¥ã¼ãã³ãã«ããCMenuãªãã¸ã§ã¯ããã¤ã³ã¿ãåå¾ãããCMenu ã¯ã©ã¹ | Microsoft LearnCWinApp_.cppã¯ãCFrameWndã«ã¯ãm_hMenuDefaultã¨ããããã©ã«ãã¡ãã¥ã¼ãã³ãã«ã®ã¡ã³ããããããLoadFrameãããªãã¨ã»ãããããªãã â¦
CWnd::Detachã§ãCWndãªãã¸ã§ã¯ãã¨ã¦ã£ã³ãã¦ãã³ãã«ã®ç´ä»ãã解é¤ãããCWnd ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ãçµå±ãã¡ã³ãã«ããªãã¦ãããã¼ã«ã«ãªãã¸ã§ã¯ãã§Attachãã¦ãæä½ãã¦ãDetachããã°ããã Item1-1ãæ¼ãã¨ãItem1-1ãæ¼ãâ¦
CWnd::Attachã§ãCWndãªãã¸ã§ã¯ãã«ã¦ã£ã³ãã¦ãã³ãã«ãç´ä»ãããCWnd ã¯ã©ã¹ | Microsoft Learnããã§ãæä½ã§ãããã¹ã³ã¼ããæããã¨ç ´æ£ãããã®ã§æ³¨æããªãã¨ãããªãã åã¦ã£ã³ãã¦ã¯ã©ã¹CChildWndãå®ç¾©ã CChildWnd.hã¯ãCChildWnd.cppã¯ãã¨â¦
CWnd::FromHandleã§ãã¦ã£ã³ãã¦ãã³ãã«ããCWndãªãã¸ã§ã¯ããã¤ã³ã¿ãä¸æçã«åå¾ã§ãããCWnd ã¯ã©ã¹ | Microsoft LearnCWinApp_.cppã§ãã¦ã£ã³ãã¦ã¯ã©ã¹ã«ã¡ãã¥ã¼ãªã½ã¼ã¹æå®æã CFrameWnd_.hã§ãã¡ã³ãã«åã¦ã£ã³ãã¦ãã³ãã«m_hChildã追å ã CFâ¦
CMenu::LoadMenuã§ãã¡ãã¥ã¼ãªã½ã¼ã¹ããã¼ããããCMenu ã¯ã©ã¹ | Microsoft LearnCWinApp_.cppã§ãã¡ãã¥ã¼ãªã½ã¼ã¹æå®ãªãã CFrameWnd_.hã¯ãOnPaintã追å ã CFrameWnd_.cppã¯ãä»åããON_WM_PAINTãã¯ãã¨OnPaintãã³ãã©ã§ç¡çç¢çèµ·ç¹ãä½ã£ã¦ãCâ¦
CMenu::DestroyMenuã§ãã¡ãã¥ã¼ãç ´æ£ãããCMenu ã¯ã©ã¹ | Microsoft LearnCFrameWnd_.cppã§ããããã風ã«æ¸ããã¨ãã§ããã Item1-1ãæ¼ãã¦ãItem1-1ãæ¼ãã¦ã Item2ã«å·®ãæ¿ãããItem2ã«å·®ãæ¿ãããSample/mfc/CMenu/DestroyMenu/src/CMenu at masâ¦
CWnd::SetMenuã§ãã¦ã£ã³ãã¦ã«ã¡ãã¥ã¼ãã»ãããããCWnd ã¯ã©ã¹ | Microsoft LearnCWinApp_.cppã§ãã¾ãã¦ã£ã³ãã¦ã¯ã©ã¹ã«ã¡ãã¥ã¼ãªã½ã¼ã¹ãæå®ã CFrameWnd_.hã§ãCMenuãªãã¸ã§ã¯ããã¤ã³ã¿m_pMenuãç¨æã CFrameWnd_.cppã§ãCFrameWnd_::OnItem1_1â¦
CMenu::CreateMenuã§ãã¡ãã¥ã¼ãä½æãããCMenu ã¯ã©ã¹ | Microsoft Learnresource.hããå¾®å¦ã«å¤ãã¦ãã ã¡ãã¥ã¼ãã®ãã®ã®IDã¯100, 110, 120ã¨ããã»ããããããªãã§ããã100ã¨ã許ããããããªã CWinApp_.cppã¯ãã¦ã£ã³ãã¦ä½ææã«ã¡ãã¥ã¼ãæå®â¦