Oki har fået det til at virke.
Men har lige et andet spørgsmål, i mit program har jeg oprettet to knapper, men de peger begge to mod den samme kommando, istedet for hver sin, som er meningen.
Her er lidt af min kode:
//Creating buttons
case WM_CREATE:
{
button = CreateWindow("Button","Bit++ pack",WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,2,0,125,25,hwnd,(HMENU)ID_BUTTON,g_hInst,0);
button2 = CreateWindow("Button","Web design pack",WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,2,26,125,25,hwnd,(HMENU)ID_BUTTON2,g_hInst,0);
}
break;
//Menu system
case WM_COMMAND:
switch(LOWORD(wParam))
{
case ID_FILE_EXIT:
PostMessage(hwnd, WM_CLOSE, 0, 0);
break;
case ID_HELP_ABOUT:
DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(DIALOG_ABOUT), hwnd, AboutDlgProc);
break;
}
//Commands for buttons
case ID_BUTTON:
ShellExecute(NULL, "open", "D:\\\\Programmer\\\\BitTorrent++\\\\BT++.exe",NULL, NULL,SW_SHOWNORMAL);
ShellExecute(NULL, "open", "www.thepiratebay.org",NULL, NULL,SW_SHOWNORMAL);
break;
case ID_BUTTON2:
ShellExecute(NULL, "open", "D:\\\\Programmer\\\\TSW\\\\WebCoder 5\\\\TSWWebCoder.exe",NULL, NULL,SW_SHOWNORMAL);
ShellExecute(NULL, "open", "D:\\\\Programmer\\\\Photoshop 7.0\\\\Photoshop.exe",NULL, NULL,SW_SHOWNORMAL);
ShellExecute(NULL, "open", "D:\\\\Programmer\\\\FileZilla\\\\filezilla.exe",NULL, NULL,SW_SHOWNORMAL);
break;
//Nick