News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Simple question about HWND

Started by Ar0n, September 02, 2014, 06:38:53 AM

Previous topic - Next topic

Ar0n

Hello guys, I have a simple question about window handles, can window handles changing in runtime? / Is it safe to store the HWND value of any window in a variable for later use?   that's :) thanks.

dedndave

if window creation is successful, the handle is valid until the window is destroyed
it is common practice to store window and control handles in "permanent" (global) memory for access by other procedures

Ar0n

Quote from: dedndave on September 02, 2014, 07:08:30 AM
if window creation is successful, the handle is valid until the window is destroyed
it is common practice to store window and control handles in "permanent" (global) memory for access by other procedures
thank you dedndave, just want to know if it's 100% safe.

RuiLoureiro

If the memory fails, it is only ...% safe ! No ?  :biggrin:

dedndave

well - it's safe in single-threaded models   :P