* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: control.c,v 1.2 2004/06/28 12:05:16 ekohl Exp $
+/* $Id: control.c,v 1.3 2004/06/29 12:03:56 ekohl Exp $
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/control.c
GetSystemDirectory(pszSearchPath,MAX_PATH);
_tcscat(pszSearchPath,_T("\\*.cpl"));
hFind = FindFirstFile(pszSearchPath,&fd);
- hImgListSmall = ImageList_Create(16,16,ILC_COLOR,256,1000);
- hImgListLarge = ImageList_Create(32,32,ILC_COLOR,256,1000);
+ hImgListSmall = ImageList_Create(16,16,ILC_COLOR | ILC_MASK,256,1000);
+ hImgListLarge = ImageList_Create(32,32,ILC_COLOR | ILC_MASK,256,1000);
while(hFind != INVALID_HANDLE_VALUE)
{
CPLLISTENTRY *pEntry;
int index;
pEntry->pFunc(hLisCtrl,CPL_INQUIRE,0,(LPARAM)&pEntry->CPLInfo);
- hIcon = LoadIcon(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon));
+ hIcon = LoadImage(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon),IMAGE_ICON,16,16,LR_DEFAULTCOLOR);
index = ImageList_AddIcon(hImgListSmall,hIcon);
+ DestroyIcon(hIcon);
+ hIcon = LoadImage(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon),IMAGE_ICON,32,32,LR_DEFAULTCOLOR);
ImageList_AddIcon(hImgListLarge,hIcon);
+ DestroyIcon(hIcon);
-
LoadString(pEntry->hDLL,pEntry->CPLInfo.idName,Name,MAX_PATH);
if(_tcslen(Name))
{
case WM_COMMAND:
switch(LOWORD(wParam))
{
- case CM_LARGEICONS:
+ case IDM_LARGEICONS:
SetWindowLong(hListView,GWL_STYLE,LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_SMALLICONS:
+ case IDM_SMALLICONS:
SetWindowLong(hListView,GWL_STYLE,LVS_SMALLICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_LIST:
+ case IDM_LIST:
SetWindowLong(hListView,GWL_STYLE,LVS_LIST | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_DETAILS:
+ case IDM_DETAILS:
SetWindowLong(hListView,GWL_STYLE,LVS_REPORT | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_CLOSE:
+ case IDM_CLOSE:
DestroyWindow(hWnd);
break;
- case CM_ABOUT:
+ case IDM_ABOUT:
MessageBox(hWnd,_T("Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL"),_T("About the Control Panel"),MB_OK | MB_ICONINFORMATION);
break;
}
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "&Close", CM_CLOSE
+ MENUITEM "&Close", IDM_CLOSE
END
POPUP "&View"
BEGIN
- MENUITEM "Large Icons", CM_LARGEICONS
- MENUITEM "Small Icons", CM_SMALLICONS
- MENUITEM "List", CM_LIST
- MENUITEM "Details", CM_DETAILS
+ MENUITEM "Large Icons", IDM_LARGEICONS
+ MENUITEM "Small Icons", IDM_SMALLICONS
+ MENUITEM "List", IDM_LIST
+ MENUITEM "Details", IDM_DETAILS
END
POPUP "Help"
BEGIN
- MENUITEM "About", CM_ABOUT
+ MENUITEM "About", IDM_ABOUT
END
END
// Microsoft Developer Studio generated include file.
// Used by control.rc
//
-#define IDR_MENU1 101
+#define IDI_MAINICON 100
#define IDM_MAINMENU 101
-#define IDI_MAINICON 104
-#define ID_VIEW_LARGEICONS 40002
-#define CM_LARGEICONS 40002
-#define ID_VIEW_SMALLICONS 40003
-#define CM_SMALLICONS 40003
-#define ID_HELP_ABOUT 40007
-#define CM_ABOUT 40007
-#define CM_CLOSE 40008
-#define CM_LIST 40009
-#define CM_DETAILS 40010
+#define IDM_LARGEICONS 40000
+#define IDM_SMALLICONS 40001
+#define IDM_LIST 40002
+#define IDM_DETAILS 40003
+#define IDM_ABOUT 40004
+#define IDM_CLOSE 40005
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 105
-#define _APS_NEXT_COMMAND_VALUE 40011
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40006
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif