-
February 14th, 2010, 06:05 PM
#1
Error creating list view thru resource.rc
Hi,
I am using ResEdit as a resource builder. I created a dialogex like this:
Code:
IDD_POPUP DIALOGEX 25, 25, 485, 254
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Show Active Listeners"
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "", WC_LISTVIEW, IDC_LIST1, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT, 489, 230
END
when I compile with VC++ I get this error regarding the resource.rc file
error RC2104 : undefined keyword or key name: WC_LISTVIEW
Ofcourse I added this on top of my stdafx.h:
Code:
// Windows Header Files:
#define STRICT
#include <windows.h>
#include <windowsx.h>
#pragma comment (lib, "comctl32.lib")
#include <commctrl.h>
#pragma comment (lib, "UxTheme.lib")
#include "uxtheme.h"
If I try to create the view list thru C code it works...
-
February 14th, 2010, 07:02 PM
#2
Re: Error creating list view thru resource.rc
I don't know what ResEdit is, but the include file commctrl.h must be included in your resource file or in a file included by a resource include. The VS project wizard usually puts this in afxres.h IIRC. Also, make sure NOLISTVIEW is NOT defined somewhere. Borland C++ back in the day (5.0 was the last version I ever used) would define NOxxx to exclude all common controls, then you had to manually un-define the ones you planned to use.
-
February 14th, 2010, 07:36 PM
#3
Re: Error creating list view thru resource.rc
now it's working! By the way, do you have any idea what those long number mean?
Code:
CONTROL "", IDC_LIST1, WC_LISTVIEW, WS_TABSTOP | WS_BORDER | LVS_ALIGNLEFT | LVS_REPORT, 4294967294, 4294967295, 489, 230
4294967294, 4294967295 ??
-
February 14th, 2010, 07:48 PM
#4
Re: Error creating list view thru resource.rc
Where's they come from? Looks suspiciously like an unsigned long representation of -2 and -1 respectively.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|