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 


Listview problems

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Jul 28, 2008 3:57 pm    Post subject: Listview problems Reply with quote

Well, I can't ever get a Listview to show up on my Window. Here's my code to create a Listview control.

Code:

HWND hListview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, "", WS_CHILD | WS_VISIBLE | LS_REPORT, 10, 10, 480, 180, IDC_MAIN_LISTVIEW, GetModuleHandle(NULL), NULL);


Nothing ever shows up though.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Jul 28, 2008 4:42 pm    Post subject: Reply with quote

Did you initiate commctrl?
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Jul 28, 2008 5:21 pm    Post subject: Reply with quote

Yes.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Mon Jul 28, 2008 5:28 pm    Post subject: Reply with quote

Post your source or something so we can see everything.
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Mon Jul 28, 2008 5:32 pm    Post subject: Reply with quote

Code:

#define IDC_MAIN_LISTVIEW;
#pragma comment(lib, "comctl32.lib")
INITCOMMONCONTROLSEX icc;
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
icc.dwICC = ICC_LISTVIEW_CLASSES;
InitCommonControlsEx(&icc);

case WM_CREATE: {
   HWND hListview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, "", WS_CHILD | WS_VISIBLE | LS_REPORT, 10, 10, 480, 180, IDC_MAIN_LISTVIEW, GetModuleHandle(NULL), NULL);
   break;
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Mon Jul 28, 2008 9:53 pm    Post subject: Reply with quote

uhh...

IDC_MAIN_LISTVIEW <- no value
LS_REPORT <- doesnt exist (LVS_REPORT or 0x1)

hMenu parameter should be (HMENU)IDC_MAIN_LISTVIEW

ICC_STANDARD_CLASSES instead of just listview??

_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jul 29, 2008 8:45 am    Post subject: Reply with quote

lurc wrote:
uhh...

IDC_MAIN_LISTVIEW <- no value
LS_REPORT <- doesnt exist (LVS_REPORT or 0x1)

hMenu parameter should be (HMENU)IDC_MAIN_LISTVIEW

ICC_STANDARD_CLASSES instead of just listview??


Oops. I was typing this up instead of actually copy pasting my code. THe only thing copy pasted was CreateWindowEx.

And thanks cuz now it works.

EDIT:

Can't figure out how to use LVITEM. I don't get how to specify which column it goes under.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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