Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2117 connectés 

 


Dernière réponse
Sujet : Comment tracer un ligne en C++
darkoli

koulip31 a écrit a écrit :

heu question a part :  
 
ca se dessine pas dans un drawing context ou autre babiole m$  
car la ca me semble trop simple pour etre honete  :D  




 
Devine !!!

Code :
  1. Windows GDI
  2. MoveToEx
  3. The MoveToEx function updates the current position to the specified point and optionally returns the previous position.
  4. BOOL MoveToEx(
  5.   HDC hdc,          // handle to device context
  6.   int X,            // x-coordinate of new current position
  7.   int Y,            // y-coordinate of new current position
  8.   LPPOINT lpPoint   // old current position
  9. );
  10. Parameters
  11. hdc
  12. [in] Handle to a device context.
  13. X
  14. [in] Specifies the x-coordinate, in logical units, of the new position, in logical units.
  15. Y
  16. [in] Specifies the y-coordinate, in logical units, of the new position, in logical units.
  17. lpPoint
  18. [out] Pointer to a POINT structure that receives the previous current position. If this parameter is a NULL pointer, the previous position is not returned.
  19. Return Values
  20. If the function succeeds, the return value is nonzero.
  21. If the function fails, the return value is zero.
  22. Windows NT/2000/XP: To get extended error information, call GetLastError.
  23. Remarks
  24. The MoveToEx function affects all drawing functions.
  25. Example Code
  26. For an example, see Drawing Markers.
  27. Requirements
  28.  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  29.  Windows 95/98/Me: Included in Windows 95 and later.
  30.  Header: Declared in Wingdi.h; include Windows.h.
  31.  Library: Use Gdi32.lib.


Votre réponse
Nom d'utilisateur    Pour poster, vous devez être inscrit sur ce forum .... si ce n'est pas le cas, cliquez ici !
Le ton de votre message                        
                       
Votre réponse


[b][i][u][strike][spoiler][fixed][cpp][url][email][img][*]   
 
   [quote]
 

Options

 
Vous avez perdu votre mot de passe ?


Vue Rapide de la discussion
darkoli

koulip31 a écrit a écrit :

heu question a part :  
 
ca se dessine pas dans un drawing context ou autre babiole m$  
car la ca me semble trop simple pour etre honete  :D  




 
Devine !!!

Code :
  1. Windows GDI
  2. MoveToEx
  3. The MoveToEx function updates the current position to the specified point and optionally returns the previous position.
  4. BOOL MoveToEx(
  5.   HDC hdc,          // handle to device context
  6.   int X,            // x-coordinate of new current position
  7.   int Y,            // y-coordinate of new current position
  8.   LPPOINT lpPoint   // old current position
  9. );
  10. Parameters
  11. hdc
  12. [in] Handle to a device context.
  13. X
  14. [in] Specifies the x-coordinate, in logical units, of the new position, in logical units.
  15. Y
  16. [in] Specifies the y-coordinate, in logical units, of the new position, in logical units.
  17. lpPoint
  18. [out] Pointer to a POINT structure that receives the previous current position. If this parameter is a NULL pointer, the previous position is not returned.
  19. Return Values
  20. If the function succeeds, the return value is nonzero.
  21. If the function fails, the return value is zero.
  22. Windows NT/2000/XP: To get extended error information, call GetLastError.
  23. Remarks
  24. The MoveToEx function affects all drawing functions.
  25. Example Code
  26. For an example, see Drawing Markers.
  27. Requirements
  28.  Windows NT/2000/XP: Included in Windows NT 3.1 and later.
  29.  Windows 95/98/Me: Included in Windows 95 and later.
  30.  Header: Declared in Wingdi.h; include Windows.h.
  31.  Library: Use Gdi32.lib.

koulip31 heu question a part :  
 
ca se dessine pas dans un drawing context ou autre babiole m$  
car la ca me semble trop simple pour etre honete  :D
zion http://forum.hardware.fr/forum2.ph [...] h=&subcat=
 
Le point, puis la ligne..
 
Le prochain ce sera un rectangle, alors autant y allez directement:
 
FillRect
 
 :D
darkoli

DarkOli a écrit a écrit :

 
 
http://msdn.microsoft.com




 
Trouvé en deux minutes : http://msdn.microsoft.com/library/ [...] v_8bn7.asp

darkoli

Canucks a écrit a écrit :

Je voudrais savoir quelle librairie permet de tracer un ligne à l'écran. Cette librairie devra fonctionner avec le compilateur  Microsoft Visual C++.  
 
Merci.




 
http://msdn.microsoft.com

Canucks Je voudrais savoir quelle librairie permet de tracer un ligne à l'écran. Cette librairie devra fonctionner avec le compilateur  Microsoft Visual C++.  
 
Merci.

Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)