Bonjour
j ai bien compris ca et je le savais, ma question est
comment adapter ca pour que ca tourne aussi sous windows ?
si je savais faire, j aurais pas posé question mais je ne sais pas faire
si quelqu un a déja fait ce genre d interface sous les 2 systeme
mon projet est ici
http://www.ancestrologie.net/fr/test/ScoListe.zip
merci
Bonjour,
Le problème pour porter cela sous Windows :
1) La version Mac utilise des Declares qui attaquent les API du
système (ex HIWindowSetContentBorderThickness ...)
2) Windows ne gère pas le rafraichissement de la même manière que
MacOS X...
Donc, en bref, il faut trouver les appels correspondant dans Win32, et
gérer le rafraichissement spécifique à Windows.
A+
---
Stéphane Pinel - REAL Software
Support Technique en Français
43, Rue Marius Aufan 92300 Levallois-Perret (FR)
http://www.realsoftware.fr
Rejoignez la communauté francophone des développeurs REALbasic :
<http://www.realsoftware.com/support/listmanager/>
Le 24 juil. 08 à 17:09, Ancestrologie a écrit :
Bonjour
j essai désespérément de démarrer avec RB et j'essaie de faire une
appli au look iTunes
j ai trouvé un code sur le net, donc ça marche mais Uniquement pour
Mac et si je le passe sous windows, c est pas beau
comment adapter ce code pour windows
merci de votre aide
#if TargetMacOS then
if
System.IsFunctionAvailable("HIWindowSetContentBorderThickness","Carbon")
then
Soft Declare Function HIWindowSetContentBorderThickness lib
"Carbon" (inWindow as WindowPtr, inBorderThickness as Ptr) as integer
Soft Declare Function ChangeWindowAttributes Lib "Carbon" (window
as WindowPtr, setAttributes as Integer, clearAttributes as Integer) as
Integer
const kHIWindowBitRoundBottomBarCorners = 13
Dim OSError, oldAttr as integer
Dim BorderThickness as new MemoryBlock(16)
OSError =
ChangeWindowAttributes(me,Bitwise.ShiftLeft(1,(kHIWindowBitRoundBottomBarCorners-1)),0)
if TopHeight<>iTopBorder then
// we work around a bug with the top border not properly refreshing
BorderThickness.SingleValue(0) = TopHeight // Top
BorderThickness.SingleValue(4) = 0 // Left -Must Be Zero
BorderThickness.SingleValue(8) = BottomHeight+1 // Bottom
BorderThickness.SingleValue(12) = 0 // Right - Must Be Zero
OSError = HIWindowSetContentBorderThickness(me,BorderThickness)
end
BorderThickness.SingleValue(0) = TopHeight // Top
BorderThickness.SingleValue(4) = 0 // Left -Must Be Zero
BorderThickness.SingleValue(8) = BottomHeight // Bottom
BorderThickness.SingleValue(12) = 0 // Right - Must Be Zero
OSError = HIWindowSetContentBorderThickness(me,BorderThickness)
Return true // call was found and fired off
end if
#endif
|