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

C++ OpenWindow函数代码示例

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

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



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

示例1: AskExit

void AskExit()
{
	if(CheckIfModified()==TRUE)
	{
		SetColor(LIGHTWHITE);
		SetBackColor(RED);
		OpenWindow(10,24,5,32);
		SetColor(YELLOW);
		Print_At(11,29,"Apply Changes on Exit?");
		SetColor(BLUE);
		SetBackColor(WHITE);
		SetBlink(ON);
		Print_At(13,32," <Yes> ");
		Print_At(13,42," <No> ");
		SetBlink(OFF);
		GetKey();
	}
	CloseAllWindows();
	VideoReset();
	if(keycode!=ESC && keychar!='n' && keychar!='N')
		if(WriteHeader(&id32)!=0)
		{
			printf("%s could not write to file\n" ,errstr);
			exit(1);
		}
	CloseFile();
	exit(0);
}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:28,代码来源:main.c


示例2: do_QueryInterface

NS_IMETHODIMP nsMessengerContentHandler::HandleContent(const char * aContentType,
                                                nsIInterfaceRequestor* aWindowContext, nsIRequest *request)
{
  nsresult rv = NS_OK;
  if (!request)
    return NS_ERROR_NULL_POINTER;

  // First of all, get the content type and make sure it is a content type we know how to handle!
  if (PL_strcasecmp(aContentType, "application/x-message-display") == 0) {
    nsCOMPtr<nsIURI> aUri;
    nsCOMPtr<nsIChannel> aChannel = do_QueryInterface(request);
    if (!aChannel) return NS_ERROR_FAILURE;

    rv = aChannel->GetURI(getter_AddRefs(aUri));
    if (aUri)
    {
      rv = request->Cancel(NS_ERROR_ABORT);
      if (NS_SUCCEEDED(rv))
      {
        nsCOMPtr<nsIURL> aUrl = do_QueryInterface(aUri);
        if (aUrl)
        {
          nsCAutoString queryPart;
          aUrl->GetQuery(queryPart);
          queryPart.ReplaceSubstring("type=message/rfc822", "type=application/x-message-display");
          aUrl->SetQuery(queryPart);
          rv = OpenWindow(aUri);
        }
      }
    }
  }

  return rv;
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:34,代码来源:nsMessengerContentHandler.cpp


示例3: fnkdat

void SinglePlayerMenu::OnLoadReplay()
{
	char tmp[FILENAME_MAX];
	fnkdat("replay/", tmp, FILENAME_MAX, FNKDAT_USER | FNKDAT_CREAT);
	std::string replaypath(tmp);
	OpenWindow(LoadSaveWindow::Create(false, pTextManager->getLocalized("Load Replay"), replaypath, "rpl"));
}
开发者ID:thebohemian,项目名称:dunelegacy-richiesbranch,代码行数:7,代码来源:SinglePlayerMenu.cpp


示例4: Init

bool Init(void)
{
	// platform-specific initialization
	Platform::Init();

	// create window
	OpenWindow();

	// hide the mouse cursor
	Platform::ShowCursor(false);

	// grab input
	Platform::GrabInput(true);

	// print OpenGL attributes
	PrintAttributes();

	// initialize console
	console = new Console(cmdCB);

	// initialize sound system
	Sound::Init();

	// pause audio
	Sound::Pause();

	// success!
	return true;    
}
开发者ID:Fissuras,项目名称:videoventure,代码行数:29,代码来源:Test.cpp


示例5: startSinglePlayerGame

void SinglePlayerMenu::CloseChildWindow() {
	std::string filename = "";
	std::string extension = "";
	LoadSaveWindow* pLoadSaveWindow = dynamic_cast<LoadSaveWindow*>(pChildWindow);
	if(pLoadSaveWindow != NULL) {
		filename = pLoadSaveWindow->GetFilename();
		extension = pLoadSaveWindow->GetExtension();
	}

	MenuClass::CloseChildWindow();

	if(filename != "") {
		if(extension == "dls") {

		    try {
                startSinglePlayerGame( GameInitSettings(filename) );
		    } catch (std::exception& e) {
		        // most probably the savegame file is not valid or from a different dune legacy version
                OpenWindow(MessageBox::Create(e.what()));
            }
		} else if(extension == "rpl") {
			startReplay(filename);
		}
	}
}
开发者ID:thebohemian,项目名称:dunelegacy-richiesbranch,代码行数:25,代码来源:SinglePlayerMenu.cpp


示例6: RestoreConfig

void RestoreConfig()
{
	int n;
	char *envname;
	char envbuf[256];
	char *name;
	char *ptr;
	char buf[80];

	SetColor(LIGHTWHITE);
	SetBackColor(BLUE);
	OpenWindow(10,10,3,60);
	SetColor(YELLOW);
	Print_At(10,13," Restore Predefined Configuration ");
	SetColor(LIGHTWHITE);
	Print_At(11,12,"Enter file name:");

	name=InputString(11,30,37,cfgfilename);
	if(name!=NULL && name[0]!=0)
	{
		strcpy(buf,name);
		ptr=(char *)strchr(buf,'.');
		if(ptr!=NULL) strset(ptr,0);
		strcpy(cfgfilename,buf);
		strcat(buf,".d32");
		n=open(buf,O_RDONLY | O_BINARY);
		if(n==-1)
		{
			envname=getenv("DOS32A");
			if(envname!=NULL)
			{
				ptr=strchr(envname,' ');
				if(ptr==NULL) ptr=strchr(envname,0);
				memset(envbuf,0,256);
				strncpy(envbuf,envname,(dword)ptr-(dword)envname);
				strcat(envbuf,"\\D32\\"); strcat(envbuf,buf);
				n=open(envbuf,O_RDWR | O_BINARY);
			}
		}
		if(n!=-1)
		{
			read(n,&id32,24);
			close(n);
			SetColor(LIGHTWHITE);
			SetBackColor(BLUE);
			strupr(buf);
			for(n=0; n<13; n++)
			{
				SetPos(24,66+n);
				PrintC(' ');
			}
			Print_At(24,66,"%.13s",buf);
		}
		else DiskError();
	}
	ValidateConfig();
	CloseWindow();
	if(mainmenu_sel==1) ShowBannerStatus();

}
开发者ID:ABratovic,项目名称:open-watcom-v2,代码行数:60,代码来源:main.c


示例7: OpenWindow

int
nsNativeViewerApp::Run()
{
  OpenWindow();
  mAppShell->Run();
  return 0;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:7,代码来源:nsXlibMain.cpp


示例8: OpenWindow

CApp::CApp( )
{
    fSpawnTimer = 0.0f;
    iLife = 10;
    OpenWindow( );
    Run( );
}
开发者ID:wildcherrycandy,项目名称:Angry-pokemon-game,代码行数:7,代码来源:CApp.cpp


示例9: QueryUserStop

int QueryUserStop(void)
{
     int control, result;
     static int Initialized = FALSE;

     PushHelpIndex(USER_STOP_INDEX);
     
     if (!Initialized)
     {
        Initialize();
        Initialized = TRUE;
     }
              
     SetStatusBar(RED, WHITE, "                                            ");
     SetStatusBar(RED, WHITE, " Defragmentation process stopped.");
     
     OpenWindow(&QueryBox);
     control = ControlWindow(&QueryBox);
     CloseWindow();

     /* Interpret values. */
     if (control == YESBUTTON)
        result = TRUE;
     else
        result = FALSE;

     PopHelpIndex();
     
     return result;
}
开发者ID:CivilPol,项目名称:sdcboot,代码行数:30,代码来源:stopdfrg.c


示例10: first

extern "C" int first()
{
	SysBase = *((struct ExecBase**)4);
	IntuitionBase = (struct IntuitionBase*)OpenLibrary("intuition.library", 37);
	DOSBase = (struct DosLibrary*)OpenLibrary("dos.library", 37);

	struct NewWindow nw = {0};

	nw.TopEdge = 0;
	nw.LeftEdge = 0;
	nw.Width = 100;
	nw.Height = 100;
	nw.Flags = WFLG_DRAGBAR;
	nw.Type = WBENCHSCREEN;

	struct Window* win = OpenWindow(&nw);
	if (win == NULL)
	{
		Write(Output(), (void* const)"Failed\n", 7);
		return 0;
	}

	Delay(50*4);

	CloseWindow(win);

	//DisplayBeep(NULL);
	return 0;
}
开发者ID:sigurdle,项目名称:FirstProject2,代码行数:29,代码来源:test.cpp


示例11: Init

	bool Init(void)
	{
		// initialize SDL
		if( SDL_Init( SDL_INIT_EVERYTHING ) < 0 )
			return false;    

		// Check for joystick
		if (SDL_NumJoysticks() > 0)
		{
			// Open joystick
			SDL_Joystick *joy = SDL_JoystickOpen(0);
			if(joy)
			{
				DebugPrint("Opened Joystick 0\n");
				DebugPrint("Name: %s\n", SDL_JoystickName(0));
			}
		}

		// enable unicode
		SDL_EnableUNICODE(1);

		// create the window
		OpenWindow();

		// set window title
		SDL_WM_SetCaption( "Shmup!", NULL );

		// platform-specific attributes
		PrintAttributes();

		// success!
		return true;    
	}
开发者ID:Fissuras,项目名称:videoventure,代码行数:33,代码来源:OneTime.cpp


示例12: ASSERT

void cChestEntity::OpenNewWindow(void)
{
	if (m_Neighbour != nullptr)
	{
		ASSERT(  // This should be the primary chest
			(m_Neighbour->GetPosX() < GetPosX()) ||
			(m_Neighbour->GetPosZ() < GetPosZ())
		);
		OpenWindow(new cChestWindow(this, m_Neighbour));
	}
	else
	{
		// There is no chest neighbour, open a single-chest window:
		OpenWindow(new cChestWindow(this));
	}
}
开发者ID:ThuGie,项目名称:MCServer,代码行数:16,代码来源:ChestEntity.cpp


示例13: FailOSErr

PDoc* PApp::OpenWorksheet()
{
	try
	{
		if (!gPrefsDir.Contains("Worksheet", B_FILE_NODE | B_SYMLINK_NODE))
		{
			BFile file;
			gPrefsDir.CreateFile("Worksheet", &file);
		}

		BEntry w;
		entry_ref wr;

		FailOSErr(gPrefsDir.FindEntry("Worksheet", &w, true));
		FailOSErr(w.GetRef(&wr));
		OpenWindow(wr);

		PDoc *d = dynamic_cast<PDoc*>(CDoc::FindDoc(wr));
		if (d)
			d->MakeWorksheet();

		return d;
	}
	catch (HErr& e)
	{
		e.DoError();
	}

	return NULL;
} /* PApp::OpenWorksheet */
开发者ID:jscipione,项目名称:Paladin,代码行数:30,代码来源:PApp.cpp


示例14: ReportDefragDone

int ReportDefragDone(void)
{
    static int Initialized = FALSE;

    int control, i, result;

    if (!Initialized)
    {
        Initialize();
        Initialized = TRUE;
    }

    SetStatusBar(RED, WHITE, "                                            ");
    SetStatusBar(RED, WHITE, " Defragmentation done.");

    OpenWindow(&DoneDialog);
    do {
        control = ControlWindow(&DoneDialog);
    } while (control != OKBUTTON);
    CloseWindow();

    for (i = 0; i < 3; i++)
        if (SelectButtons[i].selected)
        {
            result = i;
            SelectButtons[i].selected = FALSE;
        }

    SelectButtons[DEFAULT_OPTION].selected = TRUE;
    return result;
}
开发者ID:CivilPol,项目名称:sdcboot,代码行数:31,代码来源:defrdone.c


示例15: cOpenDouble

void cChestEntity::OpenNewWindow(void)
{
	// TODO: cats are an obstruction
	if ((GetPosY() + 1 < cChunkDef::Height) && cBlockInfo::IsSolid(GetWorld()->GetBlock(GetPosX(), GetPosY() + 1, GetPosZ())))
	{
		// Obstruction, don't open
		return;
	}

	// Callback for opening together with neighbor chest:
	class cOpenDouble :
		public cChestCallback
	{
		cChestEntity * m_ThisChest;
	public:
		cOpenDouble(cChestEntity * a_ThisChest) :
			m_ThisChest(a_ThisChest)
		{
		}
		
		virtual bool Item(cChestEntity * a_Chest) override
		{
			if ((a_Chest->GetPosY() + 1 < cChunkDef::Height) && cBlockInfo::IsSolid(a_Chest->GetWorld()->GetBlock(a_Chest->GetPosX(), a_Chest->GetPosY() + 1, a_Chest->GetPosZ())))
			{
				// Obstruction, don't open
				return false;
			}

			// The primary chest should eb the one with lesser X or Z coord:
			cChestEntity * Primary = a_Chest;
			cChestEntity * Secondary = m_ThisChest;
			if (
				(Primary->GetPosX() > Secondary->GetPosX()) ||
				(Primary->GetPosZ() > Secondary->GetPosZ())
			)
			{
				std::swap(Primary, Secondary);
			}
			m_ThisChest->OpenWindow(new cChestWindow(Primary, Secondary));
			return false;
		}
	} ;
	
	// Scan neighbors for adjacent chests:
	cOpenDouble OpenDbl(this);
	if (
		m_World->DoWithChestAt(m_PosX - 1, m_PosY, m_PosZ,     OpenDbl) ||
		m_World->DoWithChestAt(m_PosX + 1, m_PosY, m_PosZ,     OpenDbl) ||
		m_World->DoWithChestAt(m_PosX,     m_PosY, m_PosZ - 1, OpenDbl) ||
		m_World->DoWithChestAt(m_PosX,     m_PosY, m_PosZ + 1, OpenDbl)
	)
	{
		// The double-chest window has been opened in the callback
		return;
	}

	// There is no chest neighbor, open a single-chest window:
	OpenWindow(new cChestWindow(this));
}
开发者ID:ChriPiv,项目名称:MCServer,代码行数:59,代码来源:ChestEntity.cpp


示例16: UpdateWindowAction

void UpdateWindowAction()
{
	if (runtime)
	{
		CloseWindow();
		OpenWindow();
	}
}
开发者ID:Fissuras,项目名称:videoventure,代码行数:8,代码来源:Command.cpp


示例17: PRINTF

int
nsNativeViewerApp::Run()
{
  PRINTF( ">>> nsViewerApp::Run() <<<\n" );
  OpenWindow();
  mAppShell->Run();
  return 0;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:8,代码来源:nsPhMain.cpp


示例18: WinMain

int WINAPI WinMain(HINSTANCE me, HINSTANCE x, LPSTR cmdline, int cmdShow) {
    ghInst = me;
    CreateClass();
    OpenWindow();
    Run();
    if (nl != 0) {
        nl->shutdown();
    }
    return 0;
}
开发者ID:jwatte,项目名称:netlight,代码行数:10,代码来源:pongservermain.cpp


示例19: GetWindow

void cHorse::PlayerOpenWindow(cPlayer & a_Player)
{
	auto Window = GetWindow();
	if (Window == nullptr)
	{
		Window = new cHorseWindow(*this);
		OpenWindow(Window);
	}

	a_Player.OpenWindow(*Window);
}
开发者ID:changyongGuo,项目名称:cuberite,代码行数:11,代码来源:Horse.cpp


示例20: DrvEjectAll

BOOL        DrvEjectAll( HWND hwnd)

{
    BOOL    fRtn = FALSE;

    if (!CAM_IS_MSD || CAMDRV_IS_NEVEREJECT ||
        !OpenWindow( hwnd, IDD_EJECTALL, 0))
        fRtn = TRUE;

    return (fRtn);
}
开发者ID:OS2World,项目名称:APP-GRAPHICS-Cameraderie,代码行数:11,代码来源:camdrive.c



注:本文中的OpenWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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