Leser: 1
|< 1 2 >| | 18 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
bitmappath = "icons/exit.bmp";
strcpy(bitmap,bitmappath.c_str());
hBmp_Install = LoadBitmapFile(bitmap);
mii.fMask = MIIM_TYPE | MIIM_ID;
mii.fType = MFT_STRING;
lstrcpy (string, "exit");
mii.dwTypeData = string;
mii.cch = lstrlen (string);
mii.wID = IDM_EXIT;
InsertMenuItem (hpopup, IDM_EXIT, TRUE, &mii);
SetMenuItemBitmaps(hpopup, IDM_EXIT, TRUE, hBmp_Install, hBmp_Install);
1
2
3
4
5
6
7
8
9
10
11
HWND controlhwnd = handle zu einem editcontrol
bitmappath = "icons/exit.bmp";
hBmp_Install = LoadBitmapFile(bitmap.c_str());
mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_DATA;
mii.fType = MFT_OWNERDRAW;
mii.wID = IDM_EXIT;
mii.dwItemData = ( ULONG_PTR)controlhwnd;
InsertMenuItem (hpopup, IDM_EXIT, TRUE, &mii);
SetMenuItemBitmaps(hpopup, IDM_EXIT, TRUE, hBmp_Install, hBmp_Install);
1
2
3
4
5
6
7
8
9
10
11
HWND controlhwnd = handle zu einem editcontrol
bitmappath = "icons/exit.bmp";
hBmp_Install = LoadBitmapFile(bitmap.c_str());
mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_DATA;
mii.fType = MFT_OWNERDRAW;
mii.wID = IDM_EXIT;
mii.dwItemData = ( ULONG_PTR)controlhwnd;
InsertMenuItem (hpopup, IDM_EXIT, TRUE, &mii);
SetMenuItemBitmaps(hpopup, IDM_EXIT, TRUE, hBmp_Install, hBmp_Install);
1
2
3
4
5
6
7
8
9
10
11
HWND MeinControl = CreateWindow("EDIT","",
WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL,
1,1,50,20,
hwnd,hpopup,
hInstance, NULL);
mii.fMask = MIIM_TYPE | MIIM_ID | MIIM_DATA;
mii.fType = MFT_OWNERDRAW;
mii.wID = IDM_EDITBOX;
mii.dwItemData = (ULONG_PTR)MeinControl;
InsertMenuItem (hpopup, IDM_EDITBOX, TRUE, &mii);
1
2
3
4
5
6
7
8
9
hwndEdit = CreateWindow("EDIT", // predefined class
NULL, // no window title
WS_CHILD | WS_VISIBLE | WS_VSCROLL |
ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,
0, 0, 0, 0, // set size in WM_SIZE message
hwnd, // parent window
(HMENU) ID_EDITCHILD, // edit control ID
(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),
NULL); // pointer not needed
1
2
3
4
5
6
7
MeinControl = CreateWindow("EDIT","",
WS_CHILD | WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL,
1,1,50,20,
hwnd,
hpopup,
(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE),
NULL);
|< 1 2 >| | 18 Einträge, 2 Seiten |