Click to See Complete Forum and Search --> : create/createex HELP!!!!! :)


odin
April 22nd, 1999, 07:36 PM
Hello,

When I create my listview ctrl I do:

m_list.Create(dwStyle, rect, pParentWnd, nID);

The problem is I want to use extended windows styles as WS_EX_CLIENTEDGE, then I guess I need to create it with CreateEx?

How the heck do I do this?

I've tried m_list.CreateEx(WS_EX_CLIENTEDGE, WC_LISTVIEW, NULL, dwStyle, rect, phwndParent, NULL);

But this just creates a assert failure when trying to insert a new column/items etc
help!!!!
-- ODIN/HENRIK

Martin Speiser
April 23rd, 1999, 04:07 AM
Hi Odin,

I must confess, I'm too lazy to look after a solution to do it with CreateEx ;-) But you can achieve it with ModifyStyleEx( 0, WS_EX_CLIENTEDGE ); after creating the list ctrl, too.

HTH

Martin

Dan O'Brien
April 23rd, 1999, 06:37 AM
You do not use CreateEx to apply extended styles. Just use Create() to create the window with standard styles, then use ::SetWindowLong( hWnd, GWL_EXSTYLE, ...