本文整理汇总了C++中GetMainWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMainWindow函数的具体用法?C++ GetMainWindow怎么用?C++ GetMainWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetMainWindow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: if
void CViewCommander::Command_TAB_CLOSERIGHT( void )
{
if( GetDllShareData().m_Common.m_sTabBar.m_bDispTabWnd ){
int nGroup = 0;
// ウィンドウ一覧を取得する
EditNode* pEditNode;
int nCount = CAppNodeManager::getInstance()->GetOpenedWindowArr( &pEditNode, TRUE );
BOOL bSelfFound = FALSE;
if( 0 >= nCount )return;
for( int i = 0; i < nCount; i++ ){
if( pEditNode[i].m_hWnd == GetMainWindow() ){
pEditNode[i].m_hWnd = NULL; //自分自身は閉じない
nGroup = pEditNode[i].m_nGroup;
bSelfFound = TRUE;
}else if( !bSelfFound ){
pEditNode[i].m_hWnd = NULL; //左は閉じない
}
}
//終了要求を出す
CAppNodeGroupHandle(nGroup).RequestCloseEditor( pEditNode, nCount, FALSE, TRUE, GetMainWindow() );
delete []pEditNode;
}
return;
}
开发者ID:daisukekoba,项目名称:sakura-editor-trunk2,代码行数:27,代码来源:CViewCommander_Window.cpp
示例2: GetMainWindow
/* ウィンドウを閉じる */
void CViewCommander::Command_WINCLOSE( void )
{
/* 閉じる */
::PostMessage( GetMainWindow(), MYWM_CLOSE, 0, // 2007.02.13 ryoji WM_CLOSE→MYWM_CLOSEに変更
(LPARAM)CAppNodeManager::getInstance()->GetNextTab( GetMainWindow() ) ); // タブまとめ時、次のタブに移動 2013/4/10 Uchi
return;
}
开发者ID:daisukekoba,项目名称:sakura-editor-trunk2,代码行数:8,代码来源:CViewCommander_Window.cpp
示例3: GetMainWindow
bool VirtualKeyboard::loadKeyboardPack(const std::string &packName)
{
_kbdGUI->initSize(GetMainWindow().GetWidth(), GetMainWindow().GetHeight());
_loaded = false;
bool opened = false;
opened = openPack(packName, Config::GetConstInstance()->GetDataDir() + "/vkeyb");
// fallback to the current dir
if (!opened)
opened = openPack(packName, ".");
if (opened) {
_parser->setParseMode(VirtualKeyboardParser::kParseFull);
_loaded = _parser->parse();
if (_loaded) {
printf("Keyboard pack '%s' loaded successfully\n", packName.c_str());
} else {
printf("Error parsing the keyboard pack '%s\n'", packName.c_str());
}
} else {
printf("Keyboard pack not found\n");
}
return _loaded;
}
开发者ID:fluxer,项目名称:warmux,代码行数:28,代码来源:virtual-keyboard.cpp
示例4: HasScrollBar
bool ScrollBox::Update(const Point2i &mousePosition,
const Point2i &lastMousePosition)
{
// Force redrawing if we are scrolling and the mouse has moved
if (start_drag_offset!=NO_DRAG && mousePosition!=lastMousePosition) {
//NeedRedrawing();
}
bool redraw = need_redrawing;
bool updated = Widget::Update(mousePosition, lastMousePosition);
need_redrawing = redraw;
bool has_scrollbar = HasScrollBar();
m_up->SetVisible(has_scrollbar);
m_down->SetVisible(has_scrollbar);
updated |= WidgetList::Update(mousePosition, lastMousePosition);
if (has_scrollbar) {
GetMainWindow().BoxColor(GetScrollTrack(), dark_gray_color);
const Rectanglei& thumb = GetScrollThumb();
bool over = scroll_mode==SCROLL_MODE_THUMB || thumb.Contains(mousePosition);
GetMainWindow().BoxColor(thumb, over ? white_color : gray_color);
}
return updated;
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:27,代码来源:scroll_box.cpp
示例5: Save
bool TDocument::AllowClose()
{
if (IsModified())
{
bool save;
if (!TCommonDialogs::SaveChanges(fTitle, GetMainWindow(), save))
return false;
if (save)
{
// save the file
if (fFile.IsSpecified())
Save();
else
{
TFile* file = TCommonDialogs::SaveFile(NULL, GetMainWindow());
if (file)
{
SetFile(file);
Save();
delete file;
}
else
return false;
}
}
}
return true;
}
开发者ID:mikevoydanoff,项目名称:zoinks,代码行数:32,代码来源:TDocument.cpp
示例6: SoftwareTabView_OnSelectionChanged
static void SoftwareTabView_OnSelectionChanged(void)
{
int nTab = 0;
HWND hwndSoftwarePicker;
HWND hwndSoftwareDevView;
HWND hwndSoftwareList;
hwndSoftwarePicker = GetDlgItem(GetMainWindow(), IDC_SWLIST);
hwndSoftwareDevView = GetDlgItem(GetMainWindow(), IDC_SWDEVVIEW);
hwndSoftwareList = GetDlgItem(GetMainWindow(), IDC_SOFTLIST);
nTab = TabView_GetCurrentTab(GetDlgItem(GetMainWindow(), IDC_SWTAB));
switch(nTab)
{
case 0:
ShowWindow(hwndSoftwarePicker, SW_SHOW);
ShowWindow(hwndSoftwareDevView, SW_HIDE);
ShowWindow(hwndSoftwareList, SW_HIDE);
break;
case 1:
ShowWindow(hwndSoftwarePicker, SW_HIDE);
ShowWindow(hwndSoftwareDevView, SW_SHOW);
ShowWindow(hwndSoftwareList, SW_HIDE);
break;
case 2:
ShowWindow(hwndSoftwarePicker, SW_HIDE);
ShowWindow(hwndSoftwareDevView, SW_HIDE);
ShowWindow(hwndSoftwareList, SW_SHOW);
break;
}
}
开发者ID:crazii,项目名称:mameui,代码行数:33,代码来源:messui.cpp
示例7: SoftwareList_GetItemImage
static int SoftwareList_GetItemImage(HWND hwndPicker, int nItem)
{
iodevice_t nType;
int nIcon = 0;
int drvindex = 0;
const char *icon_name;
HWND hwndGamePicker = GetDlgItem(GetMainWindow(), IDC_LIST);
HWND hwndSoftwareList = GetDlgItem(GetMainWindow(), IDC_SOFTLIST);
drvindex = Picker_GetSelectedItem(hwndGamePicker);
nType = SoftwareList_GetImageType(hwndSoftwareList, nItem);
nIcon = GetMessIcon(drvindex, nType);
if (!nIcon)
{
switch(nType)
{
case IO_UNKNOWN:
nIcon = FindIconIndex(IDI_WIN_REDX);
break;
default:
icon_name = lookupdevice(nType)->icon_name;
if (!icon_name)
icon_name = device_image_interface::device_typename(nType);
nIcon = FindIconIndexByName(icon_name);
if (nIcon < 0)
nIcon = FindIconIndex(IDI_WIN_UNKNOWN);
break;
}
}
return nIcon;
}
开发者ID:crazii,项目名称:mameui,代码行数:31,代码来源:messui.cpp
示例8: WinQueryWindowULong
// For frame windows, 'Show' is equivalent to 'Show & Activate'
nsresult nsFrameWindow::Show( PRBool bState)
{
if( mWnd)
{
ULONG ulFlags;
if( bState) {
ULONG ulStyle = WinQueryWindowULong( GetMainWindow(), QWL_STYLE);
ulFlags = SWP_SHOW;
/* Don't activate the window unless the parent is visible */
if (WinIsWindowVisible(WinQueryWindow(GetMainWindow(), QW_PARENT)))
ulFlags |= SWP_ACTIVATE;
if (!( ulStyle & WS_VISIBLE)) {
PRInt32 sizeMode;
GetSizeMode( &sizeMode);
if ( sizeMode == nsSizeMode_Maximized) {
ulFlags |= SWP_MAXIMIZE;
} else if ( sizeMode == nsSizeMode_Minimized) {
ulFlags |= SWP_MINIMIZE;
} else {
ulFlags |= SWP_RESTORE;
}
}
if( ulStyle & WS_MINIMIZED)
ulFlags |= (SWP_RESTORE | SWP_MAXIMIZE);
}
else
ulFlags = SWP_HIDE | SWP_DEACTIVATE;
WinSetWindowPos( GetMainWindow(), NULLHANDLE, 0L, 0L, 0L, 0L, ulFlags);
SetWindowListVisibility( bState);
}
return NS_OK;
}
开发者ID:MozillaOnline,项目名称:gecko-dev,代码行数:34,代码来源:nsFrameWindow.cpp
示例9: DrawBackground
void Menu::DrawBackground()
{
if (!background) {
return;
}
background->ScaleSize(GetMainWindow().GetSize()+1);
background->Blit(GetMainWindow(), 0, 0);
}
开发者ID:Arnaud474,项目名称:Warmux,代码行数:8,代码来源:menu.cpp
示例10: LoadScreenShotEx
/* Allow us to pre-load the DIB once for future draws */
#ifdef MESS
BOOL LoadScreenShotEx(int nGame, LPCSTR lpSoftwareName, int nType)
#else /* !MESS */
BOOL LoadScreenShot(int nGame, int nType)
#endif /* MESS */
{
BOOL loaded = FALSE;
/* No need to reload the same one again */
#ifndef MESS
if (nGame == current_image_game && nType == current_image_type)
return TRUE;
#endif
/* Delete the last ones */
FreeScreenShot();
/* Load the DIB */
#ifdef MESS
if (lpSoftwareName)
{
int nParentIndex = -1;
loaded = LoadSoftwareScreenShot(drivers[nGame], lpSoftwareName, nType);
if (!loaded && DriverIsClone(nGame) == TRUE)
{
nParentIndex = GetParentIndex(drivers[nGame]);
loaded = LoadSoftwareScreenShot(drivers[nParentIndex], lpSoftwareName, nType);
}
}
if (!loaded)
#endif /* MESS */
{
loaded = LoadDIB(drivers[nGame]->name, &m_hDIB, &m_hPal, nType);
}
/* If not loaded, see if there is a clone and try that */
if (!loaded)
{
int nParentIndex = GetParentIndex(drivers[nGame]);
if( nParentIndex >= 0)
{
loaded = LoadDIB(drivers[nParentIndex]->name, &m_hDIB, &m_hPal, nType);
nParentIndex = GetParentIndex(drivers[nParentIndex]);
if (!loaded && nParentIndex >= 0)
loaded = LoadDIB(drivers[nParentIndex]->name, &m_hDIB, &m_hPal, nType);
}
}
if (loaded)
{
HDC hdc = GetDC(GetMainWindow());
m_hDDB = DIBToDDB(hdc, m_hDIB, NULL);
ReleaseDC(GetMainWindow(),hdc);
current_image_game = nGame;
current_image_type = nType;
}
return (loaded) ? TRUE : FALSE;
}
开发者ID:broftkd,项目名称:mess-cvs,代码行数:61,代码来源:screenshot.c
示例11: if
void CUISkin::SetWheelChannelChanging(bool fChanging,DWORD Delay)
{
if (fChanging) {
if (Delay>0)
::SetTimer(GetMainWindow(),TIMER_ID_WHEELCHANNELCHANGE,Delay,NULL);
m_fWheelChannelChanging=true;
} else if (m_fWheelChannelChanging) {
::KillTimer(GetMainWindow(),TIMER_ID_WHEELCHANNELCHANGE);
m_fWheelChannelChanging=false;
}
}
开发者ID:DBCTRADO,项目名称:TVTest,代码行数:11,代码来源:UISkin.cpp
示例12: LoadScreenShotEx
/* Allow us to pre-load the DIB once for future draws */
#ifdef MESS
BOOL LoadScreenShotEx(int nGame, LPCSTR lpSoftwareName, int nType)
#else /* !MESS */
BOOL LoadScreenShot(int nGame, int nType)
#endif /* MESS */
{
BOOL loaded = FALSE;
/* No need to reload the same one again */
#ifndef MESS
if (nGame == current_image_game && nType == current_image_type)
return TRUE;
#endif
/* Delete the last ones */
FreeScreenShot();
/* Load the DIB */
#ifdef MESS
if (lpSoftwareName)
{
loaded = LoadSoftwareScreenShot(drivers[nGame], lpSoftwareName, nType);
if (!loaded && (drivers[nGame]->clone_of && !(drivers[nGame]->clone_of->flags & NOT_A_DRIVER)))
loaded = LoadSoftwareScreenShot(drivers[nGame]->clone_of, lpSoftwareName, nType);
}
if (!loaded)
#endif /* MESS */
{
loaded = LoadDIB(drivers[nGame]->name, &m_hDIB, &m_hPal, nType);
}
/* If not loaded, see if there is a clone and try that */
if (!loaded
&& (drivers[nGame]->clone_of != NULL)
&& !(drivers[nGame]->clone_of->flags & NOT_A_DRIVER))
{
loaded = LoadDIB(drivers[nGame]->clone_of->name, &m_hDIB, &m_hPal, nType);
if (!loaded && drivers[nGame]->clone_of->clone_of)
loaded = LoadDIB(drivers[nGame]->clone_of->clone_of->name, &m_hDIB, &m_hPal, nType);
}
if (loaded)
{
HDC hdc = GetDC(GetMainWindow());
m_hDDB = DIBToDDB(hdc, m_hDIB, NULL);
ReleaseDC(GetMainWindow(),hdc);
current_image_game = nGame;
current_image_type = nType;
}
return (loaded) ? TRUE : FALSE;
}
开发者ID:Sunoo,项目名称:nonamemame,代码行数:55,代码来源:screenshot.c
示例13: GetCurrentDirectory
afx_msg void
CMapPropertiesDialog::OnBrowseBackgroundMusic()
{
char old_directory[MAX_PATH] = {0};
GetCurrentDirectory(MAX_PATH, old_directory);
std::string directory = GetMainWindow()->GetDefaultFolder(WA_SOUND);
SetCurrentDirectory(directory.c_str());
CSoundFileDialog dialog(FDM_OPEN);
if (dialog.DoModal() == IDOK)
{
std::string full_path = LPCTSTR(dialog.GetPathName());
std::string term("sounds");
size_t pos = full_path.rfind(term);
if (pos != std::string::npos)
{
CString path = full_path.substr(pos + 7).c_str();
path.Replace('\\', '/');
SetDlgItemText(IDC_MUSIC, path);
}
}
SetCurrentDirectory(old_directory);
}
开发者ID:FlyingJester,项目名称:sphere,代码行数:26,代码来源:MapPropertiesDialog.cpp
示例14: dialog
void t4p::VersionUpdateViewClass::OnHelpCheckForUpdates(wxCommandEvent& event) {
wxString currentVersion = Feature.GetCurrentVersion();
t4p::VersionUpdateDialogClass dialog(GetMainWindow(),
wxID_ANY, Feature.App.RunningThreads, currentVersion, false,
wxEmptyString);
dialog.ShowModal();
}
开发者ID:62BRAINS,项目名称:triumph4php,代码行数:7,代码来源:VersionUpdateViewClass.cpp
示例15: _T
/*! 入力補完
Ctrl+Spaceでここに到着。
CEditView::m_bHokan: 現在補完ウィンドウが表示されているかを表すフラグ。
@date 2001/06/19 asa-o 英大文字小文字を同一視する
候補が1つのときはそれに確定する
@date 2001/06/14 asa-o 参照データ変更
開くプロパティシートをタイプ別に変更y
@date 2000/09/15 JEPRO [Esc]キーと[x]ボタンでも中止できるように変更
@date 2005/01/10 genta CEditView_Commandから移動
*/
void CViewCommander::Command_HOKAN( void )
{
#if 0
// 2011.06.24 Moca Plugin導入に従い未設定の確認をやめる
retry:;
/* 補完候補一覧ファイルが設定されていないときは、設定するように促す。 */
// 2003.06.22 Moca ファイル内から検索する場合には補完ファイルの設定は必須ではない
if( m_pCommanderView->m_pTypeData->m_bUseHokanByFile == FALSE &&
m_pCommanderView->m_pTypeData->m_bUseHokanByKeyword == false &&
_T('\0') == m_pCommanderView->m_pTypeData->m_szHokanFile[0]
){
ConfirmBeep();
if( IDYES == ::ConfirmMessage( GetMainWindow(),
LS(STR_ERR_DLGEDITVWHOKAN1)
) ){
/* タイプ別設定 プロパティシート */
if( !CEditApp::getInstance()->m_pcPropertyManager->OpenPropertySheetTypes( 2, GetDocument()->m_cDocType.GetDocumentType() ) ){
return;
}
goto retry;
}
}
#endif
CNativeW cmemData;
/* カーソル直前の単語を取得 */
if( 0 < m_pCommanderView->GetParser().GetLeftWord( &cmemData, 100 ) ){
m_pCommanderView->ShowHokanMgr( cmemData, TRUE );
}else{
InfoBeep(); //2010.04.03 Error→Info
m_pCommanderView->SendStatusMessage(LS(STR_SUPPORT_NOT_COMPLITE)); // 2010.05.29 ステータスで表示
}
return;
}
开发者ID:daisukekoba,项目名称:sakura-editor-trunk2,代码行数:44,代码来源:CViewCommander_Support.cpp
示例16: SoftwarePicker_EnteringItem
static void SoftwarePicker_EnteringItem(HWND hwndSoftwarePicker, int nItem)
{
LPCSTR pszFullName;
LPCSTR pszName;
const char* tmp;
LPSTR s;
int drvindex = 0;
HWND hwndList;
hwndList = GetDlgItem(GetMainWindow(), IDC_LIST);
if (!s_bIgnoreSoftwarePickerNotifies)
{
drvindex = Picker_GetSelectedItem(hwndList);
// Get the fullname and partialname for this file
pszFullName = SoftwarePicker_LookupFilename(hwndSoftwarePicker, nItem);
tmp = strrchr(pszFullName, '\\');
pszName = tmp ? tmp + 1 : pszFullName;
// Do the dirty work
MessSpecifyImage(drvindex, NULL, pszFullName);
// Set up g_szSelectedItem, for the benefit of UpdateScreenShot()
strncpyz(g_szSelectedItem, pszName, ARRAY_LENGTH(g_szSelectedItem));
s = strrchr(g_szSelectedItem, '.');
if (s)
*s = '\0';
UpdateScreenShot();
}
}
开发者ID:crazii,项目名称:mameui,代码行数:32,代码来源:messui.cpp
示例17: TYPESAFE_DOWNCAST
//////////////////////////////////////////////////////////
// WinDEUApp
// ---------
// Ask for confirmation before exiting application
bool WinDEUApp::CanClose ()
{
BOOL result;
// Default member function
if ( TApplication::CanClose() == FALSE )
return FALSE;
TMainFrame *mainFrame = TYPESAFE_DOWNCAST(GetMainWindow(), TMainFrame);
// Close level editor and return
if ( mainFrame->inEditor )
{
mainFrame->StopEditLevel();
return FALSE;
}
// Last chance message
/*
result = mainFrame->MessageBox (
"Do you really want to quit?",
"Quit",
MB_YESNO | MB_ICONQUESTION) == IDYES ? TRUE : FALSE ;
*/
result = TRUE;
// Close WinHelp
if ( result && HelpOpened )
{
mainFrame->WinHelp(HelpFileName, HELP_QUIT, 0L);
HelpOpened = FALSE;
}
return result;
}
开发者ID:Sephraem,项目名称:Meridian59_103,代码行数:38,代码来源:windeapp.cpp
示例18: DirectXDialogProc
INT_PTR CALLBACK DirectXDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
HWND hEdit;
const char *directx_help =
MAMEUINAME " requires DirectX version 3 or later, which is a set of operating\r\n"
"system extensions by Microsoft for Windows 9x, NT and 2000.\r\n\r\n"
"Visit Microsoft's DirectX web page at http://www.microsoft.com/directx\r\n"
"download DirectX, install it, and then run " MAMEUINAME " again.\r\n";
switch (Msg)
{
case WM_INITDIALOG:
hEdit = GetDlgItem(hDlg, IDC_DIRECTX_HELP);
Edit_SetSel(hEdit, Edit_GetTextLength(hEdit), Edit_GetTextLength(hEdit));
Edit_ReplaceSel(hEdit, directx_help);
return 1;
case WM_COMMAND:
if (LOWORD(wParam) == IDB_WEB_PAGE)
ShellExecute(GetMainWindow(), NULL, TEXT("http://www.microsoft.com/directx"),
NULL, NULL, SW_SHOWNORMAL);
if (LOWORD(wParam) == IDCANCEL || LOWORD(wParam) == IDB_WEB_PAGE)
EndDialog(hDlg, 0);
return 1;
}
return 0;
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:29,代码来源:dialogs.c
示例19: SoftwareList_EnteringItem
static void SoftwareList_EnteringItem(HWND hwndSoftwareList, int nItem)
{
LPCSTR pszFullName;
LPCSTR pszFileName;
int drvindex = 0;
HWND hwndList;
hwndList = GetDlgItem(GetMainWindow(), IDC_LIST);
if (!s_bIgnoreSoftwarePickerNotifies)
{
drvindex = Picker_GetSelectedItem(hwndList);
// Get the fullname and partialname for this file
pszFileName = SoftwareList_LookupFilename(hwndSoftwareList, nItem); // to run the software
pszFullName = SoftwareList_LookupFullname(hwndSoftwareList, nItem); // for the screenshot
strncpyz(g_szSelectedSoftware, pszFileName, ARRAY_LENGTH(g_szSelectedSoftware));
strncpyz(g_szSelectedDevice, SoftwareList_LookupDevice(hwndSoftwareList, nItem), ARRAY_LENGTH(g_szSelectedDevice));
// Set up s_szSelecteItem, for the benefit of UpdateScreenShot()
strncpyz(g_szSelectedItem, pszFullName, ARRAY_LENGTH(g_szSelectedItem));
UpdateScreenShot();
}
drvindex++;
}
开发者ID:crazii,项目名称:mameui,代码行数:28,代码来源:messui.cpp
示例20: AddWindow
void TDocument::AddWindow(TTopLevelWindow* window)
{
TWindowContext::AddWindow(window);
if (fTitle.GetLength() > 0 && window == GetMainWindow())
window->SetTitle(fTitle);
}
开发者ID:mikevoydanoff,项目名称:zoinks,代码行数:7,代码来源:TDocument.cpp
注:本文中的GetMainWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论