Note that there are some explanatory texts on larger screens.

plurals
  1. POWin32 Window Styles Overlap Issue
    primarykey
    data
    text
    <p>I have two listboxes windows created by:</p> <pre><code>_objectList = CreateWindow("LISTBOX", NULL, WS_CHILD | WS_VISIBLE | LBS_STANDARD | LBS_SORT, 5, 50, 10, 50, _windowParent, NULL, _windowInstance, 0); _resourceList = CreateWindow("LISTBOX", NULL, WS_CHILD | WS_VISIBLE | LBS_STANDARD | LBS_SORT, 5, 50, 10, 50, _windowParent, NULL, _windowInstance, 0); ShowWindow(_objectList, 1); ShowWindow(_resourceList, 0); </code></pre> <p>They're positioned inside a TabControl box, and when I click a tab, I want to show one/hide the other. I'm doing this with:</p> <pre><code>//In the message proc function if(uMsg == WM_NOTIFY) { if(((LPNMHDR)lParam)-&gt;code == TCN_SELCHANGE) { if(((LPNMHDR)lParam)-&gt;hwndFrom == _tabControl.GetWindowHandle()) { int index = SendMessage(_tabControl.GetWindowHandle(), TCM_GETCURSEL, 0, 0); _tabControl.showTab(index); //this function will call the ShowWindow(); to show only the tab I'd like to display } } } </code></pre> <p>This is how the listbox looks when I first run the code (the ObjectList to the right): <a href="http://img.photobucket.com/albums/v204/Shakazahn/ListboxOK_zpsee5c62b9.jpg" rel="nofollow noreferrer">Listbox Properly Showing http://img.photobucket.com/albums/v204/Shakazahn/ListboxOK_zpsee5c62b9.jpg</a></p> <p>This is when I click the tab: <a href="http://img.photobucket.com/albums/v204/Shakazahn/ListboxNotOK_zps5d05a019.jpg" rel="nofollow noreferrer">Listbox Got Ugly All of a Sudden http://img.photobucket.com/albums/v204/Shakazahn/ListboxNotOK_zps5d05a019.jpg</a></p> <p>And if I click to show the first Listbox, I also get: <a href="http://img.photobucket.com/albums/v204/Shakazahn/ListboxNotOK2_zpsc1dca19a.jpg" rel="nofollow noreferrer">First Listbox Got Infected as Well http://img.photobucket.com/albums/v204/Shakazahn/ListboxNotOK2_zpsc1dca19a.jpg</a></p> <p>I tried changing some of the window Styles but nothing worked, also, I don't have a clue why this is happening... any fixes for this?</p> <p><strong>edit</strong>: After some tests, I found out that this is happening because both Listboxes are children of the mainWindow, not the tabControl window. If I set the parentWindow of both to the tabControl, they display fine, but I was having issues with window grandchildren and lots of subclassing, so I'm making all windows children of my main window. How can I fix this display issue?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload