Hilfe - Suche - Mitglieder - Kalender
Vollansicht: Probleme beim starten eines Programmes
technoboard.at > Small Talk > Computer, Hardware & Software
Phatline
Hab das schon in einem anderen Tread gepostet,

es geht um mehrere PC-Mäuse die man gleichzeitig getrennt benutzen kann
Habe ein Programm, oder eine Sourccode? gefunden unter: dem link hier

Das Ganze sitzt in einem Ordner - (Bild anhang), es gibt keine *.exe datei, aber man kann eine *.C datei aufmachen

hab das file mit Microsoft visual C aufgemacht:



Ähm kann damit wer was anfangen? (visual c++....) wie kann man daraus ne EXE machen?

/****************************************************************************\
* *
* First.c *
* *
* This is the first Fastgraph for Windows example program. It demonstrates *
* tasks common to most Fastgraph for Windows programs and serves as a *
* template for building the other examples. *
* *
\***************************************************************************
*/

#include <windows.h>
#include <hapi.h>
#include <string.h>
#include <stdio.h>

LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);

char message[100];

int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdParam, int iCmdShow) {
static char szAppName[] = "Mouse Test";
HWND root;
MSG msg;
WNDCLASSEX wndclass;
int i;
HBITMAP cursors[2];
hPOINT hotspots[2];
int count = 0;

wndclass.cbSize = sizeof(wndclass);
wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wndclass.lpfnWndProc = WindowProc;
wndclass.cbClsExtra = 0;
wndclass.cbWndExtra = 0;
wndclass.hInstance = hInstance;
wndclass.hIcon = LoadIcon(NULL,IDI_APPLICATION);
wndclass.hCursor = LoadCursor(NULL,IDC_ARROW);
wndclass.hbrBackground = NULL;
wndclass.lpszMenuName = NULL;
wndclass.lpszClassName = szAppName;
wndclass.hIconSm = LoadIcon(NULL,IDI_APPLICATION);
RegisterClassEx(&wndclass);
root = CreateWindow(szAppName, // window class name
"CPNMouse for ordinary Windows applications", // window caption
(WS_OVERLAPPEDWINDOW | WS_ICONIC) & (~(WS_MAXIMIZEBOX | WS_THICKFRAME)), // window style
CW_USEDEFAULT, // initial x position
CW_USEDEFAULT, // initial y position
300, // initial x size
80, // initial y size
NULL, // parent window handle
NULL, // window menu handle
hInstance, // program instance handle
NULL); // creation parameters
ShowWindow(root,iCmdShow);

count = hInitialise(0, root, GetDC(NULL), BUTTON | MOVEMENT | CURSOR | CLIP | ACCELERATE);

sprintf(message, "I found %i mice using CPNMouse driver", count);

cursors[0] = LoadBitmap(hInstance, (LPCSTR) 20000);
cursors[1] = LoadBitmap(hInstance, (LPCSTR) 20001);

hotspots[0].x = 0;
hotspots[0].y = 0;
hotspots[1].x = 17;
hotspots[1].y = 0;

for (i = 0; i < count; ++i) {
if (i/2 == 0)
hSetCursor(i + 1, hotspots[i % 2], cursors[i % 2], 255, 0, 0);
if (i/2 == 1)
hSetCursor(i + 1, hotspots[i % 2], cursors[i % 2], 0, 255, 0);
if (i/2 == 2)
hSetCursor(i + 1, hotspots[i % 2], cursors[i % 2], 0, 0, 255);
if (i/2 >= 3)
hSetCursor(i + 1, hotspots[i % 2], cursors[i % 2], 0, 0, 0);
}

UpdateWindow(root);
while (GetMessage(&msg,NULL,0,0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}

/* CPNMOUSE
* Give the mice back to Windows. This is also done automatically when
* the application exits (even when it crashes) */
hCleanup();

return msg.wParam;
}

/****************************************************************************\
* *
* WindowProc *
* *
* Window procedure to handle messages sent to the window. *
* *
\***************************************************************************
*/
HDC hDC;
RECT rectangle;
LRESULT CALLBACK WindowProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam) {
PAINTSTRUCT ps;
RECT text;
hPOINT p;
int i;

switch (iMsg) {
case WM_CREATE:
hDC = GetDC(hWnd);
return 0;
case WM_PAINT:
BeginPaint(hWnd,&ps);
text.right = rectangle.right;
text.bottom = 40;
text.left = 20;
text.top = 20;
FillRect(hDC, &rectangle, (HBRUSH) (COLOR_WINDOW + 1));
DrawText(hDC, message, -1, &text, DT_END_ELLIPSIS);
EndPaint(hWnd,&ps);
return 0;
case WM_SETFOCUS:
InvalidateRect(hWnd,NULL,TRUE);
return 0;
case WM_SIZE:
rectangle.right = LOWORD(lParam);
rectangle.bottom = HIWORD(lParam);
return 0;
case WM_DESTROY:
ReleaseDC(hWnd,hDC);
PostQuitMessage(0);
return 0;
case (WM_USER + 1001):
hGetAbsolutePosition(HIBYTE(HIWORD(wParam)), &p);
SetCursorPos(p.x, p.y);
if (LOWORD(wParam) != 0)
mouse_event(((LOWORD(wParam)) << 1), 0, 0, 0, 0);
return 0;
}

return DefWindowProc(hWnd,iMsg,wParam,lParam);
}


Kennt sich da wer aus- wie macht man da ne Exe drauß
Phatline
hier das fenster nochmal im C
dj AcidGreen/Acidrecords
leeeesen >>>

"Ever wanted to harness the power of two or more mice on Windows 2000/XP? This is now possible using CPN Mouse, a mouse driver and API, which is intended for programmers wanting to support more than one pointing device in their Windows applications"

dh. das ding ist für coder gedacht die sowas in ihre programme einbaun wollen aber nicht als standalone tool ...

leider ...

heisst also > weitersuchen nach ner sw die ein standalone für win ist oder >>

schreib denen mal ein mail ob dir nicht ne standalone für win basteln wollen ;o)
dj AcidGreen/Acidrecords
sooo ich hab mir das jetzt genau angeschaut >>

downloaden >>
cpnmouse-ordinary-binary-0.1.0.zip
driver-binary-1.0.1.zip
api-binary-0.9.3.zip

und dann > driver installen ... also inf file rechtsklick installieren ..

und dann 2 mäuse anhängen und das file aus dem ordinary zip starten und schaun ob er was findet ...

wenn ned > weiter rumspielen ...
Phatline
geil, mauszeiger sind da und ich kann schon 3 mäuse getrennt herumnavigieren jedoch, kann man nix anclicken- shice mad.gif
dj AcidGreen/Acidrecords
hmm sollte gehn habs ned getestet .... schreib denen ein mail ;O)
Phatline
Ui Ui es funzt- thanks - hab die falsche application gestartet gehabt (demo.exe) man braucht ja ordinary exe.

Ok morgen krieg ich hoffentlich die Preisliste für die touchaufrüstfolien, dann wird bestellt und dann wird gerockt.

Aber wenn ich mir das Programm so anschau, und versuche z.B auf den Destkop z.B. mit der einen Maus einen Ordner zu verschieben und mit der anderen auch- funzt es nicht, - Also getrennt bewegen geht, gleichzeit drücken der rechten maustaste funzt net.

Also wird wieder nix mit mehreren Touchscreens auf einem Betriebssystem, weil touchen heißt ja- maustaste drücken- und wenn man zwei touchscreens betouchtet- wird nix gehen,

Aber ich geb nicht auf, ich werd was finden wink.gif
dj AcidGreen/Acidrecords
ZITAT
Aber wenn ich mir das Programm so anschau, und versuche z.B auf den Destkop z.B. mit der einen Maus einen Ordner zu verschieben und mit der anderen auch- funzt es nicht, - Also getrennt bewegen geht, gleichzeit drücken der rechten maustaste funzt net.



das klingt nicht gut !

ich vermute die haben das teil entwickelt damit man auf mulitmonitorsystemen mit der maus nicht so lange strecken absolvieren muss sonderen > pro schirm ne maus ...

big shit ist das .... was ich dir eh vorher noch schreiben wollte blöd ist sicher auch > das beide maus zeiger sicher weiss sind oder ? (bzw. so wie halt in win eingestellt.)
da wär noch fein wenn man die unterschiedlich einfärben könnte...
Dieses ist eine vereinfachte Darstellung unseres Foreninhaltes. Um die detaillierte Vollansicht mit Formatierung und Bildern zu betrachten, bitte hier klicken.
Invision Power Board © 2001-2024 Invision Power Services, Inc.