Hey thanx alot:) Everything works GREAT now, I guess simpler is better:)
----- Original Message -----
From: "Schedler, Kurt" <Kur...@hi...>
To: <dev...@li...>
Sent: Thursday, May 17, 2001 1:25 PM
Subject: RE: [Dev-C++] help please
> Why not do something like this and save a few variables and conditions:
>
> bool ClickButton(RECT szRectName)
> {
> return (g_x > szRectName.left) && (g_x < szRectName.right) && (g_y >
> szRectName.top) && (g_y < szRectName.bottom)
> }
>
> Like the other post mentioned, the > and < were reversed in the last two
> comparisons. Remeber that the y axis goes down the screen from the top.
>
> -----Original Message-----
> From: Andre` Niel Cameron [mailto:ca...@op...]
> Sent: Thursday, May 17, 2001 10:06 AM
> To: dev...@li...
> Subject: [Dev-C++] help please
>
>
> Does any one see any errors here? It compiles fine it just doesn't
WORK!:(
> BOOL LeftRight;
> BOOL TopBottom;
>
> BOOL ClickButton(RECT szRectName)
> {
> if ((g_x > szRectName.left) && (g_x < szRectName.right))
> LeftRight = TRUE;
> else LeftRight = FALSE;
>
> if ((g_y < szRectName.top) && (g_y > szRectName.bottom))
> TopBottom = TRUE;
> else TopBottom = FALSE;
>
> if ((LeftRight = TRUE) && (TopBottom = TRUE))
> return TRUE;
> else return FALSE;
> }
>
>
>
> "The sender believes that this E-mail and any attachments were free of any
> virus, worm, Trojan horse, and/or malicious code when sent. This message
> and its attachments could have been infected during transmission. By
> reading the message and opening any attachments, the recipient accepts
full
> responsibility for taking protective and remedial action about viruses and
> other defects. The sender's employer is not liable for any loss or damage
> arising in any way from this message or its attachments."
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|