In a pure C Win32 application, how can I detect if a HWND is a dialog?
In Win32, How can I detect if a HWND is a dialog?
726 Views Asked by rodrigocfd At
        	2
        	
        There are 2 best solutions below
1
                
                        
                            
                        
                        
                            On
                            
                                                    
                    
                Dialogs have a standard class name of "#32770". You can use GetClassName()/RealGetWindowClass() 1 to check if a window is using a dialog class.
1: see What makes RealGetWindowClass so much more real than GetClassName?
Use
GetClassLong()to find its class atom. Unless it was created with a custom window class (very unlikely), its class will beWC_DIALOG.