Search : in
By :

C graphics

Last answer on Oct 7, 2009 10:43:28 am BST micky, on Oct 7, 2009 3:02:59 am BST 
 Report this message to moderators

Hello,
sir, i need mouse pointer on c graphics screen pleez help me

Configuration: Windows 2003 Internet Explorer 6.0

Best answers for « c graphics » in :
Compiling a program in C with Dev C++ on Vista ShowCompiling a program in C with Dev C++ on Vista Compiling a C source code under Vista with Dev C++, can be a quite difficult procedure. Quick solution: the g++ compiler To be used with Dev-PSV: Go to Tools/compiler options and...
Graphical interfaces for SQLite ShowGraphical interfaces for SQLite SQLite is a powerful database management engine found in a relatively small C programming library; it requires no monitoring and can be used with most programming languages (C, C++, Java, Python). Unlike...
Compiling C under linux/UNIX ShowCompiling C under linux/UNIX Introduction Gcc Syntax GCC Introduction Under linux, the C compiler is gcc. It is set as default under several distributions but not on Debian. You should install aptitude install gcc Gcc Gcc is the...
Download SiS UniVGA2 Graphic Driver ShowSilicon Integrated Systems Corporation, driver UniVGA2 is a SIS universal Graphic Driver which supports the following graphic chips : SiS650, SiS651, SiSM650, SiS650GX, SiS740, SiS650GL, SiSM741, SiS741GX, SiS741...
Download GAG Graphical Boot Manager ShowGraphical Boot Manager is a management programs. The application is launche when your computer starts up and allows you to choose the operational system which you would like to use. The main features : - the possibility to booter from nine...
Graphics cards - Video cards Show2D Accelerator Cards A graphics card, sometimes called a graphics adapter, video card or graphics accelerator, is a computer component which converts digital data into a graphical form which can be displayed on a monitor. The initial role of a...
S-video (Y/C) ShowThe S-Video standard The S-Video standard (for "Sony Video"), sometimes called Y/C, is a video transmission mode with separate components using different cables to carry information regarding luminance (luminosity) and chrominance (colour). An S...

1

 LouisSteph, on Oct 7, 2009 10:43:28 am BST

Dear Sir,

Following is a sample:

#include<graphics.h>
#include<stdio.h>
#include<conio.h>
#include<dos.h>
union REGS in,out;

int callmouse()
{
in.x.ax=1;
int86(51,&in,&out);
return 1;
}
void mouseposi(int &xpos,int &ypos,int &click)
{
in.x.ax=3;
int86(51,&in,&out);
click=out.x.bx;
xpos=out.x.cx;
ypos=out.x.dx;
}
int mousehide()
{
in.x.ax=2;
int86(51,&in,&out);
return 1;
}
void setposi(int &xpos,int &ypos)
{
in.x.ax=4;
in.x.cx=xpos;
in.x.dx=ypos;
int86(51,&in,&out);
}
int main()
{
int x,y,cl,a,b;
clrscr();
int g=DETECT,m;
initgraph(&g,&m,"c:\tc\bgi");
a=100;
b=400;
setposi(a,b);
callmouse();
do
{
mouseposi(x,y,cl);
gotoxy(10,9);
printf("\n\tMouse Position is: %d,%d",x,y);
printf("\n\tClick: %d",cl);
printf("\n\tPress any key to hide the mouse");
}while(!kbhit());
getch();
mousehide();
printf("\n\n\tPress any key to Exit");
getch();
}

This will solve your problem.

Thanks in advance.

Reply to LouisSteph