Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionapplication settings window in xp/vista Pin
garyofcourse30-Jun-08 10:10
garyofcourse30-Jun-08 10:10 
AnswerRe: application settings window in xp/vista Pin
_AnsHUMAN_ 30-Jun-08 19:09
_AnsHUMAN_ 30-Jun-08 19:09 
QuestionDisplaying 3D interface on multiple platforms Pin
Dustin Henry30-Jun-08 8:17
Dustin Henry30-Jun-08 8:17 
AnswerRe: Displaying 3D interface on multiple platforms Pin
Nemanja Trifunovic30-Jun-08 9:36
Nemanja Trifunovic30-Jun-08 9:36 
GeneralRe: Displaying 3D interface on multiple platforms Pin
Dustin Henry30-Jun-08 10:11
Dustin Henry30-Jun-08 10:11 
GeneralRe: Displaying 3D interface on multiple platforms Pin
Nemanja Trifunovic30-Jun-08 10:50
Nemanja Trifunovic30-Jun-08 10:50 
GeneralRe: Displaying 3D interface on multiple platforms Pin
Dustin Henry30-Jun-08 11:50
Dustin Henry30-Jun-08 11:50 
QuestionGetting an "Access violation reading location" error for an iTunes plugin Pin
Grant Hudgens30-Jun-08 6:39
Grant Hudgens30-Jun-08 6:39 
I am very new to creating Windows DLLs and I am trying to create a plugin for iTunes but I need this plugin to have a window that runs alongside iTunes. When I open iTunes it does create the window but I get "Unhandled exception at 0x10911758 in iTunes.exe: 0xC0000005: Access violation reading location 0x10911758."

BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
	HINSTANCE hInstance = (HINSTANCE)GetModuleHandle(_T("iTunesLyrics"));
	switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH: InitWnd(hInstance); break;
		case DLL_THREAD_ATTACH: 
		case DLL_PROCESS_DETACH:
		case DLL_THREAD_DETACH:
		break;
	}
	return true;

}

int InitWnd(HINSTANCE hInst) 
{
	static TCHAR szAppName[] = TEXT("iTunesLyrics");
	MSG msg;

	WNDCLASSEX wndclass;
		wndclass.hIcon			= LoadIcon(0,IDI_EXCLAMATION);
		wndclass.cbSize			= sizeof(WNDCLASSEX);
		wndclass.style			= CS_HREDRAW | CS_VREDRAW;
		wndclass.lpfnWndProc	= (WNDPROC)WindowProcedure;
		wndclass.cbClsExtra		= 0;
		wndclass.cbWndExtra		= 0;
		wndclass.hInstance		= hInst;
		wndclass.hCursor		= LoadCursor(NULL, IDC_ARROW);
		wndclass.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);
		wndclass.lpszMenuName	= NULL;
		wndclass.lpszClassName	= _T("Testing");
		wndclass.hIconSm		= NULL;

	if(!RegisterClassEx(&wndclass))
		MessageBox(NULL, _T("RegClass Failed"), _T("Error"), MB_OK);

	hWnd = CreateWindow(_T("Testing"), _T("This is a test"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInst, NULL);
	ShowWindow(hWnd, SW_SHOW);

	return 0;
} //InitWnd()


LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
    switch (message)
        {
        case WM_DESTROY: PostQuitMessage (0); 
			break;
		case WM_CREATE: return 0;
			break;
		case WM_NCCREATE: return true;
			break;
        default: 
        return DefWindowProc (hwnd, message, wParam, lParam);
    }

    return 0;
}


Any help would be greatly appreciated.
AnswerRe: Getting an "Access violation reading location" error for an iTunes plugin Pin
Dustin Henry30-Jun-08 8:34
Dustin Henry30-Jun-08 8:34 
GeneralRe: Getting an "Access violation reading location" error for an iTunes plugin Pin
Grant Hudgens30-Jun-08 10:47
Grant Hudgens30-Jun-08 10:47 
QuestionRestricting access to a file Pin
theCPkid30-Jun-08 5:48
theCPkid30-Jun-08 5:48 
AnswerRe: Restricting access to a file Pin
Saurabh.Garg30-Jun-08 13:50
Saurabh.Garg30-Jun-08 13:50 
QuestionRe: Restricting access to a file Pin
David Crow30-Jun-08 17:22
David Crow30-Jun-08 17:22 
AnswerRe: Restricting access to a file Pin
theCPkid30-Jun-08 18:52
theCPkid30-Jun-08 18:52 
GeneralRe: Restricting access to a file Pin
David Crow1-Jul-08 3:13
David Crow1-Jul-08 3:13 
QuestionPosting data to a webserver using mfc - basic help and infos needed Pin
fish4fun30-Jun-08 4:32
fish4fun30-Jun-08 4:32 
AnswerRe: Posting data to a webserver using mfc - basic help and infos needed PinPopular
led mike30-Jun-08 5:18
led mike30-Jun-08 5:18 
GeneralRe: Posting data to a webserver using mfc - basic help and infos needed Pin
Mark Salsbery30-Jun-08 6:43
Mark Salsbery30-Jun-08 6:43 
GeneralRe: Posting data to a webserver using mfc - basic help and infos needed Pin
fish4fun30-Jun-08 7:20
fish4fun30-Jun-08 7:20 
GeneralRe: Posting data to a webserver using mfc - basic help and infos needed Pin
Mark Salsbery30-Jun-08 7:34
Mark Salsbery30-Jun-08 7:34 
GeneralRe: Posting data to a webserver using mfc - basic help and infos needed Pin
led mike30-Jun-08 10:54
led mike30-Jun-08 10:54 
GeneralRe: Posting data to a webserver using mfc - basic help and infos needed Pin
Mark Salsbery30-Jun-08 10:56
Mark Salsbery30-Jun-08 10:56 
AnswerRe: Posting data to a webserver using mfc - basic help and infos needed Pin
theCPkid30-Jun-08 5:43
theCPkid30-Jun-08 5:43 
QuestionVC++ 2005 Botton Control Click add Event Pin
akira3230-Jun-08 3:03
akira3230-Jun-08 3:03 
AnswerRe: VC++ 2005 Botton Control Click add Event Pin
«_Superman_»30-Jun-08 8:16
professional«_Superman_»30-Jun-08 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.