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

C++ GetMenu函数代码示例

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

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



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

示例1: SetMenu

BOOL CPrefabDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	CMenu menu;
	menu.LoadMenu(IDR_MENU2);
	SetMenu(&menu);
	menu.Detach();

	if (g_editorMode == eMODE_PREFAB)
	{
		GetMenu()->EnableMenuItem(ID_PACKAGE_NEW, MF_ENABLED);
		GetMenu()->EnableMenuItem(ID_PACKAGE_RENAMESELECTED, MF_ENABLED);
		GetMenu()->EnableMenuItem(ID_PACKAGE_DELETESELECTED, MF_ENABLED);

		GetMenu()->EnableMenuItem(ID_PREFAB_NEW, MF_ENABLED);
		GetMenu()->EnableMenuItem(ID_PREFAB_OPENSELECTED, MF_ENABLED);
		GetMenu()->EnableMenuItem(ID_PREFAB_RENAMESELECTED, MF_ENABLED);
		GetMenu()->EnableMenuItem(ID_PREFAB_DELETESELECTED, MF_ENABLED);
		m_btnInsertPrefab.SetWindowTextA("Open Prefab");
	}
	else
	{
		GetMenu()->EnableMenuItem(ID_PACKAGE_NEW, MF_DISABLED | MF_GRAYED);
		GetMenu()->EnableMenuItem(ID_PACKAGE_RENAMESELECTED, MF_DISABLED | MF_GRAYED);
		GetMenu()->EnableMenuItem(ID_PACKAGE_DELETESELECTED, MF_DISABLED | MF_GRAYED);

		GetMenu()->EnableMenuItem(ID_PREFAB_NEW, MF_DISABLED | MF_GRAYED);
		GetMenu()->EnableMenuItem(ID_PREFAB_OPENSELECTED, MF_DISABLED | MF_GRAYED);
		GetMenu()->EnableMenuItem(ID_PREFAB_RENAMESELECTED, MF_DISABLED | MF_GRAYED);
		GetMenu()->EnableMenuItem(ID_PREFAB_DELETESELECTED, MF_DISABLED | MF_GRAYED);

		m_btnInsertPrefab.SetWindowTextA("Insert Prefab");

	}
	m_slideLod.SetRange(0, 2);
	CBitmap cBmp;
	CBitmap* cBmpMask = NULL;
	m_packageListImage.Create(36, 36, ILC_COLOR24, 1, 1);

	cBmp.LoadBitmap(IDB_BITMAP_DEFAULT_PACKAGE);
	m_packageListImage.Add(&cBmp, cBmpMask);
	cBmp.DeleteObject();

	RECT tempRect;
	m_listPrefabPackages.GetClientRect(&tempRect);
	m_listPrefabPackages.SetImageList(&m_packageListImage, LVSIL_SMALL);
	m_listPrefabPackages.InsertColumn(0, "Packages", LVCFMT_CENTER | LVS_SHOWSELALWAYS, (tempRect.right - tempRect.left) * 80 / 100);
	m_listPrefabPackages.ShowWindow(SW_SHOW);
	m_listPrefabPackages.UpdateWindow();

	m_prefabListImage.Create(80, 80, ILC_COLOR24, 1, 1);

	cBmp.LoadBitmap(IDB_BITMAP_DEFAULT_VPF);
	m_prefabListImage.Add(&cBmp, cBmpMask);
	cBmp.DeleteObject();

	m_listPrefabs.SetImageList(&m_prefabListImage, LVSIL_NORMAL);

	m_listPrefabs.GetClientRect(&tempRect);
	m_listPrefabs.InsertColumn(0, "Prefabs", LVCFMT_LEFT | LVS_SHOWSELALWAYS, (tempRect.right - tempRect.left) * 80 / 100);
	m_listPrefabs.ShowWindow(SW_SHOW);
	m_listPrefabs.UpdateWindow();

	//insert items
	for (CUInt i = 0; i < g_prefabPackagesAndNames.size(); i++)
	{
		CChar str[MAX_NAME_SIZE];
		Cpy(str, g_prefabPackagesAndNames[i].front().c_str());
		if (!Cmp(str, "Vanda_Basics"))
			InsertItemToPackageList(str);
	}
	RECT rect;
	m_listPrefabProperties.GetClientRect(&rect);
	m_listPrefabProperties.InsertColumn(0, "Parameters", LVCFMT_LEFT, rect.right - rect.left, 1);
	m_listPrefabProperties.SetExtendedStyle(LVS_EX_INFOTIP | LVS_EX_ONECLICKACTIVATE | LVS_EX_LABELTIP);
	InserItemToPropertiesList("Vertices");
	InserItemToPropertiesList("Textures");

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:DCubix,项目名称:1.4.0,代码行数:81,代码来源:PrefabDlg.cpp


示例2: Toolbar_UpdateUI

void Toolbar_UpdateUI(
  HWND hwnd)
  {
   HWND hwndFrame;
   HMENU hmenu;
   unsigned nCount;

   /*=======================================*/
   /* Get frame window (parent of toolbar). */
   /*=======================================*/
   
   hwndFrame = GetParent(hwnd);
   ASSERT(NULL != hwndFrame);

   /*===================================*/
   /* Get the main frame window's menu. */
   /*===================================*/
   
   hmenu = GetMenu(hwndFrame);
   //ASSERT (NULL != hmenu) ;

   if (NULL == hmenu)
     { return; }

   /*======================================*/
   /* Get count of buttons on the toolbar. */
   /*======================================*/
   
   nCount = Toolbar_ButtonCount(hwnd);

   /*===================================*/
   /* For each button on the toolbar... */
   /*===================================*/
   
   while (nCount > 0) 
     {
      BOOL bMenuEnabled, bButtonEnabled;
      TBBUTTON tbb;
      UINT uiState;

      /*===================================*/
      /* Get information about the button. */
      /*===================================*/
      
      VERIFY(Toolbar_GetButton(hwnd,--nCount,&tbb));

      /*==========================================*/
      /* If the button is a separator, ignore it. */
      /*==========================================*/
      
      if (tbb.fsStyle & TBSTYLE_SEP)
        { continue; }

      /*=========================================*/
      /* Get information about the corresponding */
      /* menu item, if any.                      */
      /*=========================================*/
      
      uiState = GetMenuState(hmenu,(unsigned) tbb.idCommand,MF_BYCOMMAND);
      if (0xFFFFFFFF == uiState)
        { bMenuEnabled = FALSE; }
      else
        { bMenuEnabled = 0 == (uiState & (MF_DISABLED | MF_GRAYED)); }

      bButtonEnabled = 0 != (tbb.fsState & TBSTATE_ENABLED);

      /*===========================================*/
      /* If button and menu are in the same state, */
      /* we need do nothing for this button.       */
      /*===========================================*/
      
      if (bMenuEnabled == bButtonEnabled)
        { continue; }

      /*=====================================*/
      /* Enable/Disable this toolbar button. */
      /*=====================================*/
      
      VERIFY(Toolbar_EnableButton(hwnd,tbb.idCommand,bMenuEnabled));
     }
  }
开发者ID:noxdafox,项目名称:clips,代码行数:81,代码来源:MainFrameToolbar.c


示例3: MainProc


//.........这里部分代码省略.........
            msg = WM_MBUTTONDOWN;
        }
        TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
        return 0;

    case WM_RBUTTONUP:
        WINE_TRACE("WM_RBUTTONUP\n");
        if( wParam & MK_LBUTTON )
            msg = WM_MBUTTONUP;
        TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
        return 0;

    case WM_MBUTTONDOWN:
        WINE_TRACE("WM_MBUTTONDOWN\n");
        TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
        return 0;

    case WM_MBUTTONUP:
        WINE_TRACE("WM_MBUTTONUP\n");
        TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam), msg );
        return 0;

    case WM_MOUSEMOVE:
    {
        if( ( wParam & MK_MBUTTON ) ||
            ( ( wParam & MK_LBUTTON ) && ( wParam & MK_RBUTTON ) ) ) {
            msg = WM_MBUTTONDOWN;
        }
        else if( wParam & MK_LBUTTON ) {
            msg = WM_LBUTTONDOWN;
        }
        else {
            return 0;
        }

        TestBoard( hWnd, &board, (short)LOWORD(lParam), (short)HIWORD(lParam),  msg );

        return 0;
    }

    case WM_COMMAND:
        switch(LOWORD(wParam)) {
        case IDM_NEW:
            CreateBoard( &board );
            return 0;

        case IDM_MARKQ:
            hMenu = GetMenu( hWnd );
            board.IsMarkQ = !board.IsMarkQ;
            if( board.IsMarkQ )
                CheckMenuItem( hMenu, IDM_MARKQ, MF_CHECKED );
            else
                CheckMenuItem( hMenu, IDM_MARKQ, MF_UNCHECKED );
            return 0;

        case IDM_BEGINNER:
            SetDifficulty( &board, BEGINNER );
            CreateBoard( &board );
            return 0;

        case IDM_ADVANCED:
            SetDifficulty( &board, ADVANCED );
            CreateBoard( &board );
            return 0;

        case IDM_EXPERT:
            SetDifficulty( &board, EXPERT );
            CreateBoard( &board );
            return 0;

        case IDM_CUSTOM:
            SetDifficulty( &board, CUSTOM );
            CreateBoard( &board );
            return 0;

        case IDM_EXIT:
            SendMessageW( hWnd, WM_CLOSE, 0, 0);
            return 0;

        case IDM_TIMES:
            DialogBoxParamW( board.hInst, MAKEINTRESOURCEW(DLG_TIMES), hWnd,
                             TimesDlgProc, (LPARAM) &board);
            return 0;

        case IDM_ABOUT:
        {
            WCHAR appname[256], other[256];
            LoadStringW( board.hInst, IDS_APPNAME, appname, sizeof(appname)/sizeof(WCHAR) );
            LoadStringW( board.hInst, IDS_ABOUT, other, sizeof(other)/sizeof(WCHAR) );
            ShellAboutW( hWnd, appname, other,
                         LoadImageW(board.hInst, MAKEINTRESOURCEW(IDI_WINEMINE), IMAGE_ICON, 48, 48, LR_SHARED));
            return 0;
        }
        default:
            WINE_TRACE("Unknown WM_COMMAND command message received\n");
            break;
        }
    }
    return DefWindowProcW( hWnd, msg, wParam, lParam );
}
开发者ID:AndreRH,项目名称:wine,代码行数:101,代码来源:main.c


示例4: Show

	BOOL Show(HINSTANCE hInstance, int nCmdShow)
	{
		hInst = hInstance; // Store instance handle in our global variable

		int zoom = g_Config.iWindowZoom;
		if (zoom < 1) zoom = 1;
		if (zoom > 4) zoom = 4;
		
		RECT rc, rcOrig;
		GetWindowRectAtZoom(zoom, rcOrig, rc);

		u32 style = WS_OVERLAPPEDWINDOW;

		hwndMain = CreateWindowEx(0,szWindowClass, "", style,
			rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL);
		if (!hwndMain)
			return FALSE;

		hwndDisplay = CreateWindowEx(0, szDisplayClass, TEXT(""), WS_CHILD | WS_VISIBLE,
			rcOrig.left, rcOrig.top, rcOrig.right - rcOrig.left, rcOrig.bottom - rcOrig.top, hwndMain, 0, hInstance, 0);
		if (!hwndDisplay)
			return FALSE;

		menu = GetMenu(hwndMain);
#ifdef FINAL
		RemoveMenu(menu,2,MF_BYPOSITION);
		RemoveMenu(menu,2,MF_BYPOSITION);
#endif
		MENUINFO info;
		ZeroMemory(&info,sizeof(MENUINFO));
		info.cbSize = sizeof(MENUINFO);
		info.cyMax = 0;
		info.dwStyle = MNS_CHECKORBMP;
		info.fMask = MIM_STYLE;
		for (int i = 0; i < GetMenuItemCount(menu); i++)
		{
			SetMenuInfo(GetSubMenu(menu,i),&info);
		}
		UpdateMenus();

		//accept dragged files
		DragAcceptFiles(hwndMain, TRUE);

		hideCursor = true;
		SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);

		Update();
		SetPlaying(0);
		
		ShowWindow(hwndMain, nCmdShow);

		W32Util::MakeTopMost(hwndMain, g_Config.bTopMost);

#if ENABLE_TOUCH
		RegisterTouchWindow(hwndDisplay, TWF_WANTPALM);
#endif

		RAWINPUTDEVICE keyboard;
		memset(&keyboard, 0, sizeof(keyboard));
		keyboard.usUsagePage = 1;
		keyboard.usUsage = 6;
		keyboard.dwFlags = 0; // RIDEV_NOLEGACY | ;
		RegisterRawInputDevices(&keyboard, 1, sizeof(RAWINPUTDEVICE));

		SetFocus(hwndDisplay);

		return TRUE;
	}
开发者ID:AnimeReference,项目名称:ppsspp,代码行数:68,代码来源:WndMainWindow.cpp


示例5: CheckUndoMenu

void CheckUndoMenu(HWND hwnd, BOOL bEnable)
{
	bUndo = bEnable;
	EnableMenuItem(GetMenu(hwnd), IDM_UNDO, MF_BYCOMMAND | (bEnable ? MF_ENABLED : MF_GRAYED));
}
开发者ID:larryli,项目名称:BoxWorld,代码行数:5,代码来源:boxworld.c


示例6: switch

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 回调函数
LRESULT CALLBACK CMainWnd::MainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	CChildWnd *pWnd;
	TCHAR tzTemp[MAX_PATH];

	switch (uMsg)
	{
	case WM_CREATE:
		// 窗口被创建
		m_hWnd = hWnd;
		m_hMenu = GetMenu(m_hWnd);
		OnCreate();
		break;

	case WM_SIZE:
		// 尺寸改变
		OnSize(wParam, lParam);
		return 0;

	case WM_WINDOWPOSCHANGED:
		// 位置改变
		for (pWnd = CChildWnd::m_pHead; pWnd; pWnd = pWnd->m_pNext)
		{
			if (pWnd->m_hWnd)
			{
				pWnd->SetDrawRect();
			}
		}
		break;

	case WM_INITMENUPOPUP:
		// 弹出菜单初始化
		OnMenuPopup(wParam, lParam);
		break;

	case WM_MENUSELECT:
		// 菜单项被选择
		OnMenuSelect(LOWORD(wParam));
		break;

	case WM_EXITMENULOOP:
		// 退出菜单循环
		CClientWnd::SetStatusText(LNG_Ready);
		break;

	case WM_COMMAND:
		// 命令处理
		OnCommand(wParam, lParam);
		break;

	case WM_COPYDATA:
		// 本程序的其它实例通知打开文件
		if (((PCOPYDATASTRUCT) lParam)->dwData == IDM_File_Open)
		{
			static TCHAR s_tzFileName[MAX_PATH];

			lstrcpyn(s_tzFileName, (PTSTR) ((PCOPYDATASTRUCT) lParam)->lpData, MAX_PATH);
			PostMessage(m_hWnd, WM_COMMAND, IDM_File_Open, (LPARAM) s_tzFileName);
		}
		break;

	case WM_HOTKEY:
		// 热键消息
		if ((m_hWnd != GetForegroundWindow()) && (wParam == IDC_TrayIcon))
		{
			OnTrayIcon(FALSE);
		}
		break;

	case WM_DROPFILES:
		// 拖动文件
		DragQueryFile((HDROP) wParam, 0, tzTemp, MAX_PATH);
		DragFinish((HDROP) wParam);
		OnFileOpen(tzTemp);
		break;

	case WM_HELP:
		// 帮助
		OnCommand(IDM_Help_Content);
		break;

	case WM_DESTROY:
		// 窗口被销毁
		OnDestroy();
		break;
	}

	return DefFrameProc(hWnd, CClientWnd::m_hWnd, uMsg, wParam, lParam);
}
开发者ID:Yonsm,项目名称:RawPlayer,代码行数:91,代码来源:MainWnd.cpp


示例7: UpdateMenu

void UpdateMenu(HWND hWnd)
{
    HMENU hMenu = GetMenu(hWnd);
    CheckMenuRadioItem(hMenu, IDM_VIEW_25, IDM_VIEW_400, IDM_VIEW_100 + iViewScale, MF_BYCOMMAND);
    CheckMenuItem(hMenu, ID_VIEW_ANIMATE, bAnimate ? MF_CHECKED : MF_UNCHECKED);
}
开发者ID:hackshields,项目名称:antivirus,代码行数:6,代码来源:gifshow.cpp


示例8: MainWindowProc


//.........这里部分代码省略.........
                            case IDS_CAT_INTERNET:
                                UpdateApplicationsList(ENUM_CAT_INTERNET);
                                break;

                            case IDS_CAT_LIBS:
                                UpdateApplicationsList(ENUM_CAT_LIBS);
                                break;

                            case IDS_CAT_OFFICE:
                                UpdateApplicationsList(ENUM_CAT_OFFICE);
                                break;

                            case IDS_CAT_OTHER:
                                UpdateApplicationsList(ENUM_CAT_OTHER);
                                break;

                            case IDS_CAT_SCIENCE:
                                UpdateApplicationsList(ENUM_CAT_SCIENCE);
                                break;

                            case IDS_CAT_TOOLS:
                                UpdateApplicationsList(ENUM_CAT_TOOLS);
                                break;

                            case IDS_CAT_VIDEO:
                                UpdateApplicationsList(ENUM_CAT_VIDEO);
                                break;
                        }
                    }

                    /* Disable/enable items based on treeview selection */
                    if (IsSelectedNodeInstalled())
                    {
                        EnableMenuItem(GetMenu(hwnd), ID_REGREMOVE, MF_ENABLED);
                        EnableMenuItem(GetMenu(hwnd), ID_INSTALL, MF_GRAYED);
                        EnableMenuItem(GetMenu(hwnd), ID_UNINSTALL, MF_ENABLED);
                        EnableMenuItem(GetMenu(hwnd), ID_MODIFY, MF_ENABLED);

                        EnableMenuItem(GetMenu(hListView), ID_REGREMOVE, MF_ENABLED);
                        EnableMenuItem(GetMenu(hListView), ID_INSTALL, MF_GRAYED);
                        EnableMenuItem(GetMenu(hListView), ID_UNINSTALL, MF_ENABLED);
                        EnableMenuItem(GetMenu(hListView), ID_MODIFY, MF_ENABLED);

                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_REGREMOVE, TRUE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_INSTALL, FALSE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_UNINSTALL, TRUE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_MODIFY, TRUE);
                    }
                    else
                    {
                        EnableMenuItem(GetMenu(hwnd), ID_REGREMOVE, MF_GRAYED);
                        EnableMenuItem(GetMenu(hwnd), ID_INSTALL, MF_ENABLED);
                        EnableMenuItem(GetMenu(hwnd), ID_UNINSTALL, MF_GRAYED);
                        EnableMenuItem(GetMenu(hwnd), ID_MODIFY, MF_GRAYED);

                        EnableMenuItem(GetMenu(hListView), ID_REGREMOVE, MF_GRAYED);
                        EnableMenuItem(GetMenu(hListView), ID_INSTALL, MF_ENABLED);
                        EnableMenuItem(GetMenu(hListView), ID_UNINSTALL, MF_GRAYED);
                        EnableMenuItem(GetMenu(hListView), ID_MODIFY, MF_GRAYED);

                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_REGREMOVE, FALSE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_INSTALL, TRUE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_UNINSTALL, FALSE);
                        SendMessage(hToolBar, TB_ENABLEBUTTON, ID_MODIFY, FALSE);
                    }
                }
开发者ID:Strongc,项目名称:reactos,代码行数:67,代码来源:winmain.c


示例9: GetItem

PObjectBase MenuEditor::GetMenu(long& n, PObjectDatabase base, bool isSubMenu)
{
	// Get item from list control
    wxString label, shortcut, id, name, help, kind;
	PObjectBase menu;
    GetItem(n, label, shortcut, id, name, help, kind, &menu);

	bool createNew = true;
	if ( menu )
	{
		createNew = ( menu->GetClassName() != (isSubMenu ? wxT("submenu") : wxT("wxMenu")) );
	}

    // preserve original menu if the object types match
    // this preserves properties that are not exposed in the menu editor - like C++ scope
    if ( createNew  )
    {
		PObjectInfo info = base->GetObjectInfo(isSubMenu ? wxT("submenu") : wxT("wxMenu") );
		menu = base->NewObject(info);
    }


    label.Trim(true); label.Trim(false);
    menu->GetProperty( wxT("label") )->SetValue(label);
    menu->GetProperty( wxT("name") )->SetValue(name);

    int ident = GetItemIdentation(n);
    n++;
    while (n < m_menuList->GetItemCount() && GetItemIdentation(n) > ident)
    {
    	PObjectBase menuitem;
        GetItem(n, label, shortcut, id, name, help, kind, &menuitem);

		createNew = true;

        label.Trim(true); label.Trim(false);
        if (label == wxT("---"))
        {
        	if ( menuitem )
        	{
        		createNew = ( menuitem->GetClassName() != wxT("separator") );
        	}

        	if ( createNew )
        	{
				PObjectInfo info = base->GetObjectInfo( wxT("separator") );
				menuitem = base->NewObject(info);
        	}
            menu->AddChild(menuitem);
            menuitem->SetParent(menu);
            n++;
        }
        else if (HasChildren(n))
        {
            PObjectBase child = GetMenu(n, base);
            menu->AddChild(child);
            child->SetParent(menu);
        }
        else
        {
        	if ( menuitem )
        	{
        		createNew = ( menuitem->GetClassName() != wxT("wxMenuItem") );
        	}

        	if ( createNew )
        	{
				PObjectInfo info = base->GetObjectInfo( wxT("wxMenuItem") );
				menuitem = base->NewObject(info);
        	}
            menuitem->GetProperty( wxT("label") )->SetValue(label);
            menuitem->GetProperty( wxT("shortcut") )->SetValue(shortcut);
            menuitem->GetProperty( wxT("name") )->SetValue(name);
			menuitem->GetProperty( wxT("help") )->SetValue(help);
            menuitem->GetProperty( wxT("id") )->SetValue(id);
            menuitem->GetProperty( wxT("kind") )->SetValue(kind);
            menu->AddChild(menuitem);
            menuitem->SetParent(menu);
            n++;
        }
    }

    return menu;
}
开发者ID:Three-DS,项目名称:wxformbuilder-3.5.0,代码行数:84,代码来源:menueditor.cpp


示例10: ChatPopDown

// front end
void ChatPopDown()
{
  if(--chatCount <= 0)
	CheckMenuItem(GetMenu(hwndMain), IDM_NewChat, MF_UNCHECKED);
}
开发者ID:aneternalgoldenbraid,项目名称:xboard,代码行数:6,代码来源:wchat.c


示例11: init

void init()
{
	RgnHandle			tempRgn;
	Rect				BaseRect;
	OSErr				err;
	long				QDfeature/*, OSfeature*/;
	GDHandle			SaveGD;
	CGrafPtr			SavePort;

	/*	Initialize Managaer.	*/
	//InitGraf(&qd.thePort);
	//InitWindows();
	//InitDialogs(nil);
	InitCursor();
	FlushEvents(everyEvent, 0);
	
	/*	Set up menus.	*/
	mymenu0 = GetMenu(appleID);
	//AppendResMenu(mymenu0, 'DRVR');
	InsertMenu(mymenu0,0);
	mymenu1 = GetMenu(fileID);
	InsertMenu(mymenu1,0);
	DrawMenuBar();
	DoneFlag = false;
	ThePict = GetPicture(PictID);
	if (ThePict == nil)
		DoneFlag = true;

	/*	Use Gestalt to find is QuickDraw is avaiable.	*/
	/*if ((GetOSTrapAddress(Gestalttest) != GetOSTrapAddress(NoTrap))) {
		err = Gestalt(gestaltQuickdrawVersion, &QDfeature);
		if (err)
			DoneFlag = true;
		err = Gestalt(gestaltSystemVersion, &OSfeature);
		if (err)
			DoneFlag = true;
		if (!DoneFlag && (QDfeature & 0x0f00) != 0x0200 && OSfeature < 0x0605)
			DoneFlag = true;
		}
	else
		DoneFlag = true;*/
	
	err = Gestalt(gestaltQuickdrawVersion, &QDfeature);
	if (err != noErr || QDfeature < gestalt32BitQD)
		DoneFlag = true;

	/*	Set Rects.	*/
	SetRect(&BaseRect, 40, 60, 472, 282);
	SetRect(&WinMinusScroll, BaseRect.left-40, BaseRect.top-60, BaseRect.right-60, 
				BaseRect.bottom - 80);
	SetRect(&InitWindowSize, WinMinusScroll.left, WinMinusScroll.top, 
							WinMinusScroll.right, WinMinusScroll.bottom);
	tempRgn = GetGrayRgn();
	HLock ((Handle) tempRgn);
	//TotalRect = (**tempRgn).rgnBBox;
	GetRegionBounds(tempRgn, &TotalRect);
	/*SetRect(&minRect, 80, 80, (**tempRgn).rgnBBox.right - 40, 
				(**tempRgn).rgnBBox.bottom - 40);*/
	SetRect(&minRect, 80, 80, TotalRect.right - 40, TotalRect.bottom - 40);
	HUnlock ((Handle) tempRgn);

	/*	Open window and set up picture.	*/
	GetGWorld (&SavePort, &SaveGD);
	mycolors = GetCTable (clutID);
	(*mycolors)->ctFlags |= 0x4000;

	myWindow = NewCWindow(nil, &BaseRect, (ConstStr255Param)"", true, zoomDocProc, 
							(WindowPtr) -1, true, 150);
	SetGWorld(GetWindowPort(myWindow), SaveGD);
	DrawGrowIcon (myWindow);

	srcPalette = NewPalette (((**mycolors).ctSize)+1, mycolors,
			pmTolerant + pmExplicit + pmAnimated, 0);
	SetPalette ((WindowPtr) myWindow, srcPalette, true);
	
	GetGWorld (&SavePort, &SaveGD);
	err = NewGWorld (&offscreenGWorld, 8, &InitWindowSize, mycolors, nil, 0);
	if (err)
		Debugger();
	SetGWorld (offscreenGWorld, nil);
	EraseRect (&InitWindowSize);
	DrawPicture (ThePict, &InitWindowSize);
	SetGWorld (SavePort, SaveGD);
}
开发者ID:fruitsamples,项目名称:CopyBitsSpeedPalette,代码行数:84,代码来源:CopyBitsSpeedPalette.c


示例12: SafeGetMenu

pascal MenuHandle SafeGetMenu(short resourceID)
{	
	StAcroResourceContext resContext;

	return GetMenu(resourceID);
}
开发者ID:Ulysses1962,项目名称:light-imposition,代码行数:6,代码来源:SafeResources.cpp


示例13: WndProc


//.........这里部分代码省略.........

		distance_caption_handle = CreateWindowEx(WS_EX_TRANSPARENT, "STATIC", "Distance Thres:", WS_CHILD | WS_VISIBLE,
			thirdcolPos + 10, horzSeparatorPos + 10, 110, 30, hWnd, (HMENU)IDC_STATIC_DISTANCE_THRES, GetModuleHandle(NULL), NULL);
		distance_handle = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", std::to_string(DEFAULT_DISTANCE_THRES).c_str(), WS_CHILD | WS_VISIBLE,
			thirdcolPos + 125, horzSeparatorPos + 10, 50, 30, hWnd, (HMENU)IDC_EDIT_DISTANCE_THRES, GetModuleHandle(NULL), NULL);

		//base/match image selector
		check_box_handles[0] = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON", "Base Image", WS_CHILD | WS_VISIBLE | WS_GROUP | BS_AUTORADIOBUTTON,
			vertSeparatorPos + 10, horzSeparatorPos + 50, 165, 30, hWnd, (HMENU)IDC_CHECK_BOX_BASE, GetModuleHandle(NULL), NULL);
		check_box_handles[1] = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON", "Match Image", WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
			vertSeparatorPos + 10, horzSeparatorPos + 90, 165, 30, hWnd, (HMENU)IDC_CHECK_BOX_MATCH, GetModuleHandle(NULL), NULL);

		//merge checkbox
		merge_checkbox_handle = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON", "Merge Match to Base", WS_CHILD | BS_AUTOCHECKBOX,
			thirdcolPos + 10, horzSeparatorPos + 50, 165, 30, hWnd, (HMENU)IDC_CHECK_BOX_MERGE, GetModuleHandle(NULL), NULL);

		//base/match image selector
		check_box_handles[2] = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON", "Park", WS_CHILD | WS_VISIBLE | WS_GROUP | BS_AUTORADIOBUTTON,
			thirdcolPos + 10, horzSeparatorPos + 50, 80, 30, hWnd, (HMENU)IDC_CHECK_BOX_PARK, GetModuleHandle(NULL), NULL);
		check_box_handles[3] = CreateWindowEx(WS_EX_STATICEDGE, "BUTTON", "Leave", WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
			thirdcolPos + 95, horzSeparatorPos + 50, 80, 30, hWnd, (HMENU)IDC_CHECK_BOX_LEAVE, GetModuleHandle(NULL), NULL);

		//change spot
		CreateWindowEx(WS_EX_TRANSPARENT, "Static", "New Spot:", WS_CHILD | WS_VISIBLE,
			thirdcolPos + 10, horzSeparatorPos + 90, 110, 30, hWnd, (HMENU)IDC_STATIC_SPOT, GetModuleHandle(NULL), NULL);
		spot_handle = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE,
			thirdcolPos + 125, horzSeparatorPos + 90, 50, 30, hWnd, (HMENU)IDC_EDIT_SPOT, GetModuleHandle(NULL), NULL);

		//navigator
		leftnavi_button_handle = CreateWindowEx(WS_EX_CLIENTEDGE, "BUTTON", "<---", WS_CHILD | WS_VISIBLE,
			vertSeparatorPos + 100 - 80, horzSeparatorPos + 130, 80, 40, hWnd, (HMENU)IDC_BUTTON_LEFT, GetModuleHandle(NULL), NULL);
		rightnavi_button_handle = CreateWindowEx(WS_EX_CLIENTEDGE, "BUTTON", "--->", WS_CHILD | WS_VISIBLE,
			vertSeparatorPos + 185 - 80, horzSeparatorPos + 130, 80, 40, hWnd, (HMENU)IDC_BUTTON_RIGHT, GetModuleHandle(NULL), NULL);
		//save review result
		save_button_handle = CreateWindowEx(WS_EX_CLIENTEDGE, "BUTTON", "SAVE", WS_CHILD | WS_VISIBLE,
			vertSeparatorPos + 275, horzSeparatorPos + 130, 80, 40, hWnd, (HMENU)IDC_BUTTON_SAVE, GetModuleHandle(NULL), NULL);

		horzSeparatorPos += 175;
		CreateWindowEx(WS_EX_CLIENTEDGE, "Static", "", SS_ETCHEDHORZ | WS_CHILD | WS_VISIBLE, 5, horzSeparatorPos, 535, 10, hWnd, NULL, GetModuleHandle(NULL), NULL);
		
		CreateWindowEx(WS_EX_TRANSPARENT, "Static", "Latest Logs:", WS_CHILD | WS_VISIBLE,
			10, horzSeparatorPos + 10, 515, 30, hWnd, (HMENU)IDC_STATIC_RESULT, GetModuleHandle(NULL), NULL);
		result_handle = CreateWindowEx(WS_EX_TRANSPARENT, "STATIC", " Waiting for configurting the output file!", WS_CHILD | WS_VISIBLE,
			10, horzSeparatorPos + 40, 515, 110, hWnd, (HMENU)IDC_EDIT_RESULT, GetModuleHandle(NULL), NULL);

		EnableAllInteractions(false);

		// Gets Menu Handle
		menu_handle = GetMenu(hWnd);
		CheckMenuItem(menu_handle, IDM_PLAY_MOV, MF_CHECKED);
		
	}
	break;
	// press left mouse button somewhere in the main window to uncheck all radiobuttons (optionbuttons)
	case WM_LBUTTONDOWN:
	{
		if (BST_CHECKED == SendMessage(check_box_handles[0], BM_GETCHECK, 0, 0)){
			if (showClearTutorial){
				int ret = MessageBox(hWnd, "Enable the function to clear park/leave radio when clicking the background or a non-active component?", "You just clicked the background or a non-active component", MB_YESNO);
				showClearTutorial = false;
				enableClear = (ret == IDYES);
			}
		}
		
		if (enableClear){
			SendMessage(check_box_handles[2], BM_SETCHECK, BST_UNCHECKED, 0);
			SendMessage(check_box_handles[3], BM_SETCHECK, BST_UNCHECKED, 0);
		}
	}
	break;

	case WM_KEYDOWN:
	{
		int x = 0;
		switch (wParam)
		{
		case VK_LEFT:
			HandleMovement(-1);
			break;

		case VK_RIGHT:
			HandleMovement(+1);
			break;
		}
	}
	break;

	case WM_DESTROY:
		vio->Stop_Video();
		DestroyImage(BASE_TYPE);
		DestroyImage(MATCH_TYPE);
		closeOutputFile();

		PostQuitMessage(0);
		break;
	default:
		return DefWindowProc(hWnd, message, wParam, lParam);
	}
	return 0;
}
开发者ID:liuruilinspy,项目名称:vehicleTrackingReview,代码行数:101,代码来源:UsingOpenCV.cpp


示例14: dc

void COpenCVInterfaceDlg::OnPaint()
{
	CPaintDC dc(this); // device context for painting

	//In variabila r1 pastrez dimensiunile ferestrei picture1
	CRect r1;
	GetClientRect(&r1);

	int w,h;

	if(mainImage.cols)
	{
		//aleg minimul dintre dimensiunile imag si ale ferestrei de afisare
		if(mainImage.cols<r1.Width()) w=mainImage.cols;
		else w=r1.Width();
		if(mainImage.rows<r1.Height()) h=mainImage.rows;
		else h=r1.Height();

		//creez un dreptunghi cu dimensiunile minime si il umplu cu peria imagine
		CRect r(0,0,w-1,h-1);
		dc.FillRect(r,ImageBrush);

		CMenu* mmenu =GetMenu();
		CMenu* submenu =mmenu->GetSubMenu(1);
		UINT state = submenu->GetMenuState(ID_TOOLS_GRAYLEVELROW,MF_BYCOMMAND);
		UINT state1 = submenu->GetMenuState(ID_TOOLS_GRAYLEVELCOLUMN,MF_BYCOMMAND);
		ASSERT(state != 0xFFFFFFFF);
		ASSERT(state1 != 0xFFFFFFFF);
		if(state & MF_CHECKED)
		{ 
			if(gr->GetY()<mainImage.rows)
			{
				gr->setGCheck(true);
				CPen *pen = new CPen(PS_SOLID,1,RGB(255,0,0));
				CPen *oldPen;
				oldPen=(CPen*)dc.SelectObject(pen);
				dc.MoveTo(0,gr->GetY());
				dc.LineTo(mainImage.cols,gr->GetY());
				dc.SelectObject(oldPen);
				delete pen;
			}
		}
		else
		{
			if(state1 & MF_CHECKED)
			{
				gr->setGCheck(false);
				if(gr->GetX()<mainImage.cols)
				{
					CPen *pen = new CPen(PS_SOLID,1,RGB(255,0,0));
					CPen *oldPen;
					oldPen=(CPen*)dc.SelectObject(pen);
					dc.MoveTo(gr->GetX(),0);
					dc.LineTo(gr->GetX(),mainImage.rows);
					dc.SelectObject(oldPen);
					delete pen;
				}
			}

		}
	}
}
开发者ID:alduleacristi,项目名称:proiect-procesare-imagini,代码行数:62,代码来源:OpenCVInterfaceDlg.cpp


示例15: MainWindowProc

/*
 * WindowProc - main window message handler
 */
LONG CALLBACK MainWindowProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
    WORD                        cmd;
    about_info                  ai;
    HMENU                       mh;
    CommunicationBuffer         *dbginfo;

    switch ( msg ) {
    case WM_CREATE:
        setupSystemMenu( hwnd );
        MainLBox = CreateListBox( hwnd );
        mh = GetMenu( hwnd );
        if( ConfigData.auto_attatch ) {
            CheckMenuItem( mh, MENU_AUTO_ATTATCH, MF_BYCOMMAND | MF_CHECKED );
        }
        if( ConfigData.continue_exception ) {
            CheckMenuItem( mh, MENU_EXCEPTION_CONTINUE,
                                MF_BYCOMMAND | MF_CHECKED );
        }
        LBPrintf( MainLBox, STR_DRNT_STARTED, AppName );
        break;
    case WM_SIZE:
        MoveListBox( MainLBox, 0, 0, LOWORD( lparam ), HIWORD( lparam ) );
        ClearAlert();
        break;
    case WM_SYSCOMMAND:
        switch( wparam ) {
        case MENU_LOG_CURRENT_STATE:
        case MENU_LOG_OPTIONS:
        case MENU_TASK_CTL:
            SendMessage( hwnd, WM_COMMAND, wparam, 0 );
            break;
        default:
            return( DefWindowProc( hwnd, msg, wparam, lparam ) );
        }
        break;
    case WM_COMMAND:
        cmd = LOWORD( wparam );
        switch( cmd ) {
        case LISTBOX_1:
            break;
        case MENU_EXCEPTION_CONTINUE:
            ConfigData.continue_exception = !ConfigData.continue_exception;
            mh = GetMenu( hwnd );
            if( ConfigData.continue_exception ) {
                CheckMenuItem( mh, MENU_EXCEPTION_CONTINUE,
                                   MF_BYCOMMAND | MF_CHECKED );
            } else {
                CheckMenuItem( mh, MENU_EXCEPTION_CONTINUE,
                                   MF_BYCOMMAND | MF_UNCHECKED );
            }
            break;
        case MENU_LOG_VIEW:
            ViewLog();
            break;
        case MENU_NEW_TASK:
            CallProcCtl( MENU_NEW_TASK, NULL, NULL );
            break;
        case MENU_AUTO_ATTATCH:
            ConfigData.auto_attatch = ! ConfigData.auto_attatch;
            mh = GetMenu( hwnd );
            if( ConfigData.auto_attatch ) {
                CheckMenuItem( mh, MENU_AUTO_ATTATCH,
                               MF_BYCOMMAND | MF_CHECKED );
            } else {
                CheckMenuItem( mh, MENU_AUTO_ATTATCH,
                               MF_BYCOMMAND | MF_UNCHECKED );
            }
            break;
        case MENU_SHOW_DIP_STATUS:
            ShowDIPStatus( hwnd );
            break;
        case MENU_CLEAR:
            ClearListBox( MainLBox );
            break;
        case MENU_SAVE_AS:
            SaveListBox( SLB_SAVE_AS, SaveExtra, "", AppName, hwnd,
                         GetListBoxHwnd( MainLBox ) );
            break;
        case MENU_SAVE:
            SaveListBox( SLB_SAVE_TMP, SaveExtra, ".\\drwat.txt", AppName,
                         hwnd, GetListBoxHwnd( MainLBox ) );
            break;
        case MENU_FONT:
            if( ChooseMonoFont( hwnd ) ) {
                SetListBoxFont( MainLBox );
            }
            break;
        case MENU_MARK:
            ProcessMark( hwnd, Instance, MarkPrint );
            break;
        case MENU_ABOUT:
            ai.owner = hwnd;
            ai.inst = Instance;
            ai.name = AllocRCString( STR_ABOUT_NAME );
            ai.version = AllocRCString( STR_ABOUT_VERSION );
            ai.first_cr_year = "1993";
//.........这里部分代码省略.........
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:101,代码来源:drproc.c


示例16: mainWinProc

// The Main Window Procedure
LRESULT CALLBACK mainWinProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch(msg)
    {
        case WM_CTLCOLORSTATIC:     // Give Color Values to Buttons etc
            {
               // if ((HWND)lParam == standByChBox) // Check the button
                hBrushColor = CreateSolidBrush(RGB(255, 255, 255)); // White background is returned
                SetTextColor((HDC)wParam, RGB(0, 0, 0));            // Black foreground for text
                //SetTextColor((HDC)wParam, RGB(0x99, 0xB4, 0xD1));
                SetBkColor((HDC)wParam, RGB(255, 255, 255));        // White background for text

                // Background color that is used to repaint the control (doesn't affect text background)
                return (LRESULT)hBrushColor;
            }

////                RECT desktopRect,thisWindowRect;
////
////                GetWindowRect(GetDesktopWindow(), &desktopRect);
////                GetWindowRect(hwnd, &thisWindowRect);
////
////                // Set the destination rect to the lower right corner of the screen
////                desktopRect.left = desktopRect.right;
////                desktopRect.top = desktopRect.bottom;
////
////                // Animate
////                DrawAnimatedRects(hwnd, IDANI_CAPTION, &thisWindowRect, &desktopRect);
//
//

        case WM_SYSCOMMAND:
            switch ( LOWORD(wParam) )
            {
                case SC_MINIMIZE:  // Minimize Button
                    if (g_minToTray) // Minimize to Tray
                    {
                        // Show the notification icon
                        Shell_NotifyIcon(NIM_ADD,&notifyID);
                        // Hide the window
                        ShowWindow(hwnd,SW_HIDE);
                        return 0;
                    }
                    else // Regular Minimaze
                        return DefWindowProc(hwnd, msg, wParam, lParam);
                    break;
                default:
                    return DefWindowProc(hwnd, msg, wParam, lParam);
            }
            break;
        case WM_TRAYICON:
                if ( lParam == WM_LBUTTONDBLCLK )
                {
                   // Remove the icon from the system tray
                  Shell_NotifyIcon(NIM_DELETE, &notifyID);
                  // ..and show the window
                  ShowWindow(hwnd, SW_SHOW);
                  return 0;
                }
//                else if (lParam == WM_RBUTTONDOWN)
//                {
//                  // CASE CONTEXT MENU
//
//                }
                //return 0;
            //}
            break;
        case WM_COMMAND:    // Menu Command
            switch(LOWORD(wParam))
            {
                case ID_STANDBY_CHBOX: // Get standByChBox state
                    if ( IsDlgButtonChecked( hwnd, ID_STANDBY_CHBOX )== BST_CHECKED )
                         setExecState(hwnd, 1);
                    else setExecState(hwnd, 0);

                    break;
                case ID_NOSLEEP_CHBOX: // Get noSleepChBox state
                {
                    BOOL ch1,ch2;
                    if ( IsDlgButtonChecked( hwnd, ID_STANDBY_CHBOX )== BST_CHECKED ) ch1=true;
                    else ch1=false;
                    if ( IsDlgButtonChecked( hwnd, ID_NOSLEEP_CHBOX )== BST_CHECKED ) ch2=true;
                    else ch2=false;
                    if ( ch1 && ch2 )
                        setExecState(hwnd, 2);
                    else
                        if ( ch1 && !ch2 )
                            setExecState(hwnd, 1);
                        else setExecState(hwnd, 0);
                    break;
                }
                case ID_SETTINGS_MINTOTRAY: // Chenge menu item check state
                    {
                        HMENU mainMenu = GetMenu(hwnd);

                        UINT checkUncheck = (g_minToTray ? MF_UNCHECKED : MF_CHECKED);
                        CheckMenuItem(mainMenu, ID_SETTINGS_MINTOTRAY, checkUncheck);

                        g_minToTray = !g_minToTray;
                    }
//.........这里部分代码省略.........
开发者ID:ridelub,项目名称:PreventStandBy,代码行数:101,代码来源:main.cpp


示例17: WinMain

int WINAPI WinMain(	HINSTANCE hinstance,
					HINSTANCE hprevinstance,
					LPSTR lpcmdline,
					int ncmdshow)
{
// this is the winmain function

WNDCLASS winclass;	// this will hold the class we create
HWND	 hwnd;		// generic window handle
MSG		 msg;		// generic message
HDC      hdc;       // generic dc
PAINTSTRUCT ps;     // generic paintstruct

// first fill in the window class stucture
winclass.style			= CS_DBLCLKS | CS_OWNDC | 
                          CS_HREDRAW | CS_VREDRAW;
winclass.lpfnWndProc	= WindowProc;
winclass.cbClsExtra		= 0;
winclass.cbWndExtra		= 0;
winclass.hInstance		= hinstance;
winclass.hIcon			= LoadIcon(NULL, IDI_APPLICATION);
winclass.hCursor		= LoadCursor(NULL, IDC_ARROW);
winclass.hbrBackground	= (HBRUSH)GetStockObject(BLACK_BRUSH);
winclass.lpszMenuName	= NULL; 
winclass.lpszClassName	= WINDOW_CLASS_NAME;

// register the window class
if (!RegisterClass(&winclass))
	return(0);

// create the window, note the test to see if WINDOWED_APP is
// true to select the appropriate window flags
if (!(hwnd = CreateWindow(WINDOW_CLASS_NAME, // class
						  WINDOW_TITLE,	 // title
						  (WINDOWED_APP ? (WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION) : (WS_POPUP | WS_VISIBLE)),
					 	  0,0,	   // x,y
						  WINDOW_WIDTH,  // width
                          WINDOW_HEIGHT, // height
						  NULL,	   // handle to parent 
						  NULL,	   // handle to menu
						  hinstance,// instance
						  NULL)))	// creation parms
return(0);

// save the window handle and instance in a global
main_window_handle = hwnd;
main_instance      = hinstance;

// resize the window so that client is really width x height
if (WINDOWED_APP)
{
// now resize the window, so the client area is the actual size requested
// since there may be borders and controls if this is going to be a windowed app
// if the app is not windowed then it won't matter
RECT window_rect = {0,0,WINDOW_WIDTH-1,WINDOW_HEIGHT-1};

// make the call to adjust window_rect
AdjustWindowRectEx(&window_rect,
     GetWindowStyle(main_window_handle),
     GetMenu(main_window_handle) != NULL, 
     GetWindowExStyle(main_window_handle));

// save the global client offsets, they are needed in DDraw_Flip()
window_client_x0 = -window_rect.left;
window_client_y0 = -window_rect.top;

// now resize the window with a call to MoveWindow()
MoveWindow(main_window_handle,
           0, // x position
           0, // y position
           window_rect.right - window_rect.left, // width
           window_rect.bottom - window_rect.top, // height
           FALSE);

// show the window, so there's no garbage on first render
ShowWindow(main_window_handle, SW_SHOW);
} // end if windowed

// perform all game console specific initialization
Game_Init();

// disable CTRL-ALT_DEL, ALT_TAB, comment this line out 
// if it causes your system to crash
SystemParametersInfo(SPI_SCREENSAVERRUNNING, TRUE, NULL, 0);

// enter main event loop
while(1)
	{
	if (PeekMessage(&msg,NULL,0,0,PM_REMOVE))
		{ 
		// test if this is a quit
        if (msg.message == WM_QUIT)
           break;
	
		// translate any accelerator keys
		TranslateMessage(&msg);

		// send the message to the window proc
		DispatchMessage(&msg);
		} // end if
//.........这里部分代码省略.........
开发者ID:giantchen2012,项目名称:tricks-of-the-3d-game-programming-gurus,代码行数:101,代码来源:demoII3_6.cpp


示例18: wWinMain

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetMenuCount函数代码示例发布时间:2022-05-30
下一篇:
C++ GetMemoryPathEnable函数代码示例发布时间: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