G
G
German2019-03-31 15:13:46
C++ / C#
German, 2019-03-31 15:13:46

How to remove lines around buttons and other elements in WinAPI?

I create a button like this:

hWndButton = CreateWindow(
    L"Button",
    L"Title",
    BS_PUSHBUTTON | BS_TEXT | WS_CHILD | WS_OVERLAPPED | WS_VISIBLE,
    100,
    100,
    100,
    50,
    hWnd,
    NULL,
    This,
    NULL
  );

But after pressing the button, all of it is surrounded by a black dotted line.
5ca0aee79308d496513557.png
How to get rid of it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
SerJook, 2019-03-31
@mrjbom

Try like this:
You can send this message to the parent window, and then the focus rectangle should disappear from all child controls.

F
furrya_black, 2017-01-12
@furrya_black

https://habrahabr.ru/company/mailru/blog/213455/

F
Faliah, 2017-01-13
@Faliah

Creates a variable cwhose value is set to an anonymous function. An anonymous function expects an object as an argument and returns an object in the same way. If the object passed as an argument has a property a, which, in turn, is also an object and has a property b, the function cwill return an object with one property band the value copied from the object property of the same name a.

// c :: Object -> Object

console.log( c({ a: { b: 'foo' } }) ) // -> Object {b: "foo"}

In all other cases, an object will be returned.
{ b: undefined }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question