April 19, 2024, 11:31:27 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Invisible Cursor - invisible Scrollbars

Started by RitchieF, September 19, 2013, 03:11:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RitchieF

I want to write a text tool having 3 edit controls. Multiline with scrollbars vertical and horizontal.

Since it should have the look of the cnc control I'm working with I set the background color to black and the foreground color to green.

But this combination makes the cursor and the scrollbars no more visible.

Always thought Windows would adjust the colors of the controls to keep them visible but nope.

Can I adjust this anyhow ?

Thanks

Richard

LarryMc

I knew you couldn't see the regular cursor on a black background.
My cursor is white in a window application and in a dialog
I did a quick test to see about the scrollbars.
I can see the scrollbars just fine.

Can you post the three lines of code where you create the edit controls?
Can you post pictures of what the controls look like on your computer and what your cnc control looks like.
Do that and I'll see if I can help.

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

RitchieF


LarryMc

Okay, here goes
The cause of you not being able to see the cursor and scrollbars was the subclassing  message handler.
More precisely it was the case WM_NCCALCSIZE handler
It has a return 1 (1 or 0 doesn't matter)
If that is removed the scrollbars will appear.
I thought it was going to be that simple but it wasn't.
Everything looked fine until I moved another window on top of your app and then moved it off.
I got bleed through like when you use a @GROUP in a window.

I wasn't smart enough to figure out what I needed to do to fix it using that subclassing so
I modified your code to do what you wanted to do with just straight IWBasic code.

1st- when you create an edit control in IWBasic it automatically adds a EXSTYLE flag for client edge and a @BORDER style flag. (you don't know that without the source code)
So I used MODIFYSTYLE and MODIFYEXSTYLE commands to remove those styles which gave me borderless edit controls.
In then used the RECT command to draw the red outlines.
The rectangles had to over lap on adjacent edges otherwise you get thin lines on the far left and right and double lines in the center.
Once the rectangles were right I adjusted the positioning of the edit controls to fit inside the rectangles.
(If you'd do the same for the static controls at the top you wouldn't need that subclassing routine at all)

In your CONTROL  statements for the edit controls you had both the scroll and autoscroll flags  -  I took out the autos

Attached is just the main.iwb file and not the whole project.
Hope this will at least get you headed in the right direction.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

RitchieF

Great work Larry.
Exactly what I wanted  ;D

Thanks

Richard