Bonjour,
Je cherche à remplacer le curseur standard de mon application (Projet Dialog) par un autre curseur, par exemple IDC_WAIT.
Ma contrainte est de ne pas passer par le message WM_SETCURSOR à chaque mouvement de souris pour afficher le sablier. Je désirerais le curseur sablier par défaut.
J’ai testé cette fonction :
	
	SetClassLong(m_hWnd,GCL_HCURSOR, (LONG) m_hCursWaitCursor);
 Ceci fonctionne tant que je ne passe pas sur les contrôles de la boite de dialogue affichée, embettant !
La msdn dit ceci mais je ne vois pas comment l’exploiter :
	
		
			
			
				
					
 Envoyé par 
MSDN
					
				 
				The system automatically displays the class cursor (the cursor associated with the window to which the cursor is pointing). You can assign a class cursor while registering a window class. The following example illustrates this by assigning a cursor handle to the hCursor member of the WNDCLASS <winclass_8yk2.htm> structure identified by the wc parameter.
WNDCLASS  wc; 
 
// Fill the window class structure with parameters that 
// describe the main window. 
 
wc.style = NULL;                        // class style(s) 
wc.lpfnWndProc = (WNDPROC) MainWndProc; // window procedure 
wc.cbClsExtra = 0;           // no per-class extra data 
wc.cbWndExtra = 0;           // no per-window extra data 
wc.hInstance = hinst;        // application that owns the class 
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);     // class icon 
wc.hCursor = LoadCursor(hinst, MAKEINTRESOURCE(230)); // class cursor 
wc.hbrBackground = GetStockObject(WHITE_BRUSH); // class background 
wc.lpszMenuName =  "GenericMenu";               // class menu 
wc.lpszClassName = "GenericWClass"              // class name 
 
// Register the window class. 
 
return RegisterClass(&wc); 
When the window class is registered, the cursor identified by 230 in the application's resource-definition file is the default cursor for all windows based on the class.
			
		 
	 
 Si vous avez quelque chose à me proposer, je suis preneur!
 
						
					
Partager