Jump to content
Tuts 4 You

[C++, WinApi] TabControl and OnTop bad color issue


mrexodia

Recommended Posts

Hello Tuts4you,

I'm working on a new project and for this tool I combined a few of my older tools in one tool with a 'simple' TabControl.

Everything with drawing the window above the tabcontrol works fine, but I experienced quite some problems when I introduced the "OnTop" checkbox that makes the window topmost (obvious lol)

First it works fine, but when I for example start Olly the background isn't redrawn. (See screenshot).

I tried some code from a keygen template I made, but this only makes the window flicker. (http://forum.tuts4you.com/topic/30054-solved-c-winapi-transparent-editbox/#entry141998)

ontop_tab.png

I attached the source code of tabs.h, this handles all the tabs but I'm sure nothing's here...

Thanks in advance,

Mr. eXoDia

PS Ask here if you need more sources, I will see what I can do.

EDIT: Also attached the tool itself, for testing

tabs.rar

akt_02alpha9.rar

Edited by Mr. eXoDia
Link to comment

Hi Mr. eXoDia

First it works fine, but when I for example start Olly the background isn't redrawn. (See screenshot).

I have this same bug with Ollydbg1 but not by Ollydbg2.

This same bugs have i with OllyDBg1 with Redraw (Option Appearance)

without your tool.

I think is a Redraw bug In Olly

Try: EnableThemeDialogTexture,hWnd,6

hxxp://msdn.microsoft.com/en-us/library/windows/desktop/bb773320%28v=vs.85%29.aspx

Greets,

Edited by ragdog
Link to comment

@ragdog: Thanks for the option, but when I add this to the tabs it's like this:

tabs_theme.png

This is only only with olly btw, I remember sykpe (not 100% sure) and also WMP or something caused the same error...

Greetings

Link to comment
This is only only with olly btw, I remember sykpe (not 100% sure)

Yes Ollydbg 1 have Redraw bugs you can it see under WIndows7 or XP

go to menu Option>>Appearance or any other option dialog .

I must Set the windows pos or Set focus on the dialog to see all Option

106bbe25c9.png

By Olldbg2 is this fixed

This is not a bug from your Arma tool only from Ollydbg1

I think this is a little Bugfix in Ollydbg1

Edited by ragdog
Link to comment

ah,

better then xD

Anyway, I tried the same with http://forum.tuts4you.com/blog/4/entry-40-endless-fun-with-tab-controls/ (Killboy's example)

I just edited the resources to add a textbox (thats the only thing that bugs with EnableThemeDialogTexture called. I used Window Handler v2.0 to make the window OnTop and when I opened olly nothing bad happened.

I already checked the child properties, but these are the same so I really don't know whats the issue.

Greetings

Link to comment

Hi Mr. eXoDia

Use

RedrawWindow,hWnd,0,0,RDW_INVALIDATE or RDW_UPDATENOW or RDW_ALLCHILDREN

I cannot c++ but i think you must put this line in your OnSelChanged Procedur

Greets

Edited by ragdog
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...