LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
/* The Window structure */
wincl.hInstance = hThisInstance;
wincl.lpszClassName = szClassName;
wincl.lpfnWndProc = WindowProcedure; /* This function is called by windows */
wincl.style = CS_DBLCLKS; /* Catch double-clicks */
wincl.cbSize = sizeof (WNDCLASSEX);
/* Use default icon and mouse-pointer */
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL; /* No menu */
wincl.cbClsExtra = 0; /* No extra bytes after the window class */
wincl.cbWndExtra = 0; /* structure or the window instance */
/* Use Windows's default color as the background of the window */
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
/* Register the window class, and if it fails quit the program */
if (!RegisterClassEx (&wincl))
return 0;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx (
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"M2History Hack", /* Title Text */
WS_SYSMENU | WS_MINIMIZEBOX, /* default window */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window ends up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage() returns 0 */
while (GetMessage (&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage() gave */
return messages.wParam;
}
/* This function is called by the Windows function DispatchMessage() */
break;
case WM_COMMAND:
if(LOWORD(wParam)==1){
MessageBox(hwnd,"content","title", MB_OK | MB_ICONINFORMATION);
}
break;
case WM_DESTROY:
PostQuitMessage (0); /* send a WM_QUIT to the message queue */
break;
default: /* for messages that we don't deal with */
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
So i want 2 things,and i can't get them...
1. if i simply type at the beggining of the dll " #include "dll.h" " , when i inject it, the window doesn't show up.
2.Attribuate the hello function to that button.
I think i know how to make the second, but i can't get the first :-s
Per Button Func Aktivieren? 12/25/2011 - AutoIt - 2 Replies Undzwar moechte ich vorerst eine MouseMove , und wenn die Mouse dann dort ist , soll warten , dann weiter gehen mit der Mouse .
Das problem ist bloß ich weis nicht wie ich das einbinde in Funktion mit einem button q.q Help plis *-*
Func nach der func ausführen problem 08/15/2011 - AutoIt - 6 Replies Hi,
ich hab hier mal nen code schnipel der nicht funktioniert..
Die error Erkennung...
if StringInStr($oWebTcp.body, "Du kannst nicht weitermachen...") Then
GUICtrlSetData($list1, "Login failed. Please fix"&" = "&$array&" ANR: ")
[Frage]Bei Button Func mit Hotkey einbauen 07/01/2011 - AutoIt - 6 Replies Hallo erstma,
ich komm mal wieder mit einer meiner Fragen:
Ich hab hier ein Script zu übung:
#include <GUIConstants.au3>
Global $FileTestScript = FileExists(@ScriptDir & "\Testscript.au3")
Global $File2GUI1L2B = FileExists(@ScriptDir & "\2GUI1L2B.au3")
HotKeySet("{F1}","Erstellen")
[Fragen zu] Gui Hide & Show / Admin Rights / Func in Func 12/12/2010 - AutoIt - 29 Replies Hi Leute,
wie ihr oben ja bereits lesen könnt habe ich ein paar Fragen.
1. Könnte mir jmd. eine Hotkeyset-Func schreiben, womit ich mit nur einer (!) Taste die GUI verstecken und wieder anzeigen lassen kann ?
2. Gibt es etwas, dass dem gescripteten Tool von selbst Adminrechte verschafft? Ich rede NICHT von RequireAdmin, da muss man ja Administrator des PCs sein.
€:
Kann "#requireadmin" rausgezögert werden ?!
Ich möchte, dass das passiert, aber erst, wenn ich einen Knopf gedrückt...
Button mit Func belegen 04/07/2009 - General Coding - 2 Replies Hi Leute
Ich habe hier ein Gui fenster mit koda gemacht und weiß aber nicht wie ich den Button mit einer Fuction belege kann mit das mal jmd sagen pls.
Hier der skript:
; Script Start - Add your code below here
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=