windows


How to prevent underlay child window from receving messages (windows API)


the Image of the overlapped windows
now I have 2 child windows overlapping on each others.
first one is a button. (Created First)
second one is just a black Rectangle created after the button and the list box under it(in the Linked image)
when the black child Created it's been painted and get the button covered correctly . and also when I hover the mouse over the area of the black child window it receives messages, but when the mouse enters the -hidden- underlay Button area , the button is repainting and clipping it's area from the overlapped black rect child window ,meaning it receives messages.
How can I prevent this button from receiving any messages when it's sibling -black child- is over?
Thanks in advance
the creating code of the black child
CreateWindowEx(0,controlerclassname,"",WS_CHILD|WS_VISIBLE,5,5,300,300,Hmainwin,0,Hinstance,0);
the WM_PAINT processing
HDC hdc;
PAINTSTRUCT ps;
RECT rc;
HBRUSH Hbrush;
GetClientRect(hwnd,&rc);
hdc = BeginPaint(hwnd,&ps);
Hbrush =CreateSolidBrush(RGB(10,10,10)); //(HBRUSH)GetStockObject(NULL_BRUSH); //
SelectObject(hdc,Hbrush);
Rectangle(hdc,rc.left,rc.top,rc.right,rc.bottom);
EndPaint(hwnd,&ps);
The Button Creating line
CreateWindowExA(0,"BUTTON" ,"Creat New Top Level Window", WS_CHILD | WS_VISIBLE | BS_FLAT, // Button Create
mainwndrc.left+10, mainwndrc.top+10 ,200,30,hwnd,(HMENU)ID_BTN_NEW,Hinstance,0);

Related Links

Compare last two created files with batch
How does Windows know to set daylight savings time even though PC is not connected to Internet?
How do I remove a role from an EC2 instance?
ExitCode of RunProgramInGuest in Jenkins job
CMD Batch - Search for last occurence of character while looping through file
How to modify a numeric variable value with Windows batch [duplicate]
How to make a popup menu ignore key strokes (WM_MENUCHAR) in Win32 API
How to retrieve public key token from .pfx file
IIS SMTP with SmartHost at SendGrid.Net
When creating a named pipe, does the PIPE_NOWAIT mode ever make a difference, if FILE_FLAG_OVERLAPPED is also specified?
How to remove carriage return and line feed characters from a text file using batch?
Windows - Can't find file on PATH, '.' not in PATH
Interacting with external program [closed]
Bulk insert line into text files
Ignoring all reboot requests in Chef
IShellItemImageFactory::GetImage stuck in multithreading environment

Categories

HOME
embedded
httparty
delphi-7
github-for-windows
vxml
regular-language
syntaxnet
pega
google-form
null-pointer
firefox-addon
chargify
template-engine
wolframalpha
nim
microsoft-ocr
articulate-storyline
short-url
interpreter
jackson-modules
nstimer
angular-translate
android-things
exchangewebservices
openmdao
vex
google-earth
scrollview
mustache
jett
android-maps-extensions
nested-lists
processwire
getlasterror
openerp-7
apic
lint
protein-database
bc
linq-to-objects
apache-stanbol
parser-generator
microsoft-metro
signal-strength
flask-login
rfc3339
xbmc
ntvs
lampp
fclose
azure-cli
compiler-design
subnet
payload
pybrain
reachability
rmongo
visual-studio-2008-sp1
omxplayer
android-dateutils
gogs
respondcms
appscale
swizzling
qiime
ikiwiki
toast
concept-insights
dynamics-nav-2016
java-money
vigenere
.bash-profile
sql-server-data-tools
adehabitathr
metatrader5
easyrtc
rickshaw
linkedin-jsapi
grails-domain-class
grails-plugin-rabbitmq
tinyxml
memset
radiant
maven-scm
gwt-openlayers
spring-3
jeromq
script#
cmmi
robotlegs
ilasm
convention
user-tracking
drawtobitmap
w3c-geolocation
instantiationexception
burndowncharts
django-piston
filesystemobject
netbeans6.1

Resources

Encrypt Message