Click here to Skip to main content
16,009,640 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Passing data from modal dialog. Pin
S Douglas18-Sep-06 0:37
professionalS Douglas18-Sep-06 0:37 
GeneralRe: Passing data from modal dialog. Pin
S Douglas18-Sep-06 0:47
professionalS Douglas18-Sep-06 0:47 
AnswerRe: Passing data from modal dialog. Pin
erfi17-Sep-06 23:19
erfi17-Sep-06 23:19 
QuestionLoadMenu problem Pin
Mohammad A Gdeisat17-Sep-06 12:02
Mohammad A Gdeisat17-Sep-06 12:02 
AnswerRe: LoadMenu problem Pin
Mohammad A Gdeisat17-Sep-06 12:16
Mohammad A Gdeisat17-Sep-06 12:16 
GeneralRe: LoadMenu problem [modified] Pin
erfi17-Sep-06 19:49
erfi17-Sep-06 19:49 
GeneralRe: LoadMenu problem Pin
Mohammad A Gdeisat18-Sep-06 1:39
Mohammad A Gdeisat18-Sep-06 1:39 
QuestionCan't set Window name when using CreateWindow Pin
BarryOg17-Sep-06 12:02
BarryOg17-Sep-06 12:02 
Hello Everyone, First time posting on this forum but I've been lurking for a long time. I'm starting to teach myself some basic windows programming as I want to get started on DirectX. I can create a window but I'm getting a strange error when I try to run it. The window name is coming out as a series of squares instead of the name. Here's my code:

//this is a struct
   
	WNDCLASSEX windowClass = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L, 
                      GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
                      (LPCWSTR)"Barry's D3D BaseClass", NULL };


	// Register the window class
	
	RegisterClassEx( &windowClass );

	// Create the application's window

	HWND hWnd = CreateWindow( (LPCWSTR)"Barry's D3D BaseClass", (LPCWSTR)"test", 
                              WS_OVERLAPPEDWINDOW, 100, 100, 300, 300,
                              GetDesktopWindow(), NULL, windowClass.hInstance, NULL );

	// Initialize Direct3D


    if( 1 )
    { 
        // Show the window
        ShowWindow( hWnd, SW_SHOWDEFAULT );
        UpdateWindow( hWnd );

		MSG mssg;

		PeekMessage( &mssg, NULL, 0, 0, PM_NOREMOVE);
		// run till completed
		while (mssg.message!=WM_QUIT) 
		{
			// is there a message to process?
			if (PeekMessage( &mssg, NULL, 0, 0, PM_REMOVE))
			{
				// dispatch the message
				TranslateMessage(&mssg);
				DispatchMessage(&mssg);
			} 
			else 
			{
	           	//No message to process?
				// Then do your game stuff here
    			 //Render();
     		}
		}

	}

    UnregisterClass( (LPCWSTR)"Barry's D3D BaseClass", windowClass.hInstance );



Its a bit of a strange problem and I'm not sure why its happening as its mainly code I've taken from text books and the msdn. Any help would really be appreciated.
AnswerRe: Can't set Window name when using CreateWindow Pin
Roland Rüdenauer17-Sep-06 12:30
Roland Rüdenauer17-Sep-06 12:30 
GeneralRe: Can't set Window name when using CreateWindow Pin
BarryOg17-Sep-06 22:04
BarryOg17-Sep-06 22:04 
GeneralRe: Can't set Window name when using CreateWindow Pin
BarryOg18-Sep-06 9:07
BarryOg18-Sep-06 9:07 
QuestionTN035 - include afxres... winres ???? Pin
Vaclav_17-Sep-06 10:16
Vaclav_17-Sep-06 10:16 
Questionneed help with the cursor creating Pin
bloodwinner17-Sep-06 8:45
bloodwinner17-Sep-06 8:45 
Questionscreen Capture Pin
khaled-ahmad17-Sep-06 8:37
khaled-ahmad17-Sep-06 8:37 
Questionplaying with strings Pin
Yustme17-Sep-06 6:35
Yustme17-Sep-06 6:35 
AnswerRe: playing with strings Pin
Nish Nishant17-Sep-06 6:41
sitebuilderNish Nishant17-Sep-06 6:41 
GeneralRe: playing with strings Pin
Yustme17-Sep-06 6:51
Yustme17-Sep-06 6:51 
QuestionExporting form a C++/CLR dll Pin
avimitrani17-Sep-06 5:03
avimitrani17-Sep-06 5:03 
Questionincluding gdiplus Pin
erfi17-Sep-06 2:06
erfi17-Sep-06 2:06 
AnswerRe: including gdiplus Pin
bob1697217-Sep-06 4:16
bob1697217-Sep-06 4:16 
AnswerRe: including gdiplus Pin
Christian Graus17-Sep-06 11:15
protectorChristian Graus17-Sep-06 11:15 
QuestionComboBox Problem Pin
mikobi17-Sep-06 1:54
mikobi17-Sep-06 1:54 
AnswerRe: ComboBox Problem [modified] Pin
Hamid_RT17-Sep-06 2:15
Hamid_RT17-Sep-06 2:15 
GeneralRe: ComboBox Problem Pin
mikobi17-Sep-06 19:54
mikobi17-Sep-06 19:54 
AnswerRe: ComboBox Problem Pin
Nibu babu thomas17-Sep-06 17:43
Nibu babu thomas17-Sep-06 17:43 

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.