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 


[C++] I think I am retarded. <-- halp

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

Joined: 12 Nov 2006
Posts: 531

PostPosted: Sun Sep 14, 2008 5:51 pm    Post subject: [C++] I think I am retarded. <-- halp Reply with quote

Why are:
Code:
hCtrl0_0 = CreateWindowEx("static", "HP",WS_CHILD | WS_VISIBLE, 2, 2, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_0, ghInstance, 0);
 hCtrl0_1 = CreateWindowEx("static", "MP",WS_VISIBLE | WS_CHILD, 2, 18, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_1, ghInstance, 0);
 hCtrl0_2 = CreateWindowEx("static", "Attack",WS_VISIBLE | WS_CHILD, 2, 34, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_2, ghInstance, 0);
 hCtrl0_3 = CreateWindowEx("static", "0",WS_VISIBLE | WS_CHILD, 45, 2, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_3, ghInstance, 0);
 hCtrl0_4 = CreateWindowEx("static", "0",WS_VISIBLE | WS_CHILD, 45, 18, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_4, ghInstance, 0);
 hCtrl0_5 = CreateWindowEx("static", "0",WS_CHILD | WS_VISIBLE,72,78,125,25,hwnd,(HMENU)IDC_STATIC_hCtrl0_5,ghInstance,0);


They look almost identical to other working CreateWindow's that i have.

So whats the deal?

Giving me:
Code:
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(82) : error C2059: syntax error : ','
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(83) : error C2059: syntax error : ','
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(84) : error C2059: syntax error : ','
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(85) : error C2059: syntax error : ','
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(86) : error C2059: syntax error : ','
C:\Documents and Settings\Owner\Desktop\Bot\main.cpp(87) : error C2059: syntax error : ','

_________________


Last edited by Fuzz on Sun Sep 14, 2008 7:43 pm; edited 1 time in total
Back to top
View user's profile Send private message AIM Address
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Sun Sep 14, 2008 6:00 pm    Post subject: Reply with quote

Your paramaters are for CreateWindow, not CreateWindowEx. If that doens't help anything, put each argument on a different line and see which one is acting up.
_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Sep 14, 2008 6:00 pm    Post subject: Reply with quote

CreateWindowEx [ MSDN ]

Look at its first parameter Wink

_________________
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Sun Sep 14, 2008 6:17 pm    Post subject: Reply with quote

Ok, i'll give it a try HP.

@Lurc: CreateWindow/CreateWindowEx throw the same shit at me.

edit: It's the bolded part giving me trouble:
hCtrl0_0 = CreateWindow("static", "HP",WS_CHILD | WS_VISIBLE, 2, 2, 41, 13, hwnd, (HMENU)IDC_STATIC_hCtrl0_0, ghInstance, 0);

_________________
Back to top
View user's profile Send private message AIM Address
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun Sep 14, 2008 6:37 pm    Post subject: Reply with quote

NULL.
_________________
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Sun Sep 14, 2008 6:40 pm    Post subject: Reply with quote

sponge wrote:
NULL.

I think i tried Null's, let me try again.

And...Nope. Same errors.

_________________
Back to top
View user's profile Send private message AIM Address
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Sep 14, 2008 6:51 pm    Post subject: Reply with quote

NULL is just #define NULL 0
Anyways, whats the error?

_________________
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Sun Sep 14, 2008 7:03 pm    Post subject: Reply with quote

Just syntax error's of "," or whatever as stated before. Wierd.
_________________
Back to top
View user's profile Send private message AIM Address
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sun Sep 14, 2008 8:18 pm    Post subject: Reply with quote

Code:
#include <Windows.h>

BOOL WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
...
...
CreateWindow(...
}


right?

_________________
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sun Sep 14, 2008 8:20 pm    Post subject: Reply with quote

he is missing param 2 or 3.
_________________
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Mon Sep 15, 2008 1:20 pm    Post subject: Reply with quote

lurc wrote:
Code:
#include <Windows.h>

BOOL WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
...
...
CreateWindow(...
}


right?


yus. Well, I'll just go back to the way I made them before, and copy my old CreateWindows.

_________________
Back to top
View user's profile Send private message AIM Address
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Sep 15, 2008 1:35 pm    Post subject: Reply with quote

Fuzz wrote:
lurc wrote:
Code:
#include <Windows.h>

BOOL WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
...
...
CreateWindow(...
}


right?


yus. Well, I'll just go back to the way I made them before, and copy my old CreateWindows.


Do you listen? You are missing a parameter, read up on the api and put it back in! the solution has been stated MANY times

_________________
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Mon Sep 15, 2008 1:49 pm    Post subject: Reply with quote

Apperenly I dont listen. Sorry.
_________________
Back to top
View user's profile Send private message AIM Address
Heartless
I post too much
Reputation: 0

Joined: 03 Dec 2006
Posts: 2436

PostPosted: Mon Sep 15, 2008 3:35 pm    Post subject: Reply with quote

I think you are missing the first parameter.

Code:
HWND CreateWindowEx(     
    DWORD dwExStyle,
    LPCTSTR lpClassName,
    LPCTSTR lpWindowName,
    DWORD dwStyle,
    int x,
    int y,
    int nWidth,
    int nHeight,
    HWND hWndParent,
    HMENU hMenu,
    HINSTANCE hInstance,
    LPVOID lpParam
);

_________________
What dosen't kill you, usually does the second time.
Back to top
View user's profile Send private message
Fuzz
Grandmaster Cheater
Reputation: 0

Joined: 12 Nov 2006
Posts: 531

PostPosted: Mon Sep 15, 2008 4:07 pm    Post subject: Reply with quote

HornyAZNBoy wrote:
I think you are missing the first parameter.

Code:
HWND CreateWindowEx(     
    DWORD dwExStyle,
    LPCTSTR lpClassName,
    LPCTSTR lpWindowName,
    DWORD dwStyle,
    int x,
    int y,
    int nWidth,
    int nHeight,
    HWND hWndParent,
    HMENU hMenu,
    HINSTANCE hInstance,
    LPVOID lpParam
);


I've already got it working.
Thanks for the help though Very Happy

_________________
Back to top
View user's profile Send private message AIM Address
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