[Release] Decent Mouse Dragging Menu Code
hit pageup open hack move mouse. the one i use in my hack doesn't even make you click,
Yours is different from mine, it snaps to the cursor, mine gets an offset then moves accordingly. Also my code was adapted from my own base, and it could be better if I had worked harder on it, but I was downsizing from something much more complex.
Essentially here is what it was before.
Code:
if(GetAsyncKeyState(VK_LBUTTON)<0){
GetCursorPos(&pos);
//ScreenToClient(GetForegroundWindow(),&pos);
if (!dragging){//if not currently dragging a window then see if our click is
for(int i = 0; i < winStore.windowCount; i++){
if (((*(winStore.windowList + i))->visible) && (pos.x > (*(winStore.windowList + i))->position.x) && (pos.x < (*(winStore.windowList + i))->position.x + (*(winStore.windowList + i))->dims.cx) && (pos.y > (*(winStore.windowList + i))->position.y) && (pos.y < (*(winStore.windowList + i))->position.y + (*(winStore.windowList + i))->dims.cy)){
//^^ if inside the bounds of the window
//then setup the winodw so that it will drag
winStore.selectedWin = *(winStore.windowList + i);
winStore.selected = i;
winStore.selectedWin->drag = true;
winStore.selectedWin->dragOff.x = pos.x-winStore.selectedWin->position.x;
winStore.selectedWin->dragOff.y = pos.y-winStore.selectedWin->position.y;
dragging = true;
}else{
//set all others to not be dragging
(*(winStore.windowList + i))->drag=false;
}
}
}else{//if we are dragging a window then
winStore.selectedWin->position.x = pos.x - winStore.selectedWin->dragOff.x;
winStore.selectedWin->position.y = pos.y - winStore.selectedWin->dragOff.y;
}
}else{
dragging = false;
for(int i = 0; i < winStore.windowCount; i++){
(*(winStore.windowList + i))->drag = false;
}
}
This code would allow you to add tabs quite easily, by positioning a window over another window. Since all the data for the windows are stored in objects they can be manipulated quite easily. Personally I would just keep one window for a regular menu, and add tabs, but this code would allow you to do a lot more which might be good if ur working on something like a d3d hack tool where u want more then one window.
I'm interested in looking through your base. Could you show me where to download it?
I'm interested in looking through your base. Could you show me where to download it?
Damn Is C++ your first language? Dutch is mine.
good stuff rigght here,
In his signature.
This thread is closed for replies.
Similar Threads
Visual Basic Programming[Release] Mouse Recorder With Code
14 Combat Arms Hacks & Cheats[RELEASE] Decent Chams/Wallhack/X-Hair
76 Visual Basic ProgrammingOpen Source Release. Semi-Useless Timer Source Code!
6 Visual Basic Programming[RELEASE]simple mouse things
0 Combat Arms Hack Coding / Programming / Source Code[Release]xTMx's MPGH Spammer Code 5




