mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-02 11:43:31 +00:00
Make GEDebugger the parent, not the tab control
This commit is contained in:
parent
68edc4ffcf
commit
7945f5cb7f
@ -93,6 +93,7 @@ static void RunPauseAction() {
|
|||||||
actionWait.notify_one();
|
actionWait.notify_one();
|
||||||
pauseAction = PAUSE_CONTINUE;
|
pauseAction = PAUSE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
|
CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent)
|
||||||
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent), frameWindow(NULL) {
|
: Dialog((LPCSTR)IDD_GEDEBUGGER, _hInstance, _hParent), frameWindow(NULL) {
|
||||||
breakCmds.resize(256, false);
|
breakCmds.resize(256, false);
|
||||||
@ -126,7 +127,7 @@ void CGEDebugger::SetupFrameWindow() {
|
|||||||
int CGEDebugger::addTabWindow(wchar_t* className, wchar_t* title, DWORD style)
|
int CGEDebugger::addTabWindow(wchar_t* className, wchar_t* title, DWORD style)
|
||||||
{
|
{
|
||||||
HWND tabControl = GetDlgItem(m_hDlg,IDC_GEDBG_MAINTAB);
|
HWND tabControl = GetDlgItem(m_hDlg,IDC_GEDBG_MAINTAB);
|
||||||
style |= WS_CHILD | WS_VISIBLE;
|
style |= WS_CHILD;
|
||||||
|
|
||||||
TCITEM tcItem;
|
TCITEM tcItem;
|
||||||
ZeroMemory (&tcItem,sizeof (tcItem));
|
ZeroMemory (&tcItem,sizeof (tcItem));
|
||||||
@ -141,12 +142,12 @@ int CGEDebugger::addTabWindow(wchar_t* className, wchar_t* title, DWORD style)
|
|||||||
|
|
||||||
RECT tabRect;
|
RECT tabRect;
|
||||||
GetWindowRect(tabControl,&tabRect);
|
GetWindowRect(tabControl,&tabRect);
|
||||||
MapWindowPoints(HWND_DESKTOP,tabControl,(LPPOINT)&tabRect,2);
|
MapWindowPoints(HWND_DESKTOP,m_hDlg,(LPPOINT)&tabRect,2);
|
||||||
TabCtrl_AdjustRect(tabControl, FALSE, &tabRect);
|
TabCtrl_AdjustRect(tabControl, FALSE, &tabRect);
|
||||||
|
|
||||||
HWND hwnd = CreateWindowEx(0,className,title,style,
|
HWND hwnd = CreateWindowEx(0,className,title,style,
|
||||||
tabRect.left,tabRect.top,tabRect.right-tabRect.left,tabRect.bottom-tabRect.top,
|
tabRect.left,tabRect.top,tabRect.right-tabRect.left,tabRect.bottom-tabRect.top,
|
||||||
tabControl,0,MainWindow::GetHInstance(),0);
|
m_hDlg,0,MainWindow::GetHInstance(),0);
|
||||||
tabs.push_back(hwnd);
|
tabs.push_back(hwnd);
|
||||||
|
|
||||||
showTab(index);
|
showTab(index);
|
||||||
@ -157,7 +158,7 @@ void CGEDebugger::showTab(int index)
|
|||||||
{
|
{
|
||||||
HWND tabControl = GetDlgItem(m_hDlg,IDC_GEDBG_MAINTAB);
|
HWND tabControl = GetDlgItem(m_hDlg,IDC_GEDBG_MAINTAB);
|
||||||
|
|
||||||
for (auto i = 0; i < tabs.size(); i++)
|
for (size_t i = 0; i < tabs.size(); i++)
|
||||||
{
|
{
|
||||||
ShowWindow(tabs[i],i == index ? SW_NORMAL : SW_HIDE);
|
ShowWindow(tabs[i],i == index ? SW_NORMAL : SW_HIDE);
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ private:
|
|||||||
void SetupFrameWindow();
|
void SetupFrameWindow();
|
||||||
int addTabWindow(wchar_t* className, wchar_t* title, DWORD style = 0);
|
int addTabWindow(wchar_t* className, wchar_t* title, DWORD style = 0);
|
||||||
void showTab(int index);
|
void showTab(int index);
|
||||||
HWND getTab(int index) { return tabs[index]; };
|
HWND getTab(unsigned int index) { return index >= tabs.size() ? 0 : tabs[index]; };
|
||||||
|
|
||||||
int dispListTab;
|
int dispListTab;
|
||||||
SimpleGLWindow *frameWindow;
|
SimpleGLWindow *frameWindow;
|
||||||
|
@ -171,7 +171,7 @@ FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
|||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Break",IDC_GEDBG_BREAK,0,0,48,14
|
PUSHBUTTON "Break",IDC_GEDBG_BREAK,0,0,48,14
|
||||||
PUSHBUTTON "Resume",IDC_GEDBG_RESUME,52,0,48,14
|
PUSHBUTTON "Resume",IDC_GEDBG_RESUME,52,0,48,14
|
||||||
CONTROL "",IDC_GEDBG_MAINTAB,"SysTabControl32",TCS_TABS | TCS_FOCUSONBUTTONDOWN ,10,16,480,180
|
CONTROL "",IDC_GEDBG_MAINTAB,"SysTabControl32",TCS_TABS ,10,16,480,180
|
||||||
CONTROL "",IDC_GEDBG_FRAME,"SimpleGLWindow",WS_CHILD | WS_VISIBLE,140,210,256,136
|
CONTROL "",IDC_GEDBG_FRAME,"SimpleGLWindow",WS_CHILD | WS_VISIBLE,140,210,256,136
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user