TODO: This should be linked to OnSize(). */
| 59 | |
| 60 | /* TODO: This should be linked to OnSize(). */ |
| 61 | void Explorerplusplus::SetListViewInitialPosition(HWND hListView) |
| 62 | { |
| 63 | RECT rc; |
| 64 | int mainWindowWidth; |
| 65 | int mainWindowHeight; |
| 66 | int indentBottom = 0; |
| 67 | int indentTop = 0; |
| 68 | int indentLeft = 0; |
| 69 | int indentRight = 0; |
| 70 | int indentRebar = 0; |
| 71 | |
| 72 | GetClientRect(m_hContainer,&rc); |
| 73 | |
| 74 | mainWindowWidth = GetRectWidth(&rc); |
| 75 | mainWindowHeight = GetRectHeight(&rc); |
| 76 | |
| 77 | if(m_hMainRebar) |
| 78 | { |
| 79 | GetWindowRect(m_hMainRebar,&rc); |
| 80 | indentRebar += GetRectHeight(&rc); |
| 81 | } |
| 82 | |
| 83 | if(m_config->showStatusBar) |
| 84 | { |
| 85 | GetWindowRect(m_hStatusBar,&rc); |
| 86 | indentBottom += GetRectHeight(&rc); |
| 87 | } |
| 88 | |
| 89 | if(m_config->showDisplayWindow) |
| 90 | { |
| 91 | if (m_config->displayWindowVertical) |
| 92 | { |
| 93 | indentRight += m_config->displayWindowWidth; |
| 94 | } |
| 95 | else |
| 96 | { |
| 97 | indentBottom += m_config->displayWindowHeight; |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | if(m_config->showFolders) |
| 102 | { |
| 103 | GetClientRect(m_hHolder,&rc); |
| 104 | indentLeft = GetRectWidth(&rc); |
| 105 | } |
| 106 | |
| 107 | indentTop = indentRebar; |
| 108 | |
| 109 | RECT tabWindowRect; |
| 110 | GetClientRect(m_tabContainer->GetHWND(), &tabWindowRect); |
| 111 | |
| 112 | int tabWindowHeight = GetRectHeight(&tabWindowRect); |
| 113 | |
| 114 | if(m_bShowTabBar) |
| 115 | { |
| 116 | if(!m_config->showTabBarAtBottom) |
| 117 | { |
| 118 | indentTop += tabWindowHeight; |
no test coverage detected