Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


GDI ArcTo

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Jun 27, 2009 11:04 am    Post subject: GDI ArcTo Reply with quote

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 Neutral
Back to top
View user's profile Send private message
talkerzero
Grandmaster Cheater
Reputation: 1

Joined: 24 Jul 2008
Posts: 560
Location: California

PostPosted: Sat Jun 27, 2009 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Sat Jun 27, 2009 12:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jun 27, 2009 2:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites