Merge branch 'master' into master
This commit is contained in:
@@ -32,7 +32,7 @@ WCHAR szDlgTitle[64];
|
|||||||
\* * * */
|
\* * * */
|
||||||
BOOL CALLBACK NewGroupDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK NewGroupDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
GROUP grp = {
|
static GROUP grp = {
|
||||||
.dwSignature = GRP_SIGNATURE,
|
.dwSignature = GRP_SIGNATURE,
|
||||||
.wVersion = GRP_VERSION,
|
.wVersion = GRP_VERSION,
|
||||||
.wChecksum = 0,
|
.wChecksum = 0,
|
||||||
@@ -59,6 +59,14 @@ BOOL CALLBACK NewGroupDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM
|
|||||||
// TODO:
|
// TODO:
|
||||||
// fix minor GDI font/region leak
|
// fix minor GDI font/region leak
|
||||||
|
|
||||||
|
// Reset the group structure
|
||||||
|
grp.dwSignature = GRP_SIGNATURE;
|
||||||
|
grp.wVersion = GRP_VERSION;
|
||||||
|
grp.wChecksum = 0;
|
||||||
|
grp.dwFlags = 0;
|
||||||
|
grp.cItems = 0;
|
||||||
|
grp.iItems = NULL;
|
||||||
|
|
||||||
// Set the window title
|
// Set the window title
|
||||||
LoadString(hAppInstance, IDS_DLT_GRP_NEW, szDlgTitle, ARRAYSIZE(szDlgTitle));
|
LoadString(hAppInstance, IDS_DLT_GRP_NEW, szDlgTitle, ARRAYSIZE(szDlgTitle));
|
||||||
SetWindowText(hWndDlg, szDlgTitle);
|
SetWindowText(hWndDlg, szDlgTitle);
|
||||||
@@ -110,7 +118,6 @@ BOOL CALLBACK NewGroupDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case IDD_OK:
|
case IDD_OK:
|
||||||
|
|
||||||
// Check that all the applicable fields are filled out,
|
// Check that all the applicable fields are filled out,
|
||||||
// and if not then set the focus to the offending field
|
// and if not then set the focus to the offending field
|
||||||
if (!(bOKEnabled = GetDlgItemText(hWndDlg, IDD_NAME, (LPWSTR)&szBuffer, ARRAYSIZE(szBuffer))))
|
if (!(bOKEnabled = GetDlgItemText(hWndDlg, IDD_NAME, (LPWSTR)&szBuffer, ARRAYSIZE(szBuffer))))
|
||||||
@@ -178,13 +185,13 @@ BOOL CALLBACK NewGroupDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM
|
|||||||
\* * * */
|
\* * * */
|
||||||
BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
ITEM itm = {
|
static ITEM itm = {
|
||||||
.szName = L"",
|
.szName = L"",
|
||||||
.szExecPath = L"",
|
.szExecPath = L"",
|
||||||
.szWorkPath = L"",
|
.szWorkPath = L"",
|
||||||
.dwFlags = 0,
|
.dwFlags = 0,
|
||||||
.uiHotkeyModifiers = 0,
|
.uiHotkeyModifiers = 0,
|
||||||
.uiHotkeyModifiers = 0,
|
.uiHotkeyVirtualKey = 0,
|
||||||
.szIconPath = L"",
|
.szIconPath = L"",
|
||||||
.iIconIndex = 0,
|
.iIconIndex = 0,
|
||||||
};
|
};
|
||||||
@@ -197,7 +204,6 @@ BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM l
|
|||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
// TODO:
|
// TODO:
|
||||||
// actually create an item and add it to the GROUP structure
|
// actually create an item and add it to the GROUP structure
|
||||||
@@ -205,6 +211,11 @@ BOOL CALLBACK NewItemDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LPARAM l
|
|||||||
// require a valid group to be selected or else the dialog won't
|
// require a valid group to be selected or else the dialog won't
|
||||||
// let you press OK
|
// let you press OK
|
||||||
|
|
||||||
|
// Reset the item structure
|
||||||
|
itm.dwFlags = 0;
|
||||||
|
itm.uiHotkeyModifiers = 0;
|
||||||
|
itm.uiHotkeyVirtualKey = 0;
|
||||||
|
|
||||||
// Set the window title
|
// Set the window title
|
||||||
LoadString(hAppInstance, IDS_DLT_ITEM_NEW, szDlgTitle, ARRAYSIZE(szDlgTitle));
|
LoadString(hAppInstance, IDS_DLT_ITEM_NEW, szDlgTitle, ARRAYSIZE(szDlgTitle));
|
||||||
SetWindowText(hWndDlg, szDlgTitle);
|
SetWindowText(hWndDlg, szDlgTitle);
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PROGMGR_NO_CRT
|
#ifdef PROGMGR_NO_CRT
|
||||||
|
|
||||||
#pragma function(memset)
|
#pragma function(memset)
|
||||||
void *memset(char* dst, int value, size_t count) {
|
void *memset(char* dst, int value, size_t count) {
|
||||||
while (count--) { *dst++ = value; }
|
while (count--) { *dst++ = value; }
|
||||||
@@ -184,5 +183,4 @@ void __stdcall wWinMainCRTStartup() {
|
|||||||
int code = wWinMain(GetModuleHandle(0), 0, 0, 0);
|
int code = wWinMain(GetModuleHandle(0), 0, 0, 0);
|
||||||
ExitProcess(code);
|
ExitProcess(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in New Issue
Block a user