 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sat Jun 27, 2009 11:04 am Post subject: GDI ArcTo |
|
|
| Code: |
#include <windows.h>
#include <stdio.h>
int main( void )
{
HDC hDC = GetDC(NULL);
for(;;)
{
if(!ArcTo(hDC, 20, 20, 50, 60, 50, 60, 20, 60))
printf("failed\n");
TextOut(hDC, 500, 500, TEXT("Wat"), strlen("wat"));
}
} |
TextOut works, but ArcTo doesn't. It isn't returning false either
|
|
| Back to top |
|
 |
talkerzero Grandmaster Cheater
Reputation: 1
Joined: 24 Jul 2008 Posts: 560 Location: California
|
Posted: Sat Jun 27, 2009 11:57 am Post subject: |
|
|
| ArcTo() requires a form window, not a console. It's returning true because it's being drawn, but you can't see it because you don't have a form.
|
|
| Back to top |
|
 |
&Vage Grandmaster Cheater Supreme
Reputation: 0
Joined: 25 Jul 2008 Posts: 1053
|
Posted: Sat Jun 27, 2009 12:45 pm Post subject: |
|
|
| Female wrote: | | ArcTo() requires a form window, not a console. It's returning true because it's being drawn, but you can't see it because you don't have a form. | So, say I have notepad, can I draw it on Notepad? Also is there a way to make the lines a different color and make it a little bolder?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jun 27, 2009 2:34 pm Post subject: |
|
|
| Female wrote: | | ArcTo() requires a form window, not a console. It's returning true because it's being drawn, but you can't see it because you don't have a form. |
| Quote: | BOOL ArcTo(
__in HDC hdc, |
@op: you just didn't set your pen type. Create a pen, set it to a color you can actually see against the black console, then select it into your device context.
| Code: | #include <windows.h>
int main(void)
{
HWND hwnd = FindWindow("ConsoleWindowClass", NULL);
HPEN hp = CreatePen(PS_SOLID, 1, RGB(255, 255, 255));
HDC hdc = GetDC(hwnd);
HGDIOBJ hpOld = SelectObject(hdc, hp);
while(!GetAsyncKeyState(VK_ESCAPE))
{
ArcTo(hdc, 50, 50, 100, 100, 50, 50, 100, 100);
TextOut(hdc, 100, 100, "slovach", 7);
}
SelectObject(hdc, hpOld);
DeleteObject(hp);
ReleaseDC(hwnd, hdc);
return 0;
}
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|