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 


How do you use resource files?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TehBlue
Newbie cheater
Reputation: 0

Joined: 14 Jul 2008
Posts: 10

PostPosted: Sat Dec 13, 2008 10:28 pm    Post subject: How do you use resource files? Reply with quote

well i made an .rc file but i didnt know how to use so my window would look like what i made in the rc file. so if anyone knows how or has a tut could you please tell me? Im also use VC++

Thanks in advance
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sat Dec 13, 2008 10:42 pm    Post subject: Reply with quote

A resource.h file also should have been made. Include this in your main source file, and call a function like CreateDialog.

See my blog for a tut.
Back to top
View user's profile Send private message
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sat Dec 13, 2008 11:05 pm    Post subject: Reply with quote

if u are using VSC++ 2008 express, u won't be able to access resource editing/design wihtout the use of 3rd party program ie resedit.

i suggest you get VSC++ pro. it has everything you need.

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
Back to top
View user's profile Send private message
TehBlue
Newbie cheater
Reputation: 0

Joined: 14 Jul 2008
Posts: 10

PostPosted: Sun Dec 14, 2008 10:41 am    Post subject: Reply with quote

I got this error
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

this is my winmain:
Code:

bool WINAPI MainWin(HINSTANCE hInstance,DWORD fdwReason,LPVOID lpvReserved)
{
   DisableThreadLibraryCalls(hInstance);
   DialogBox(hinstDLL, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)WindowProcedure);
   return 0;
}

What did i do wrong?
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Dec 14, 2008 10:48 am    Post subject: Reply with quote

You're making a .dll or .exe? and you're making a win32 project? right?
Back to top
View user's profile Send private message
TehBlue
Newbie cheater
Reputation: 0

Joined: 14 Jul 2008
Posts: 10

PostPosted: Sun Dec 14, 2008 11:12 am    Post subject: Reply with quote

im makeing an exe and its a win32 project
Edit:
i followed another tut and it compiles but it dosnt show the GUI
Back to top
View user's profile Send private message
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sun Dec 14, 2008 1:56 pm    Post subject: Reply with quote

Code:
BOOL CALLBACK DlgProcMain(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
   UNREFERENCED_PARAMETER( lParam );
   mainwindow=hWnd;
   switch( uMsg )
   {

   case WM_INITDIALOG:
      {
      ShowWindow(hWnd,SW_SHOW);
      }

      return TRUE;


   case WM_COMMAND:
             //this will handle the command buttons that are part of the dialog


      switch( wParam )
      {


             case WM_QUIT:

             EndDialog(hWnd,0);
             return TRUE;
             case WM_DESTROY:
             //we need the messages for handling when the dialog is              destroyed
             EndDialog(hWnd,0);
              return TRUE;
             }
      break;
             }
   return FALSE;

             }



int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
   UNREFERENCED_PARAMETER( hPrevInstance );
   UNREFERENCED_PARAMETER( lpCmdLine );
   UNREFERENCED_PARAMETER( nShowCmd );
   DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_DIALOG), 0, (DLGPROC)DlgProcMain, NULL );
   return ERROR_SUCCESS;
}


fix your settings if u still have link error

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils


Last edited by Bizarro on Sun Dec 14, 2008 3:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
smartz993
I post too much
Reputation: 2

Joined: 20 Jun 2006
Posts: 2013
Location: USA

PostPosted: Sun Dec 14, 2008 2:19 pm    Post subject: Reply with quote

Code:
ShowWindow(hWnd,SW_HIDE);


Why do you have this?
Back to top
View user's profile Send private message
Bizarro
I post too much
Reputation: 0

Joined: 01 May 2007
Posts: 2648

PostPosted: Sun Dec 14, 2008 3:41 pm    Post subject: Reply with quote

smartz993 wrote:
Code:
ShowWindow(hWnd,SW_HIDE);


Why do you have this?

opps should be SW_SHOW lol. i had this on my other window Razz

_________________

w8 baby.com Banner contest, Come join NOW!!
Check us out for Prize deatils
Back to top
View user's profile Send private message
TehBlue
Newbie cheater
Reputation: 0

Joined: 14 Jul 2008
Posts: 10

PostPosted: Sun Dec 14, 2008 9:12 pm    Post subject: Reply with quote

i got it guys thx for your help
Back to top
View user's profile Send private message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Sun Dec 14, 2008 10:33 pm    Post subject: ? Reply with quote

im actually still wondering on how to make a dialog with resedit and like.......make it work with my main.cpp.

example. i just made a little c++ application that if u press f1 is starts a timer/counter.........f2=stop and f3=close the program........how could i create a dialog in resedit that would show those things and stuff? its actually really confusing to me :S

_________________
Learning C++, trying, failing, never gonna give up tho Razz
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 14, 2008 10:51 pm    Post subject: Reply with quote

just read this: http://www.winprog.org/tutorial/start.html

maybe a bit outdated, and in C, but it will explain everything.
Back to top
View user's profile Send private message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Sun Dec 14, 2008 10:54 pm    Post subject: Reply with quote

im looking for using resedit as i said........and i want to just make dialogs like kitterz trainer..........not some ugly window (dont get me wrong u can make them sexy it would just take a lot longer)
_________________
Learning C++, trying, failing, never gonna give up tho Razz
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 14, 2008 11:30 pm    Post subject: Reply with quote

Travis13 wrote:
im looking for using resedit as i said........and i want to just make dialogs like kitterz trainer..........not some ugly window (dont get me wrong u can make them sexy it would just take a lot longer)


how about you actually look at the link? It explains dialogs
Back to top
View user's profile Send private message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Sun Dec 14, 2008 11:49 pm    Post subject: Reply with quote

thanks for assuming Smile but i have already looked at the link and as i said...i just want to learn how to use resedit with pair it up with my sources to make dialogs.......i want a generator for now...so i can look at them after and stuff......then learn them later
_________________
Learning C++, trying, failing, never gonna give up tho Razz
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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