• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CheckMenuItem函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CheckMenuItem函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckMenuItem函数的具体用法?C++ CheckMenuItem怎么用?C++ CheckMenuItem使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CheckMenuItem函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SetDynamicConsole

void SetDynamicConsole() {
  CheckMenuItem(vmPrefsMenu, ID_DYNAMICCONSOLE, MF_BYCOMMAND | 
		(fDynamicConsole ? MF_CHECKED : MF_UNCHECKED));
  WritePrivateProfileString(U_GLOBAL,TEXT("DynamicConsole"),
			    fDynamicConsole ? U_ON:U_OFF,squeakIniName);
}
开发者ID:OpenSmalltalk,项目名称:opensmalltalk-vm,代码行数:6,代码来源:sqWin32Prefs.c


示例2: switch

LRESULT main_window::onCommand(UINT uMsg, WPARAM wParam, LPARAM lParam)
{  
  unsigned long params[2] = { 0, 0 };

  switch(LOWORD(wParam))
  {
    case ID_FILE_EXIT:
      ExitProcess(0);
    break; 
    case ID_FILE_OPEN:
    {
      char fileName[MAX_PATH] = "";
      FileOpenBox("NSD Files (*.nsd)\0*.nsd\0All Files (*.*)\0*.*\0", fileName, false);
      params[0] = (unsigned long)fileName;
      SendMessageRoot(MSG_LOAD_NSD, (WPARAM)0, (LPARAM)params);
    }
    break;
  }
  
  switch(LOWORD(wParam))
  {
    case ID_GOOL_STEP:
    {
      //SendMessage(objhWnd, WM_ACTIVATE, 0, 0);
      //resumeGoolSystem();
    }
    break;
    case ID_VIEW_OCTREE:
    {
      if (menu_flags[0] = (!menu_flags[0]))
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_OCTREE, MF_CHECKED);
      else
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_OCTREE, MF_UNCHECKED);
      
      SendMessageRoot(CPM_VISUAL_ZONE_TOGGLE_OCTREES, (WPARAM)0, (LPARAM)params);
    }
    break;
    
    case ID_VIEW_CAMERA_MODELMODE:
    {
      menu_flags[4] = true;
      
      CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_MODELMODE, MF_CHECKED);
  
      if (menu_flags[5] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_FLIGHTMODE, MF_UNCHECKED);
       if (menu_flags[7] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_CRASHMODE, MF_UNCHECKED);
        
      menu_flags[5] = false;
      menu_flags[6] = false;
      menu_flags[7] = false;
    
      params[0] = 0;
      SendMessageRoot(CPM_CAMERA_SELECT, (WPARAM)0, (LPARAM)params);
    }
    break;
    case ID_VIEW_CAMERA_FLIGHTMODE:
    {
      menu_flags[5] = true;
      
      CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_FLIGHTMODE, MF_CHECKED);
  
      if (menu_flags[4] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_MODELMODE, MF_UNCHECKED);
      if (menu_flags[7] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_CRASHMODE, MF_UNCHECKED);
        
      menu_flags[4] = false;
      menu_flags[6] = false;
      menu_flags[7] = false;
    
      params[0] = 1;
      SendMessageRoot(CPM_CAMERA_SELECT, (WPARAM)0, (LPARAM)params);
    }
    break;
    case ID_VIEW_CAMERA_CRASHMODE:
    {
      menu_flags[7] = true;
      
      CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_CRASHMODE, MF_CHECKED);
  
      if (menu_flags[4] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_MODELMODE, MF_UNCHECKED);
      if (menu_flags[5] == true)
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMERA_FLIGHTMODE, MF_UNCHECKED);

      menu_flags[4] = false;
      menu_flags[5] = false;
      menu_flags[6] = false;
    
      params[0] = 2;
      SendMessageRoot(CPM_CAMERA_SELECT, (WPARAM)0, (LPARAM)params);
    }
    break;
    
    case ID_VIEW_CAMPTH:
    {
      if (menu_flags[1] = (!menu_flags[1]))
        CheckMenuItem(GetMenu(hFrame), ID_VIEW_CAMPTH, MF_CHECKED);
//.........这里部分代码省略.........
开发者ID:wurlyfox,项目名称:crashutils,代码行数:101,代码来源:main_window.cpp


示例3: initmenu

static void initmenu()
{
        char t[512];
        HMENU hmenu = GetMenu(ghwnd);

        CheckMenuItem(hmenu, IDM_DISC_WPROT_0, (writeprot[0])     ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_DISC_WPROT_1, (writeprot[1])     ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_DISC_WPROT_D, (defaultwriteprot) ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_DISC_VDFS_ENABLE, (vdfs_enabled) ? MF_CHECKED : MF_UNCHECKED);

        CheckMenuItem(hmenu, IDM_TUBE_6502 + selecttube, MF_CHECKED);
        CheckMenuItem(hmenu, IDM_MODEL_0   + curmodel,   MF_CHECKED);

        if (vid_scanlines)      CheckMenuItem(hmenu, IDM_VIDEO_SCANLINES,  MF_CHECKED);
        else if (vid_interlace) CheckMenuItem(hmenu, IDM_VIDEO_INTERLACED, MF_CHECKED);
        else if (vid_linedbl)   CheckMenuItem(hmenu, IDM_VIDEO_SLINEDBL,   MF_CHECKED);
        else if (vid_pal)       CheckMenuItem(hmenu, IDM_VIDEO_PAL,        MF_CHECKED);
        else                    CheckMenuItem(hmenu, IDM_VIDEO_LINEDBL,    MF_CHECKED);

        if (sound_internal) CheckMenuItem(hmenu, IDM_SOUND_INTERNAL, MF_CHECKED);
        if (sound_beebsid)  CheckMenuItem(hmenu, IDM_SOUND_BEEBSID,  MF_CHECKED);
        if (sound_music5000) CheckMenuItem(hmenu, IDM_SOUND_MUSIC5000, MF_CHECKED);
        if (sound_ddnoise)  CheckMenuItem(hmenu, IDM_SOUND_DDNOISE,  MF_CHECKED);
        if (sound_tape)     CheckMenuItem(hmenu, IDM_SOUND_TAPE,     MF_CHECKED);

        CheckMenuItem(hmenu, IDM_SOUND_FILTER, (sound_filter) ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_WAVE_SQUARE + curwave, MF_CHECKED);

        CheckMenuItem(hmenu, IDM_SID_TYPE   + cursid,    MF_CHECKED);
        CheckMenuItem(hmenu, IDM_SID_INTERP + sidmethod, MF_CHECKED);

        CheckMenuItem(hmenu, IDM_DDT_525 + ddnoise_type,     MF_CHECKED);
        CheckMenuItem(hmenu, (IDM_DDV_33 + ddnoise_vol) - 1, MF_CHECKED);

        CheckMenuItem(hmenu, IDM_TAPES_NORMAL + fasttape, MF_CHECKED);

        CheckMenuItem(hmenu, IDM_TUBES_4 + (tube_6502_speed - 1), MF_CHECKED);

        CheckMenuItem(hmenu, IDM_VIDEO_NOBORDERS + vid_fullborders, MF_CHECKED);

        append_filename(t, exedir, "roms\\tube\\ReCo6502ROM_816", 511);
        if (!file_exists(t, FA_ALL, NULL)) EnableMenuItem(hmenu, IDM_TUBE_65816, MF_GRAYED);

        if (keyas)     CheckMenuItem(hmenu, IDM_KEY_AS, MF_CHECKED);

        if (mouse_amx) CheckMenuItem(hmenu, IDM_MOUSE_AMX, MF_CHECKED);

        CheckMenuItem(hmenu, IDM_SCSI_ENABLE, scsi_enabled ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_IDE_ENABLE, ide_enable ? MF_CHECKED : MF_UNCHECKED);

        CheckMenuItem(hmenu, IDM_VIDEO_RESIZE, (videoresize) ? MF_CHECKED : MF_UNCHECKED);
        CheckMenuItem(hmenu, IDM_VIDEO_NULA, (nula_disable) ? MF_UNCHECKED : MF_CHECKED);

        CheckMenuItem(hmenu, IDM_SPD_100, MF_CHECKED);
}
开发者ID:hoglet67,项目名称:b-em,代码行数:55,代码来源:win.c


示例4: OnCreate


//.........这里部分代码省略.........
    nOldHeight = rc.bottom;
    /* nOldStartX = rc.left; */
    /*nOldStartY = rc.top;  */

#define PAGE_OFFSET_LEFT    17
#define PAGE_OFFSET_TOP     72
#define PAGE_OFFSET_WIDTH   (PAGE_OFFSET_LEFT*2)
#define PAGE_OFFSET_HEIGHT  (PAGE_OFFSET_TOP+32)

    if ((TaskManagerSettings.Left != 0) ||
        (TaskManagerSettings.Top != 0) ||
        (TaskManagerSettings.Right != 0) ||
        (TaskManagerSettings.Bottom != 0))
    {
        MoveWindow(hWnd, TaskManagerSettings.Left, TaskManagerSettings.Top, TaskManagerSettings.Right - TaskManagerSettings.Left, TaskManagerSettings.Bottom - TaskManagerSettings.Top, TRUE);
#ifdef __GNUC__TEST__
        MoveWindow(hApplicationPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE);
        MoveWindow(hProcessPage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE);
        MoveWindow(hPerformancePage, TaskManagerSettings.Left + PAGE_OFFSET_LEFT, TaskManagerSettings.Top + PAGE_OFFSET_TOP, TaskManagerSettings.Right - TaskManagerSettings.Left - PAGE_OFFSET_WIDTH, TaskManagerSettings.Bottom - TaskManagerSettings.Top - PAGE_OFFSET_HEIGHT, FALSE);
#endif
    }
    if (TaskManagerSettings.Maximized)
        ShowWindow(hWnd, SW_MAXIMIZE);

    /* Set the always on top style */
    hMenu = GetMenu(hWnd);
    hEditMenu = GetSubMenu(hMenu, 1);
    hViewMenu = GetSubMenu(hMenu, 2);
    hUpdateSpeedMenu = GetSubMenu(hViewMenu, 1);
    hCPUHistoryMenu = GetSubMenu(hViewMenu, 7);

    /* Check or uncheck the always on top menu item */
    if (TaskManagerSettings.AlwaysOnTop) {
        CheckMenuItem(hEditMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_CHECKED);
        SetWindowPos(hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
    } else {
        CheckMenuItem(hEditMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND|MF_UNCHECKED);
        SetWindowPos(hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
    }

    /* Check or uncheck the minimize on use menu item */
    if (TaskManagerSettings.MinimizeOnUse)
        CheckMenuItem(hEditMenu, ID_OPTIONS_MINIMIZEONUSE, MF_BYCOMMAND|MF_CHECKED);
    else
        CheckMenuItem(hEditMenu, ID_OPTIONS_MINIMIZEONUSE, MF_BYCOMMAND|MF_UNCHECKED);

    /* Check or uncheck the hide when minimized menu item */
    if (TaskManagerSettings.HideWhenMinimized)
        CheckMenuItem(hEditMenu, ID_OPTIONS_HIDEWHENMINIMIZED, MF_BYCOMMAND|MF_CHECKED);
    else
        CheckMenuItem(hEditMenu, ID_OPTIONS_HIDEWHENMINIMIZED, MF_BYCOMMAND|MF_UNCHECKED);

    /* Check or uncheck the show 16-bit tasks menu item */
    if (TaskManagerSettings.Show16BitTasks)
        CheckMenuItem(hEditMenu, ID_OPTIONS_SHOW16BITTASKS, MF_BYCOMMAND|MF_CHECKED);
    else
        CheckMenuItem(hEditMenu, ID_OPTIONS_SHOW16BITTASKS, MF_BYCOMMAND|MF_UNCHECKED);

    if (TaskManagerSettings.View_LargeIcons)
        CheckMenuRadioItem(hViewMenu, ID_VIEW_LARGE, ID_VIEW_DETAILS, ID_VIEW_LARGE, MF_BYCOMMAND);
    else if (TaskManagerSettings.View_SmallIcons)
        CheckMenuRadioItem(hViewMenu, ID_VIEW_LARGE, ID_VIEW_DETAILS, ID_VIEW_SMALL, MF_BYCOMMAND);
    else
        CheckMenuRadioItem(hViewMenu, ID_VIEW_LARGE, ID_VIEW_DETAILS, ID_VIEW_DETAILS, MF_BYCOMMAND);

    if (TaskManagerSettings.ShowKernelTimes)
开发者ID:Sunmonds,项目名称:wine,代码行数:67,代码来源:taskmgr.c


示例5: TaskManagerWndProc


//.........这里部分代码省略.........
        case ID_FILE_EXIT:
            EndDialog(hDlg, IDOK);
            break;
        }     
        break;

    case WM_ONTRAYICON:
        switch(lParam)
        {
        case WM_RBUTTONDOWN:
            {
            POINT pt;
            BOOL OnTop;
            HMENU hMenu, hPopupMenu;
            
            GetCursorPos(&pt);
            
            OnTop = (GetWindowLongW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0;
            
            hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_TRAY_POPUP));
            hPopupMenu = GetSubMenu(hMenu, 0);
            
            if(IsWindowVisible(hMainWnd))
            {
              DeleteMenu(hPopupMenu, ID_RESTORE, MF_BYCOMMAND);
            }
            else
            {
              SetMenuDefaultItem(hPopupMenu, ID_RESTORE, FALSE);
            }
            
            if(OnTop)
            {
              CheckMenuItem(hPopupMenu, ID_OPTIONS_ALWAYSONTOP, MF_BYCOMMAND | MF_CHECKED);
            }
            
            SetForegroundWindow(hMainWnd);
            TrackPopupMenuEx(hPopupMenu, 0, pt.x, pt.y, hMainWnd, NULL);
            
            DestroyMenu(hMenu);
            break;
            }
        case WM_LBUTTONDBLCLK:
            TaskManager_OnRestoreMainWindow();
            break;
        }
        break;

    case WM_NOTIFY:
        pnmh = (LPNMHDR)lParam;
        if ((pnmh->hwndFrom == hTabWnd) &&
            (pnmh->idFrom == IDC_TAB) &&
            (pnmh->code == TCN_SELCHANGE))
        {
            TaskManager_OnTabWndSelChange();
        }
        break;

    case WM_NCPAINT:
        hdc = GetDC(hDlg);
        GetClientRect(hDlg, &rc);
        Draw3dRect(hdc, rc.left, rc.top, rc.right, rc.top + 2, GetSysColor(COLOR_3DSHADOW), GetSysColor(COLOR_3DHILIGHT));
        ReleaseDC(hDlg, hdc);
        break;

    case WM_PAINT:
开发者ID:Sunmonds,项目名称:wine,代码行数:67,代码来源:taskmgr.c


示例6: WndProc

LRESULT CALLBACK WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
{
    HDC hdc;
    PAINTSTRUCT ps;
	SYSTEMTIME st;
	RECT crt;
	HPEN hPen, OldPen;
	HBRUSH OldBrush;
	CHOOSEFONT CFT;
	HFONT MyFont, OldFont;
	
	static TCHAR sTime[128];
	static TCHAR sTimeExceptSecond[128];
	static TCHAR sDate[128];
	static bool isAnalog = false;
	static bool showSecond = true;
	static bool showDate = true;
	static bool top = false;
	int radius;
	static NEEDLE ndlHour, ndlMin, ndlSec;
	POINT secRoot, secEdge;
	
    switch(iMessage)
    {
	
    case WM_CREATE:
        hWndMain = hWnd;
		SetTimer(hWnd, 1, 50, NULL);
		SendMessage(hWnd, WM_TIMER, 1, 0);

		lf.lfHeight = 20;
		lf.lfCharSet = HANGEUL_CHARSET;
		lf.lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN;
		lstrcpy(lf.lfFaceName, TEXT("바탕"));
        return 0;
	case WM_INITMENU:
		if(top)
			CheckMenuItem((HMENU)wParam, 40017, MF_BYCOMMAND | MF_CHECKED);
		else
			CheckMenuItem((HMENU)wParam, 40017, MF_BYCOMMAND | MF_UNCHECKED);
		if(isAnalog)
		{
			CheckMenuItem((HMENU)wParam, ID_ANALOG, MF_BYCOMMAND | MF_CHECKED);
			CheckMenuItem((HMENU)wParam, ID_DIGITAL, MF_BYCOMMAND | MF_UNCHECKED);
			EnableMenuItem((HMENU)wParam, ID_FONT, MF_BYCOMMAND | MF_GRAYED);
		}
		else
		{
			CheckMenuItem((HMENU)wParam, ID_DIGITAL, MF_BYCOMMAND | MF_CHECKED);
			CheckMenuItem((HMENU)wParam, ID_ANALOG, MF_BYCOMMAND | MF_UNCHECKED);
			EnableMenuItem((HMENU)wParam, ID_FONT, MF_BYCOMMAND | MF_ENABLED);
		}
		if(showSecond)
			CheckMenuItem((HMENU)wParam, ID_SECOND, MF_BYCOMMAND | MF_CHECKED);
		else
			CheckMenuItem((HMENU)wParam, ID_SECOND, MF_BYCOMMAND | MF_UNCHECKED);
		if(showDate)
			CheckMenuItem((HMENU)wParam, ID_DATE, MF_BYCOMMAND | MF_CHECKED);
		else
			CheckMenuItem((HMENU)wParam, ID_DATE, MF_BYCOMMAND | MF_UNCHECKED);
	case WM_TIMER:
		GetLocalTime(&st);
		GetClientRect(hWnd, &crt);
		// 시침, 분침, 초침 크기 지정

		// 반지름
		radius = min(crt.right, crt.bottom) / 2;

		// 시침
		ndlHour.edgeLen = radius * 0.55;
		ndlHour.rootLen = radius * 0.12;
		ndlHour.sideLen = radius * 0.06;
		ndlHour.edgePos.x = crt.right / 2 + ndlHour.edgeLen * cos(st.wHour * PI / 6 + st.wMinute * PI / 360 - PI / 2);
		ndlHour.edgePos.y = crt.bottom / 2 + ndlHour.edgeLen * sin(st.wHour * PI / 6 + st.wMinute * PI / 360 - PI / 2);
		ndlHour.rootPos.x = crt.right / 2 + ndlHour.rootLen * cos(st.wHour * PI / 6 + st.wMinute * PI / 360 + PI / 2);
		ndlHour.rootPos.y = crt.bottom / 2 + ndlHour.rootLen * sin(st.wHour * PI / 6 + st.wMinute * PI / 360 + PI / 2);
		ndlHour.leftPos.x = crt.right / 2 + ndlHour.sideLen * cos(st.wHour * PI / 6 + st.wMinute * PI / 360); 
		ndlHour.leftPos.y = crt.bottom / 2 + ndlHour.sideLen * sin(st.wHour * PI / 6 + st.wMinute * PI / 360);
		ndlHour.rightPos.x = crt.right / 2 + ndlHour.sideLen * cos(st.wHour * PI / 6 + st.wMinute * PI / 360 + PI); 
		ndlHour.rightPos.y = crt.bottom / 2 + ndlHour.sideLen * sin(st.wHour * PI / 6 + st.wMinute * PI / 360 + PI);
		// 분침
		ndlMin.edgeLen = radius * 0.65;
		ndlMin.rootLen = radius * 0.16;
		ndlMin.sideLen = radius * 0.04;
		ndlMin.edgePos.x = crt.right / 2 + ndlMin.edgeLen * cos(st.wMinute * PI / 30 + st.wSecond * PI / 1800 - PI / 2);
		ndlMin.edgePos.y = crt.bottom / 2 + ndlMin.edgeLen * sin(st.wMinute * PI / 30 + st.wSecond * PI / 1800 - PI / 2);
		ndlMin.rootPos.x = crt.right / 2 + ndlMin.rootLen * cos(st.wMinute * PI / 30 + st.wSecond * PI / 1800 + PI / 2);
		ndlMin.rootPos.y = crt.bottom / 2 + ndlMin.rootLen * sin(st.wMinute * PI / 30 + st.wSecond * PI / 1800 + PI / 2);
		ndlMin.leftPos.x = crt.right / 2 + ndlMin.sideLen * cos(st.wMinute * PI / 30 + st.wSecond * PI / 1800); 
		ndlMin.leftPos.y = crt.bottom / 2 + ndlMin.sideLen * sin(st.wMinute * PI / 30 + st.wSecond * PI / 1800);
		ndlMin.rightPos.x = crt.right / 2 + ndlMin.sideLen * cos(st.wMinute * PI / 30 + st.wSecond * PI / 1800 + PI);
		ndlMin.rightPos.y = crt.bottom / 2 + ndlMin.sideLen * sin(st.wMinute * PI / 30 + st.wSecond * PI / 1800 + PI);

		// 초침
		ndlSec.edgeLen = radius * 0.65;
		ndlSec.rootLen = 0;
		ndlSec.sideLen = 0;
		ndlSec.edgePos.x = crt.right / 2 + ndlSec.edgeLen * cos(st.wSecond * PI / 30 - PI / 2);
		ndlSec.edgePos.y = crt.bottom / 2 + ndlSec.edgeLen * sin(st.wSecond * PI / 30 - PI / 2);
		ndlSec.rootPos.x = crt.right / 2;
//.........这里部分代码省略.........
开发者ID:AncientGratin,项目名称:Clock,代码行数:101,代码来源:Clock.cpp


示例7: InitMenuPopup


//.........这里部分代码省略.........
        mf_state = MF_GRAYED;
    EnableMenuItem(menu, IDM_OPENWS, mf_state);
    EnableMenuItem(menu, IDM_CLOSEWS, mf_state);
    EnableMenuItem(menu, IDM_NEWWS, mf_state);
    EnableMenuItem(menu, IDM_REOPENWS, mf_state);
    EnableMenuItem(menu, IDM_IMPORTWS, mf_state);

    mf_state = ((uState == notDebugging || uState == atException || uState == atBreakpoint) && !making && activeProject) ? MF_ENABLED : MF_GRAYED;
    EnableMenuItem(menu, IDM_RUN, mf_state);

    mf_state = (uState != notDebugging && (uState == atException || uState == atBreakpoint)  && !making && activeProject) ? MF_ENABLED : MF_GRAYED;
    EnableMenuItem(menu, IDM_STOPDEBUGGING, mf_state);
    EnableMenuItem(menu, IDM_RUNTO, mf_state);
    EnableMenuItem(menu, IDM_SCROLLTOBP, mf_state);
//    EnableMenuItem(menu, IDM_VIEWBP, mf_state);
    EnableMenuItem(menu, IDM_VIEWASM, mf_state);
    EnableMenuItem(menu, IDM_VIEWMEM, mf_state);
    EnableMenuItem(menu, IDM_VIEWMEM2, mf_state);
    EnableMenuItem(menu, IDM_VIEWMEM3, mf_state);
    EnableMenuItem(menu, IDM_VIEWMEM4, mf_state);
    EnableMenuItem(menu, IDM_VIEWREGISTER, mf_state);
    EnableMenuItem(menu, IDM_VIEWSTACK, mf_state);
    EnableMenuItem(menu, IDM_VIEWWATCH, mf_state);
    EnableMenuItem(menu, IDM_VIEWWATCH2, mf_state);
    EnableMenuItem(menu, IDM_VIEWWATCH3, mf_state);
    EnableMenuItem(menu, IDM_VIEWWATCH4, mf_state);
    EnableMenuItem(menu, IDM_VIEWLOCALS, mf_state);
    EnableMenuItem(menu, IDM_VIEWTHREAD, mf_state);
    EnableMenuItem(menu, IDM_HBREAK, mf_state);
    EnableMenuItem(menu, IDM_DATABREAKPOINT, mf_state);
    EnableMenuItem(menu, IDM_FUNCTIONBREAKPOINT, mf_state);
    
    mf_state = uState == Running ? MF_ENABLED : MF_GRAYED;
    EnableMenuItem(menu, IDM_STOP, mf_state);

    {
        BOOL state = TagAnyDisabledBreakpoints() || hbpAnyDisabledBreakpoints() || databpAnyDisabledBreakpoints();
        ModifyMenu(menu, IDM_DISABLEALLBREAKPOINTS, MF_BYCOMMAND | MF_STRING, IDM_DISABLEALLBREAKPOINTS, state ? "E&nable All Breakpoints" : "D&isable All Breakpoints");
        
    }
    mf_state = (TagAnyBreakpoints() || hbpAnyBreakpoints() || databpAnyBreakpoints()) ? MF_ENABLED : MF_GRAYED;
    EnableMenuItem(menu, IDM_REMOVEALLBREAKPOINTS, mf_state);
    EnableMenuItem(menu, IDM_DISABLEALLBREAKPOINTS, mf_state);

    mf_state = MF_GRAYED;
    if (activeProject && GetResData(activeProject))
        mf_state = MF_ENABLED;       
    EnableMenuItem(menu, IDM_NEWRESOURCE, mf_state);
    mf_state = MF_GRAYED;
    if (IsWindow(win) && IsResourceWindow(win))
    {
        struct resRes *res = (struct resRes *)GetWindowLong(win, 0);
        if (res->resource->itype == RESTYPE_DIALOG)
            mf_state = MF_ENABLED;
    }
    EnableMenuItem(menu, IDM_CREATIONORDER, mf_state);
    EnableMenuItem(menu, IDM_SETTABSTOPS, mf_state);
    EnableMenuItem(menu, IDM_SETGROUPFLAGS, mf_state);
    EnableMenuItem(menu, IDM_GRIDMENU, mf_state);
    EnableMenuItem(menu, IDM_SHOWGRID, mf_state);
    EnableMenuItem(menu, IDM_SNAPTOGRID, mf_state);
    if (mf_state == MF_ENABLED)
    {
        if (snapToGrid)
        {
            CheckMenuItem( menu, IDM_SNAPTOGRID, MF_BYCOMMAND | MF_CHECKED);
        }
        else
        {
            CheckMenuItem( menu, IDM_SNAPTOGRID, MF_BYCOMMAND);
        }
        if (showGrid)
        {
            CheckMenuItem( menu, IDM_SHOWGRID, MF_BYCOMMAND | MF_CHECKED);
        }
        else
        {
            CheckMenuItem( menu, IDM_SHOWGRID, MF_BYCOMMAND);
        }
    }
    mf_state = MF_GRAYED;
    if (IsWindow(win) && IsResourceWindow(win))
    {
        struct resRes *res = (struct resRes *)GetWindowLong(win, 0);
        if (res->resource->itype == RESTYPE_BITMAP || res->resource->itype == RESTYPE_CURSOR || res->resource->itype == RESTYPE_ICON)
            mf_state = MF_ENABLED;
    }
    EnableMenuItem(menu, IDM_FLIPMENU, mf_state);
    EnableMenuItem(menu, IDM_ROTATEMENU, mf_state);
    EnableMenuItem(menu, IDM_CLEAR, mf_state);
    EnableMenuItem(menu, IDM_CLEARSELECTION, mf_state);

    //         mf_state = uState == atBreakpoint || uState == atException ? MF_ENABLED : MF_GRAYED ;
    //         EnableMenuItem(menu,IDM_HBREAK, mf_state ) ;

    mf_state = PropGetInt(NULL, "MSDN_HELP_MODE") == 0 ? MF_ENABLED : MF_GRAYED;
    EnableMenuItem(menu,IDM_CONFIGWEBHELP, mf_state ) ;


}
开发者ID:bencz,项目名称:OrangeC,代码行数:101,代码来源:idemenu.c


示例8: WindowProcedure

LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    static int idColor [5] = { WHITE_BRUSH,  LTGRAY_BRUSH, GRAY_BRUSH,
                               DKGRAY_BRUSH, BLACK_BRUSH } ;
    static int iSelection = IDM_BKGND_WHITE ;
    HMENU      hMenu ;

    switch (message)                  /* handle the messages */
    {
        case WM_COMMAND:
            hMenu = GetMenu (hwnd) ;
            switch (LOWORD (wParam)) {
                case IDM_FILE_NEW:
                case IDM_FILE_OPEN:
                case IDM_FILE_SAVE:
                case IDM_FILE_SAVE_AS:
                    MessageBeep (0) ;
                    return 0 ;

                case IDM_APP_EXIT:
                    SendMessage (hwnd, WM_CLOSE, 0, 0) ;
                    return 0 ;

                case IDM_EDIT_UNDO:
                case IDM_EDIT_CUT:
                case IDM_EDIT_COPY:
                case IDM_EDIT_PASTE:
                case IDM_EDIT_CLEAR:
                    MessageBeep (0) ;
                    return 0 ;

                case IDM_BKGND_WHITE:         // Note: Logic below
                case IDM_BKGND_LTGRAY:        //   assumes that IDM_WHITE
                case IDM_BKGND_GRAY:          //   through IDM_BLACK are
                case IDM_BKGND_DKGRAY:        //   consecutive numbers in
                case IDM_BKGND_BLACK:         //   the order shown here.

                    CheckMenuItem (hMenu, iSelection, MF_UNCHECKED) ;
                    iSelection = LOWORD (wParam) ;
                    CheckMenuItem (hMenu, iSelection, MF_CHECKED) ;

                    SetClassLong (hwnd, GCL_HBRBACKGROUND, (LONG)GetStockObject
                                    (idColor [LOWORD (wParam) - IDM_BKGND_WHITE])) ;

                    InvalidateRect (hwnd, NULL, TRUE) ;
                    return 0 ;

        case IDM_TIMER_START:
            if (SetTimer (hwnd, ID_TIMER, 1000, NULL)) {
                EnableMenuItem (hMenu, IDM_TIMER_START, MF_GRAYED) ;
                EnableMenuItem (hMenu, IDM_TIMER_STOP,  MF_ENABLED) ;
            }
            return 0 ;

        case IDM_TIMER_STOP:
             KillTimer (hwnd, ID_TIMER) ;
             EnableMenuItem (hMenu, IDM_TIMER_START, MF_ENABLED) ;
             EnableMenuItem (hMenu, IDM_TIMER_STOP,  MF_GRAYED) ;
             return 0 ;

        case IDM_APP_HELP:
             MessageBox (hwnd, TEXT ("Help not yet implemented!"),
                         szClassName, MB_ICONEXCLAMATION | MB_OK) ;
             return 0 ;

        case IDM_APP_ABOUT:
             MessageBox (hwnd, TEXT ("Menu Demonstration Program\n")
                               TEXT ("(c) Charles Petzold, 1998"),
                         szClassName, MB_ICONINFORMATION | MB_OK) ;
             return 0 ;
        }
        break;
        case WM_DESTROY:
            PostQuitMessage (0);       /* send a WM_QUIT to the message queue */
            break;
        default:                      /* for messages that we don't deal with */
            return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}
开发者ID:robinlan,项目名称:LiearAlgebraImplement,代码行数:81,代码来源:main.cpp


示例9: check_menu_item

/* change menu item checkmark */
void
check_menu_item(int menuid, int itemid, BOOL checked)
{
        CheckMenuItem(hmenu, itemid, MF_BYCOMMAND | (checked ? MF_CHECKED : MF_UNCHECKED));
}
开发者ID:131,项目名称:gsview,代码行数:6,代码来源:gvwmisc.c


示例10: AddContactToFavorites

/*
 * add a contact to recent or favorites menu
 * mode = 1, add
 * mode = 0, only modify it..
 * hMenu specifies the menu handle (the menus are identical...)
 * cares about updating the menu entry. It sets the hIcon (proto status icon) in
 * dwItemData of the the menu entry, so that the WM_DRAWITEM handler can retrieve it
 * w/o costly service calls.
 *
 * Also, the function does housekeeping on the Recent Sessions menu to enforce the
 * maximum number of allowed entries (20 at the moment). The oldest (topmost) entry
 * is deleted, if necessary.
 */
void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus, WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu)
{
	TCHAR szMenuEntry[80];
	TCHAR	szFinalNick[100];

	if (szNickname == NULL)
		_tcsncpy_s(szFinalNick, pcli->pfnGetContactDisplayName(hContact, 0), _TRUNCATE);
	else
		_tcsncpy_s(szFinalNick, szNickname, _TRUNCATE);

	if (szProto == NULL)
		szProto = GetContactProto(hContact);
	if (szProto) {
		if (wStatus == 0)
			wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
		if (szStatus == NULL)
			szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
	}
	else
		return;

	if (hIcon == 0)
		hIcon = Skin_LoadProtoIcon(szProto, wStatus);

	PROTOACCOUNT *acc = Proto_GetAccount(szProto);
	if (acc && acc->tszAccountName) {
		MENUITEMINFO mii = { 0 };
		mii.cbSize = sizeof(mii);
		mir_sntprintf(szMenuEntry, _T("%s: %s (%s)"), acc->tszAccountName, szFinalNick, szStatus);
		if (mode) {
			if (hMenu == PluginConfig.g_hMenuRecent) {
				if (CheckMenuItem(hMenu, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == 0) {
					DeleteMenu(hMenu, (UINT_PTR)hContact, MF_BYCOMMAND);
					goto addnew;                                            // move to the end of the menu...
				}
				if (GetMenuItemCount(PluginConfig.g_hMenuRecent) > nen_options.wMaxRecent) {           // throw out oldest entry in the recent menu...
					UINT uid = GetMenuItemID(hMenu, 0);
					if (uid) {
						DeleteMenu(hMenu, (UINT_PTR)0, MF_BYPOSITION);
						db_set_dw((MCONTACT)uid, SRMSGMOD_T, "isRecent", 0);
					}
				}
			addnew:
				db_set_dw(hContact, SRMSGMOD_T, "isRecent", time(NULL));
				AppendMenu(hMenu, MF_BYCOMMAND, (UINT_PTR)hContact, szMenuEntry);
			}
			else if (hMenu == PluginConfig.g_hMenuFavorites) {            // insert the item sorted...
				TCHAR szBuffer[142];
				int i, c = GetMenuItemCount(PluginConfig.g_hMenuFavorites);

				MENUITEMINFO mii2 = { 0 };
				mii2.fMask = MIIM_STRING;
				mii2.cbSize = sizeof(mii2);
				if (c == 0)
					InsertMenu(PluginConfig.g_hMenuFavorites, 0, MF_BYPOSITION, (UINT_PTR)hContact, szMenuEntry);
				else {
					for (i = 0; i <= c; i++) {
						mii2.cch = 0;
						mii2.dwTypeData = NULL;
						GetMenuItemInfo(PluginConfig.g_hMenuFavorites, i, TRUE, &mii2);
						mii2.cch++;
						mii2.dwTypeData = szBuffer;
						GetMenuItemInfo(PluginConfig.g_hMenuFavorites, i, TRUE, &mii2);
						if (_tcsncmp((TCHAR*)mii2.dwTypeData, szMenuEntry, 140) > 0 || i == c) {
							InsertMenu(PluginConfig.g_hMenuFavorites, i, MF_BYPOSITION, (UINT_PTR)hContact, szMenuEntry);
							break;
						}
					}
				}
			}
		}
		mii.fMask = MIIM_BITMAP | MIIM_DATA;
		if (!mode) {
			mii.fMask |= MIIM_STRING;
			mii.dwTypeData = (LPTSTR)szMenuEntry;
			mii.cch = (int)mir_tstrlen(szMenuEntry) + 1;
		}
		mii.hbmpItem = HBMMENU_CALLBACK;
		mii.dwItemData = (ULONG_PTR)hIcon;
		SetMenuItemInfo(hMenu, (UINT)hContact, FALSE, &mii);
	}
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:95,代码来源:trayicon.cpp


示例11: switch

INT_PTR DialogInstall::OnCommand(WPARAM wParam, LPARAM lParam)
{
	switch (LOWORD(wParam))
	{
	case IDC_INSTALL_ADVANCED_BUTTON:
		{
			RECT r;
			GetWindowRect((HWND)lParam, &r);
			HMENU menu = LoadMenu(GetInstanceHandle(), MAKEINTRESOURCE(IDR_INSTALL_MENU));
			HMENU subMenu = GetSubMenu(menu, 0);

			if (m_PackageSkins.empty() || m_MergeSkins || m_BackupPackage)
			{
				EnableMenuItem(subMenu, IDM_INSTALL_BACKUPSKINS, MF_BYCOMMAND | MF_GRAYED);
			}
			else
			{
				CheckMenuItem(subMenu, IDM_INSTALL_BACKUPSKINS, (m_BackupSkins ? MF_CHECKED : MF_UNCHECKED) | MF_BYCOMMAND);
			}

			if (m_PackageFonts.empty())
			{
				EnableMenuItem(subMenu, IDM_INSTALL_SYSTEMFONTS, MF_BYCOMMAND | MF_GRAYED);
			}
			else
			{
				CheckMenuItem(subMenu, IDM_INSTALL_SYSTEMFONTS, (m_SystemFonts ? MF_CHECKED : MF_UNCHECKED) | MF_BYCOMMAND);
			}

			const WCHAR* formatName = m_PackageFormat == PackageFormat::New ? L"New format" : L"Old format";
			ModifyMenu(subMenu, IDM_INSTALL_FORMAT, MF_STRING | MF_GRAYED | MF_BYCOMMAND, IDM_INSTALL_FORMAT, formatName);

			TrackPopupMenu(
				subMenu,
				TPM_RIGHTBUTTON | TPM_LEFTALIGN,
				r.left,
				--r.bottom,
				0,
				m_Window,
				nullptr);

			DestroyMenu(menu);
		}
		break;

	case IDC_INSTALL_INSTALL_BUTTON:
		BeginInstall();
		break;

	case IDCANCEL:
		if (!m_InstallThread)
		{
			EndDialog(m_Window, 0);
		}
		break;

	case IDM_INSTALL_BACKUPSKINS:
		m_BackupSkins = !m_BackupSkins;
		break;

	case IDM_INSTALL_SYSTEMFONTS:
		m_SystemFonts = !m_SystemFonts;
		break;

	default:
		return FALSE;
	}

	return TRUE;
}
开发者ID:ATTRAYANTDESIGNS,项目名称:rainmeter,代码行数:70,代码来源:DialogInstall.cpp


示例12: Set1ButtonMouse

void Set1ButtonMouse() {
  CheckMenuItem(vmPrefsMenu, ID_1BUTTONMOUSE, MF_BYCOMMAND | 
		(f1ButtonMouse ? MF_CHECKED : MF_UNCHECKED));
  WritePrivateProfileString(U_GLOBAL,TEXT("1ButtonMouse"),
			    f1ButtonMouse ? U_ON : U_OFF,squeakIniName);
}
开发者ID:OpenSmalltalk,项目名称:opensmalltalk-vm,代码行数:6,代码来源:sqWin32Prefs.c


示例13: SetReduceCPUInBackground

void SetReduceCPUInBackground() {
  CheckMenuItem(vmPrefsMenu, ID_REDUCEBACKGROUNDCPU, MF_BYCOMMAND | 
		(fReduceCPUInBackground ? MF_CHECKED : MF_UNCHECKED));
  WritePrivateProfileString(U_GLOBAL,TEXT("ReduceCPUInBackground"),
			    fReduceCPUInBackground ? U_ON:U_OFF,squeakIniName);
}
开发者ID:OpenSmalltalk,项目名称:opensmalltalk-vm,代码行数:6,代码来源:sqWin32Prefs.c


示例14: SetReduceCPUUsage

void SetReduceCPUUsage() {
  CheckMenuItem(vmPrefsMenu, ID_REDUCECPUUSAGE, MF_BYCOMMAND | 
		(fReduceCPUUsage ? MF_CHECKED : MF_UNCHECKED));
  WritePrivateProfileString(U_GLOBAL,TEXT("ReduceCPUUsage"),
			    fReduceCPUUsage ? U_ON:U_OFF,squeakIniName);
}
开发者ID:OpenSmalltalk,项目名称:opensmalltalk-vm,代码行数:6,代码来源:sqWin32Prefs.c


示例15: DlgProc

INT_PTR CALLBACK DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
    HINSTANCE hInstance = GetModuleHandle(NULL);
    HWND hButton = GetDlgItem(hDlg, IDC_START);
    HMENU hMenu = GetSystemMenu(hDlg, FALSE);
    HICON hBigIcon, hSmallIcon;
    WCHAR buf[BUFSIZ];

    if (msg == WM_TASKBARCREATED && !IsWindowVisible(hDlg)) {
        WorkerMinimize();
        return 0;
    }

    switch (msg) {
    case WM_COMMAND:
        switch (LOWORD(wParam)) {
        case IDC_START:
            WorkerMinimize();
            WorkerStart();
            break;

        case IDC_TIMEOUT:
            if (HIWORD(wParam) == EN_CHANGE) {
                GetDlgItemText(hDlg, IDC_TIMEOUT, buf, BUFSIZ);
                EnableWindow(hButton, (Worker.dwTimeout = _wtoi(buf)) > 0);
            }
        }
        break;

    case WM_SYSCOMMAND:
        switch(LOWORD(wParam)) {
        case WM_INVISIBLE:
            if (Worker.isInvisible = !(GetMenuState(hMenu, WM_INVISIBLE, MF_BYCOMMAND) & MF_CHECKED)) {
                CheckMenuItem(hMenu, WM_INVISIBLE, MF_BYCOMMAND | MF_CHECKED);
            } else {
                CheckMenuItem(hMenu, WM_INVISIBLE, MF_BYCOMMAND | MF_UNCHECKED);
            }
        }
        break;

    case WM_INITDIALOG:
        SetWindowText(hDlg, App.Strings.appName);

        hSmallIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON));
        SendMessage(hDlg, WM_SETICON, ICON_SMALL, (LPARAM) hSmallIcon);

        hBigIcon = (HICON) LoadImage(hInstance, MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 64, 64, 0);
        SendDlgItemMessage(hDlg, IDC_START, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hBigIcon);

        SendDlgItemMessage(hDlg, IDC_TIMEOUT, EM_LIMITTEXT, 5, 0);
        SetDlgItemText(hDlg, IDC_TIMEOUT, DEF_TIMEOUT);

        DeleteMenu(hMenu, SC_MAXIMIZE, MF_BYCOMMAND);
        DeleteMenu(hMenu, SC_RESTORE, MF_BYCOMMAND);
        DeleteMenu(hMenu, SC_SIZE, MF_BYCOMMAND);

        InsertMenu(hMenu, 0, MF_BYPOSITION | MF_STRING | MF_CHECKED, WM_INVISIBLE, App.Strings.cfgInvisible);
        InsertMenu(hMenu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, 0);

        return TRUE;

    case WM_CLOSE:
        DestroyWindow(hDlg);
        return TRUE;

    case WM_DESTROY:
        PostQuitMessage(0);
        return TRUE;

    case WM_TRAYICON:
        switch (lParam) {
        case WM_LBUTTONUP:
        case WM_RBUTTONUP:
            WorkerStop();
            WorkerRestore();
        }
        return FALSE;
    }

    return FALSE;
}
开发者ID:lokhman,项目名称:magicworker,代码行数:81,代码来源:main.c


示例16: switch

LRESULT MusPlayer_WinAPI::MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch (msg)
    {
        case WM_HSCROLL:
        {
            if(m_self->m_volume == (HWND)lParam)
            {
                switch(LOWORD(wParam))
                {
                case TB_ENDTRACK:
                case TB_THUMBPOSITION:
                case TB_THUMBTRACK:
                case SB_LEFT:
                case SB_RIGHT:
                    DWORD dwPos;// current position of slider
                    dwPos = SendMessageW(m_self->m_volume, TBM_GETPOS, 0, 0);
                    SendMessageW(m_self->m_volume, TBM_SETPOS,
                                (WPARAM)TRUE,               //redraw flag
                                (LPARAM)dwPos);
                    m_self->on_volume_valueChanged(dwPos);
                    break;
                default:
                    break;
                }
            }
            break;
        }
        case WM_COMMAND:
        {
            switch(HIWORD(wParam))
            {
                case BN_CLICKED:
                {
                    switch( LOWORD(wParam) )
                    {
                    case CMD_Open:
                        m_self->on_open_clicked();
                        break;
                    case CMD_Play:
                        m_self->on_play_clicked();
                        break;
                    case CMD_Stop:
                        m_self->on_stop_clicked();
                        break;
                    case CMD_SetDefault:
                        m_self->on_resetDefaultADLMIDI_clicked();
                        break;
                    case CMD_RecordWave:
                    {
                        BOOL checked = IsDlgButtonChecked(hWnd, CMD_RecordWave);
                        if (checked)
                        {
                            CheckDlgButton(hWnd, CMD_RecordWave, BST_UNCHECKED);
                            m_self->on_recordWav_clicked(false);
                        } else {
                            CheckDlgButton(hWnd, CMD_RecordWave, BST_CHECKED);
                            m_self->on_recordWav_clicked(true);
                        }
                        break;
                    }
                    case CMD_Reverb:
                    {
                        if (PGE_MusicPlayer::reverbEnabled)
                        {
                            CheckMenuItem(m_self->m_contextMenu, CMD_Reverb, MF_UNCHECKED);
                            Mix_UnregisterEffect(MIX_CHANNEL_POST, reverbEffect);
                            PGE_MusicPlayer::reverbEnabled = false;
                        } else {
                            CheckMenuItem(m_self->m_contextMenu, CMD_Reverb, MF_CHECKED);
                            Mix_RegisterEffect(MIX_CHANNEL_POST, reverbEffect, reverbEffectDone, NULL);
                            PGE_MusicPlayer::reverbEnabled = true;
                        }
                        break;
                    }
                    case CMD_ShowLicense:
                    {
                        ShellExecuteW(0, 0, L"http://www.gnu.org/licenses/gpl", 0, 0 , SW_SHOW);
                        break;
                    }
                    case CMD_ShowSource:
                    {
                        ShellExecuteW(0, 0, L"https://github.com/WohlSoft/PGE-Project", 0, 0 , SW_SHOW);
                        break;
                    }
                    default:
                        break;
                    }
                    break;
                }
            }
            break;
        }
        case WM_DROPFILES:
        {
            HDROP hDropInfo = (HDROP)wParam;
            wchar_t sItem[MAX_PATH];
            memset(sItem, 0, MAX_PATH*sizeof(wchar_t));
            if(DragQueryFileW(hDropInfo, 0, (LPWSTR)sItem, sizeof(sItem)))
            {
//.........这里部分代码省略.........
开发者ID:jpmac26,项目名称:PGE-Project,代码行数:101,代码来源:musplayer_winapi.cpp


示例17: CPlaylistWindow_SetVisible

void CPlaylistWindow_SetVisible(const BOOL bNewVisibleState)
{
	CheckMenuItem(globals.main_menu_popup, MENU_PLAYLIST, MF_BYCOMMAND | (bNewVisibleState ? MF_CHECKED : 0));
	IF_SetVisible(windows.m_hifPlaylist, bNewVisibleState);
}
开发者ID:Runcy,项目名称:coolplayer,代码行数:5,代码来源:CPI_PlaylistWindow.c


示例18: return

/**
 * Invert the check status of menu item
 * @param   hMenu              Handle to window menu
 * @param   id                 ID of menu item to check or uncheck
 * @param   previouslyChecked  Previous check status of menu item
 * @return  Indicates success or failure
 */
bool KinectWindow::InvertCheckMenuItem(HMENU hMenu, UINT id, bool previouslyChecked)
{
    return (-1 != CheckMenuItem(hMenu, id, MF_BYCOMMAND | (previouslyChecked ? MF_UNCHECKED : MF_CHECKED)));
}
开发者ID:thealexhong,项目名称:starship,代码行数:11,代码来源:KinectWindow.cpp


示例19: DoCreateStatusBar

VOID DoCreateStatusBar(VOID)
{
    RECT rc;
    RECT rcstatus;
    BOOL bStatusBarVisible;

    // Check if status bar object already exists.
    if (Globals.hStatusBar == NULL)
    {
        // Try to create the status bar
        Globals.hStatusBar = CreateStatusWindow(
                                WS_CHILD | WS_VISIBLE | WS_EX_STATICEDGE,
                                NULL,
                                Globals.hMainWnd,
                                CMD_STATUSBAR_WND_ID);

        if (Globals.hStatusBar == NULL)
        {
            ShowLastError();
            return;
        }

        // Load the string for formatting column/row text output
        LoadString(Globals.hInstance, STRING_LINE_COLUMN, Globals.szStatusBarLineCol, MAX_PATH-1);

        // Set the status bar for single-text output
        SendMessage(Globals.hStatusBar, SB_SIMPLE, (WPARAM)TRUE, (LPARAM)0);
    }

    // Set status bar visible or not accordind the the settings.
    if (Globals.bWrapLongLines == TRUE ||
        Globals.bShowStatusBar == FALSE)
    {
        bStatusBarVisible = FALSE;
        ShowWindow(Globals.hStatusBar, SW_HIDE);
    }
    else
    {
        bStatusB 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CheckOutputArgument函数代码示例发布时间:2022-05-30
下一篇:
C++ CheckMailBox函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap