Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralwParam/lParam Pin
stevenson30-Oct-02 0:41
stevenson30-Oct-02 0:41 
GeneralRe: wParam/lParam Pin
Christian Graus30-Oct-02 1:16
protectorChristian Graus30-Oct-02 1:16 
GeneralOnMenuChar Pin
Paolo Giustinoni30-Oct-02 0:40
Paolo Giustinoni30-Oct-02 0:40 
Generala problem in memory allocation Pin
Gérald Mercet30-Oct-02 0:23
Gérald Mercet30-Oct-02 0:23 
GeneralRe: a problem in memory allocation Pin
tongc30-Oct-02 2:16
tongc30-Oct-02 2:16 
GeneralRe: a problem in memory allocation Pin
Gérald Mercet30-Oct-02 3:17
Gérald Mercet30-Oct-02 3:17 
GeneralDrawing Lines Pin
vijayaramaraju30-Oct-02 0:04
vijayaramaraju30-Oct-02 0:04 
GeneralRe: Drawing Lines Pin
Christian Graus30-Oct-02 1:19
protectorChristian Graus30-Oct-02 1:19 
You're trying to get the circuit to draw itself and therefore not cross ? A basic line intersection algorithm looks like this:

function ccw(p1, p2, p3)
// Slightly deficient function to determine if the two lines p1, p2 and
// p2, p3 turn in counter clockwise direction}
{
var dx1, dx2, dy1, dy2;
dx1 = p2.x - p1.x; dy1 = p2.y - p1.y;
dx2 = p3.x - p2.x; dy2 = p3.y - p2.y;
if (dy1/dx1 < dy2/dx2) return true;
else return false;
}

function intersect(l1, l2)
{
return ((ccw(l1.p1, l1.p2, l2.p1) != ccw(l1.p1, l1.p2, l2.p2))
&& (ccw(l2.p1, l2.p2, l1.p1) != ccw(l2.p1, l2.p2, l1.p2)));
}

That's in JScript, sorry.

Christian

No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002

Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002

During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
GeneralRe: Drawing Lines Pin
Stephane Rodriguez.30-Oct-02 1:48
Stephane Rodriguez.30-Oct-02 1:48 
GeneralRe: Drawing Lines Pin
Paul M Watt30-Oct-02 5:45
mentorPaul M Watt30-Oct-02 5:45 
GeneralBackground color in mainframe Pin
subhasri29-Oct-02 23:13
subhasri29-Oct-02 23:13 
GeneralRe: Background color in mainframe Pin
Mazdak30-Oct-02 0:15
Mazdak30-Oct-02 0:15 
Questioninstaller of VC++ application ? Pin
v b sunil29-Oct-02 21:12
v b sunil29-Oct-02 21:12 
AnswerRe: installer of VC++ application ? Pin
Pavel Klocek29-Oct-02 23:06
Pavel Klocek29-Oct-02 23:06 
GeneralRe: installer of VC++ application ? Pin
v b sunil30-Oct-02 6:17
v b sunil30-Oct-02 6:17 
AnswerRe: installer of VC++ application ? Pin
Trollslayer30-Oct-02 1:41
mentorTrollslayer30-Oct-02 1:41 
AnswerRe: installer of VC++ application ? Pin
Anonymous30-Oct-02 9:29
Anonymous30-Oct-02 9:29 
AnswerRe: installer of VC++ application ? Pin
v b sunil30-Oct-02 19:25
v b sunil30-Oct-02 19:25 
GeneralPeculiarity of hard-disk Pin
nencini29-Oct-02 21:01
nencini29-Oct-02 21:01 
GeneralDLL Question Pin
Stan the man29-Oct-02 20:37
Stan the man29-Oct-02 20:37 
GeneralRe: DLL Question Pin
Joaquín M López Muñoz29-Oct-02 21:11
Joaquín M López Muñoz29-Oct-02 21:11 
GeneralRe: DLL Question Pin
Stan the man29-Oct-02 21:59
Stan the man29-Oct-02 21:59 
GeneralRe: DLL Question Pin
Joaquín M López Muñoz29-Oct-02 23:08
Joaquín M López Muñoz29-Oct-02 23:08 
GeneralRe: DLL Question Pin
KarstenK30-Oct-02 1:49
mveKarstenK30-Oct-02 1:49 
GeneralRe: DLL Question Pin
Stan the man30-Oct-02 2:10
Stan the man30-Oct-02 2:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.