11 Replies - 256 Views - Last Post: 26 August 2012 - 11:26 PM Rate Topic: -----

#1 psyking  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 165
  • Joined: 17-January 10

[SOLVED]Window's window does nothing on creation

Posted 25 August 2012 - 09:18 PM

Hey,
It's been a while since I've been on this website. I've been doing a lot of Windows programming recently though, and I ran into a problem with some code that I've written to create a window.

I've tried running tests with the Window Procedure, such as catching WM_CREATE and WM_MOUSEMOVE and a few others, but of the one's that I've tested, only WM_CREATE has done anything (that was all I've tried as a test, I've been up for a few days and am blanking on anything else at the moment). The tests have all created a window successfully, but it won't close through the normal means of either clicking the 'X' button in the top right corner or by pressing Alt+F4 (nor do any of the other default buttons do anything), in order to close it I've had to go into the Window's Task Manager and shut it down through the Processes tab. Also, when the window is created, I cannot resize it, move it, or do just about anything with it besides watch it sit there. I am using the Microsoft Visual Studio Professional 2010 IDE with the default x64 compiler (not x86_x64 as my computer is 64-bit). My code for the implemented window class is below as is the code for the test. Any help would be much appreciated. Thanks!

The Test code:
#include <Windows.h>
#include "window.h"


int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow){
	Window win;
	win.SetSize(dimension2d<unsigned int>(1024, 768));
	if(!win.IsCreateWindow()){
		MessageBox(NULL, L"Could not create Window", L"ERROR", MB_OK | MB_IConerror);
		return 1;
	}
	HWND hWnd = reinterpret_cast<HWND>(win.GetWindow());
	assert(hWnd);

	win.DisplayWindow();
	MSG msg;
	bool notDone = true;
	while(notDone){
		if(PeekMessage(&msg, hWnd, 0U, 0U, PM_REMOVE)){
			if(msg.message == WM_QUIT){
				MessageBox(hWnd, L"Quit message received", L"QUIT", MB_OK | MB_ICONINFORMATION);
				notDone = false;
			}
		}else{

		}
	}
	return 0;
}



The implemented Window code:
#include <Windows.h>
#include "window.h"
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){
	switch(uMsg){
		case WM_MOUSEMOVE:
			MessageBox(hWnd, L"MOUSE MOVE", L"MESSAGE RECEIVED", MB_OK | MB_ICONINFORMATION);
			return DefWindowProc(hWnd, uMsg, wParam, lParam);
		case WM_CREATE:
			MessageBox(hWnd, L"Created Window", L"Message Received", MB_OK | MB_ICONINFORMATION);
			return DefWindowProc(hWnd, uMsg, wParam, lParam);
		case WM_CLOSE:
			PostQuitMessage(0);
			return 0;
		default:
			return DefWindowProc(hWnd, uMsg, wParam, lParam);
	}
}
overdrive::Window::Window(): m_WindowSize(1024, 768), m_WindowPos(0,0){
	m_bWindowExists = false;
	m_bDisplayWindow = false;
	m_pWindowTitle = L"Overdrive Engine";
	m_pWindowClass = L"OverdriveEngine";
	m_pWindowIcon  = IDI_APPLICATION;
	m_pWindowCursor = IDC_CROSS;
	m_pWindowHandle = (void*)0;
	m_pParentWindow = (void*)0;
	m_WindowStyle	= WS_OVERLAPPEDWINDOW;
	m_WindowStyleEx	= WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
}
overdrive::Window::~Window(){
	IsDestroyWindow();
}
void overdrive::Window::SetTitle(const wchar_t* pTitle){
	m_pWindowTitle = pTitle;
	if(m_bWindowExists){
		SetWindowText(reinterpret_cast<HWND>(m_pWindowHandle), m_pWindowTitle);
	}
}
void overdrive::Window::SetTemporaryTitle(const wchar_t* pTempTitle){
	if(m_bWindowExists){
		SetWindowText(reinterpret_cast<HWND>(m_pWindowHandle), pTempTitle);
	}
}
void overdrive::Window::SetSize(overdrive::dimension2d<unsigned int> windowSize){
	m_WindowSize = windowSize;
	if(m_bWindowExists){
		SetWindowPos(reinterpret_cast<HWND>(m_pWindowHandle), 0, 0,0,m_WindowSize.Width(), m_WindowSize.Height(), SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
	}
}
void overdrive::Window::SetIcon(int resNum){
	SetIcon(MAKEINTRESOURCE(resNum));
}
void overdrive::Window::SetIcon(const wchar_t* resLocation){
	m_pWindowIcon = resLocation;
	if(m_bWindowExists){
		SendMessage(reinterpret_cast<HWND>(m_pWindowHandle), WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(GetModuleHandle(NULL), m_pWindowIcon));
	}
}
void overdrive::Window::SetCursor(int resNum){
	this->SetCursor(MAKEINTRESOURCE(resNum));
}
void overdrive::Window::SetCursor(const wchar_t* cursorLocation){
	::SetCursor((HCURSOR)LoadCursor(GetModuleHandle(NULL), cursorLocation));
}
void overdrive::Window::SetPosition(overdrive::position2d<unsigned int> pos){
	m_WindowPos = pos;
	if(m_bWindowExists){
		SetWindowPos(reinterpret_cast<HWND>(m_pWindowHandle), 0, m_WindowPos.getX(), m_WindowPos.getY(), 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
	}
}
void overdrive::Window::SetParentWindow(void* pParentWindow){
	HWND parent = reinterpret_cast<HWND>(pParentWindow);
	if(!parent)return;
	if(m_bWindowExists){
		HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
		if(hWnd == parent)return;
		SetParent(hWnd, parent);
	}
}
void overdrive::Window::SetWindowStyle(unsigned long style, unsigned long extendedStyle){
	m_WindowStyle = style;
	m_WindowStyleEx = extendedStyle;
	if(m_bWindowExists){
		HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
		LONG lStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
		LONG lStyleEx = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
		lStyle &= ~(lStyle);
		lStyleEx &= ~(lStyleEx);
		lStyle &= m_WindowStyle;
		lStyleEx &= m_WindowStyleEx;
		SetWindowLongPtr(hWnd, GWL_STYLE, lStyle);
		SetWindowLongPtr(hWnd, GWL_EXSTYLE, lStyleEx);
		SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
	}
}
bool overdrive::Window::IsCreateWindow(){
	if(m_bWindowExists)return true;

	WNDCLASSEX WindowClass;
	WindowClass.cbSize			= sizeof(WNDCLASSEX);
	WindowClass.style			= CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
	WindowClass.lpfnWndProc		= (WNDPROC)&WndProc;
	WindowClass.cbWndExtra		= 0;
	WindowClass.cbClsExtra		= 0;
	WindowClass.hInstance		= GetModuleHandle(NULL);
	WindowClass.hIcon			= (HICON)LoadIcon(GetModuleHandle(NULL), m_pWindowIcon);
	WindowClass.hIconSm			= (HICON)LoadIcon(GetModuleHandle(NULL), m_pWindowIcon);
	WindowClass.hCursor			= (HCURSOR)LoadCursor(GetModuleHandle(NULL), m_pWindowCursor);
	WindowClass.hbrBackground	= (HBRUSH)GetStockObject(WHITE_BRUSH);
	WindowClass.lpszMenuName	= NULL;
	WindowClass.lpszClassName	= m_pWindowClass;

	if(!RegisterClassEx(&WindowClass)){
		MessageBox(NULL, L"Could not register Window Class.", L"Error", MB_OK | MB_IConerror);
		return false;
	}

	RECT windowSize;
	windowSize.top		= (long)0;
	windowSize.left		= (long)0;
	windowSize.right	= (long)m_WindowSize.Width();
	windowSize.bottom	= (long)m_WindowSize.Height();

	if(!AdjustWindowRectEx(&windowSize, m_WindowStyle, false, m_WindowStyleEx)){
		UnregisterClass(m_pWindowClass, GetModuleHandle(NULL));
		MessageBox(NULL, L"Could not adjust window rect", L"Error", MB_OK | MB_IConerror);
		return false;
	}

	HWND parent = reinterpret_cast<HWND>(m_pParentWindow);
	if(!parent)parent = NULL;

	HWND hWnd = CreateWindowEx( m_WindowStyleEx,
								m_pWindowClass,
								m_pWindowTitle,
								WS_CLIPSIBLINGS | WS_CLIPCHILDREN | m_WindowStyle,
								m_WindowPos.getX(), m_WindowPos.getY(),
								windowSize.right-windowSize.left,
								windowSize.bottom-windowSize.top,
								parent,
								NULL,
								WindowClass.hInstance,
								NULL);

	assert(false && L"Could not create window.");

	if(!hWnd){
		UnregisterClass(m_pWindowClass, GetModuleHandle(NULL));
		return false;
	}
	m_pWindowHandle = reinterpret_cast<void*>(hWnd);
	m_bWindowExists = true;
	if(m_bDisplayWindow)DisplayWindow();
	return true;
}
bool overdrive::Window::IsDestroyWindow(){
	if(!m_bWindowExists)return true;
	HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
	if(!DestroyWindow(hWnd)){
		return false;
	}
	m_pWindowHandle = (void*)0;
	m_bWindowExists = false;
	m_bDisplayWindow = false;
	return true;
}
void* overdrive::Window::GetWindow(){
	return m_pWindowHandle;
}
void overdrive::Window::DisplayWindow(){
	m_bDisplayWindow = true;
	if(!m_bWindowExists)return;
	HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
	ShowWindow(hWnd, SW_SHOW);
	SetForegroundWindow(hWnd);
	SetFocus(hWnd);
}
overdrive::dimension2d<unsigned int> overdrive::Window::GetWindowSize(){
	return m_WindowSize;
}
const wchar_t* overdrive::Window::GetTitle(){
	return m_pWindowTitle;
}





Again, thank you for any help!

This post has been edited by psyking: 26 August 2012 - 07:42 PM


Is This A Good Question/Topic? 0
  • +

Replies To: [SOLVED]Window's window does nothing on creation

#2 GunnerInc  Icon User is offline

  • "Hurry up and wait"
  • member icon




Reputation: 719
  • View blog
  • Posts: 1,978
  • Joined: 28-March 11

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 08:28 AM

First problem I see is that you are not returning zero after you handle WM_CREATE and WM_MOUSEMOVE. From MSDN:

Quote

If an application processes this message, it should return zero to continue creation of the window


Fix that and we will go from there.
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 1939
  • View blog
  • Posts: 5,774
  • Joined: 05-May 12

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 01:06 PM

Actually, he is just calling DefWindowProc() after popping up the message box. The default VS2012 Win32 Application template project does essentially the same thing since it has no WM_CREATE handler:
Spoiler


Changing the default template above to add a WM_CREATE handler with the message box, and then a call to DefWindowProc() still lets the program work normally.
Was This Post Helpful? 0
  • +
  • -

#4 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 1939
  • View blog
  • Posts: 5,774
  • Joined: 05-May 12

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 01:31 PM

I am very very suspicious of the following bit of code:
void overdrive::Window::SetWindowStyle(unsigned long style, unsigned long extendedStyle){
	m_WindowStyle = style;
	m_WindowStyleEx = extendedStyle;
	if(m_bWindowExists){
		HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
		LONG lStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
		LONG lStyleEx = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
		lStyle &= ~(lStyle);
		lStyleEx &= ~(lStyleEx);
		lStyle &= m_WindowStyle;
		lStyleEx &= m_WindowStyleEx;
		SetWindowLongPtr(hWnd, GWL_STYLE, lStyle);
		SetWindowLongPtr(hWnd, GWL_EXSTYLE, lStyleEx);
		SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
	}
}


For the style bits, Get/SetWindowLong() should be used instead of Get/SetWindowLongPtr(), but I don't think that is the issue.

I see this as the issue: Lines 8 and 9 might as well have just assigned zeroes to lStyle and lStyleEx. Lines 10 and 11 are no-ops since 0 ANDed with anything else results in 0.

Unfortunately, all that remain just as suspicions because I'm not seeing anywhere in the posted code where SetWindowStyle() is called; and to get the effect that the OP was describing, I had to call EnableWindow(hWnd, FALSE). As you know that API call turns on the WS_DISABLED bit, which is completely opposite of the code above which turns all the style bits off.
Was This Post Helpful? 0
  • +
  • -

#5 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 1939
  • View blog
  • Posts: 5,774
  • Joined: 05-May 12

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 01:46 PM

What happens if you change:
case WM_MOUSEMOVE:
    MessageBox(hWnd, L"MOUSE MOVE", L"MESSAGE RECEIVED", MB_OK | MB_ICONINFORMATION);
    return DefWindowProc(hWnd, uMsg, wParam, lParam);


to:
case WM_MOUSEMOVE:
    OutputDebugString(L"MOUSE MOVE MESSAGE RECEIVED\n");
    return DefWindowProc(hWnd, uMsg, wParam, lParam);



In my tests, the MessageBox() call puts up a modal message box that is preventing me from closing the main program. With all your manipulations of window positions, is it possible that your modal message box is ending up underneath your main window?
Was This Post Helpful? 0
  • +
  • -

#6 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 494
  • View blog
  • Posts: 1,543
  • Joined: 20-March 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 01:47 PM

Hi,

What is overdrive where is it implemented ?

Where is window.h

Is overdrive implemented there

is it wise calling a header window.h when there is already a header called

windows.h could etre tres confus il ne pouvaient, oui, n'est ce pas ?

If you see what I mean.....
Was This Post Helpful? 0
  • +
  • -

#7 psyking  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 165
  • Joined: 17-January 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 05:26 PM

View PostGunnerInc, on 26 August 2012 - 08:28 AM, said:

First problem I see is that you are not returning zero after you handle WM_CREATE and WM_MOUSEMOVE. From MSDN:

Quote

If an application processes this message, it should return zero to continue creation of the window


Fix that and we will go from there.


I had had it returning 0 previously, and I just changed it to return DefWindowProc because I wanted to see if that might change anything. It didn't.

View PostSkydiver, on 26 August 2012 - 01:31 PM, said:

I am very very suspicious of the following bit of code:
void overdrive::Window::SetWindowStyle(unsigned long style, unsigned long extendedStyle){
	m_WindowStyle = style;
	m_WindowStyleEx = extendedStyle;
	if(m_bWindowExists){
		HWND hWnd = reinterpret_cast<HWND>(m_pWindowHandle);
		LONG lStyle = GetWindowLongPtr(hWnd, GWL_STYLE);
		LONG lStyleEx = GetWindowLongPtr(hWnd, GWL_EXSTYLE);
		lStyle &= ~(lStyle);
		lStyleEx &= ~(lStyleEx);
		lStyle &= m_WindowStyle;
		lStyleEx &= m_WindowStyleEx;
		SetWindowLongPtr(hWnd, GWL_STYLE, lStyle);
		SetWindowLongPtr(hWnd, GWL_EXSTYLE, lStyleEx);
		SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
	}
}


For the style bits, Get/SetWindowLong() should be used instead of Get/SetWindowLongPtr(), but I don't think that is the issue.

I see this as the issue: Lines 8 and 9 might as well have just assigned zeroes to lStyle and lStyleEx. Lines 10 and 11 are no-ops since 0 ANDed with anything else results in 0.

Unfortunately, all that remain just as suspicions because I'm not seeing anywhere in the posted code where SetWindowStyle() is called; and to get the effect that the OP was describing, I had to call EnableWindow(hWnd, FALSE). As you know that API call turns on the WS_DISABLED bit, which is completely opposite of the code above which turns all the style bits off.


That's a good point right there, I've removed lines 8 and 9 and just left them at the assignment part.

View PostSkydiver, on 26 August 2012 - 01:46 PM, said:

What happens if you change:
case WM_MOUSEMOVE:
    MessageBox(hWnd, L"MOUSE MOVE", L"MESSAGE RECEIVED", MB_OK | MB_ICONINFORMATION);
    return DefWindowProc(hWnd, uMsg, wParam, lParam);


to:
case WM_MOUSEMOVE:
    OutputDebugString(L"MOUSE MOVE MESSAGE RECEIVED\n");
    return DefWindowProc(hWnd, uMsg, wParam, lParam);



In my tests, the MessageBox() call puts up a modal message box that is preventing me from closing the main program. With all your manipulations of window positions, is it possible that your modal message box is ending up underneath your main window?


It didn't change anything, I tried changing the WM_MOUSEMOVE to use OutputDebugString instead of MessageBox, but it didn't change the behaviour of the window.

View Postsnoopy11, on 26 August 2012 - 01:47 PM, said:

Hi,

What is overdrive where is it implemented ?

Where is window.h

Is overdrive implemented there

is it wise calling a header window.h when there is already a header called

windows.h could etre tres confus il ne pouvaient, oui, n'est ce pas ?

If you see what I mean.....

overdrive is the namespace that the class is in and window.h is in the same folder. It could become very confusing yes, but as I said in my first post, I had already been up for a few days, so simple names are what I was looking for at that point.

If it's necessary, the code for window.h is this:
#ifndef WINDOW_H_INCLUDED_
#define WINDOW_H_INCLUDED_
#include <memory>
#include <list>
#include <map>
#include "../export.h"
#include "../debug.h"
#include "../math/dimension2d.h"
#include "../math/position2d.h"
namespace overdrive {
	class OVERDRIVE_API Window{
		private:
			void* m_pWindowHandle;
			void* m_pParentWindow;
			const wchar_t* m_pWindowTitle;
			const wchar_t* m_pWindowClass;
			const wchar_t* m_pWindowIcon;
			const wchar_t* m_pWindowCursor;
			bool m_bWindowExists, m_bDisplayWindow;
			dimension2d<unsigned int> m_WindowSize;
			position2d<unsigned int> m_WindowPos;
			unsigned long m_WindowStyle, m_WindowStyleEx;
		public:
			Window();
			~Window();
			void SetTitle(const wchar_t* pTitle);
			void SetTemporaryTitle(const wchar_t* pTempTitle);
			void SetSize(dimension2d<unsigned int> size);
			void SetIcon(int resNum);
			void SetIcon(const wchar_t* iconLocation);
			void SetCursor(int resNum);
			void SetCursor(const wchar_t* cursorLocation);
			void SetPosition(position2d<unsigned int> pos);
			void SetParentWindow(void* pParentWindow);
			void SetWindowStyle(unsigned long style, unsigned long extendStyle);
			bool IsCreateWindow();
			bool IsDestroyWindow();
			void* GetWindow();
			void DisplayWindow();
			dimension2d<unsigned int> GetWindowSize();
			const wchar_t* GetTitle();
			void FlashWhileMinimized();
	};
}
#endif


where OVERDRIVE_API is defined as #define OVERDRIVE_API _declspec(dllexport)
Was This Post Helpful? 0
  • +
  • -

#8 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 1939
  • View blog
  • Posts: 5,774
  • Joined: 05-May 12

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 07:02 PM

I found the problem. We were distracted by psyking pointing us to the WndProc() that we forgot the basics.

What is wrong with this message pump:
	bool notDone = true;
	while(notDone){
		if(PeekMessage(&msg, hWnd, 0U, 0U, PM_REMOVE)){
			if(msg.message == WM_QUIT){
				MessageBox(hWnd, L"Quit message received", L"QUIT", MB_OK | MB_ICONINFORMATION);
				notDone = false;
			}
		}else{

		}
	}



Big hint: When is &msg ever dispatched? :lol:


Also psyking, there is some kind of problem with your header files. How did you get your wWinMain() code to compile without a #using namespace overrdrive? That means one of your header files has a stray #using namespace overrdrive for things to compile nicely.

Additionally, one of your header files also includes <cassert> or <assert.h> because your window.cpp and test wWinMain() code use assert(), but the file is never included.

And last thing: the assert in IsWindowCreated() keeps firing because you are asserting on false rather than the window handle.

This post has been edited by Skydiver: 26 August 2012 - 07:06 PM

Was This Post Helpful? 3
  • +
  • -

#9 psyking  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 165
  • Joined: 17-January 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 07:36 PM

View PostSkydiver, on 26 August 2012 - 07:02 PM, said:

I found the problem. We were distracted by psyking pointing us to the WndProc() that we forgot the basics.

What is wrong with this message pump:
	bool notDone = true;
	while(notDone){
		if(PeekMessage(&msg, hWnd, 0U, 0U, PM_REMOVE)){
			if(msg.message == WM_QUIT){
				MessageBox(hWnd, L"Quit message received", L"QUIT", MB_OK | MB_ICONINFORMATION);
				notDone = false;
			}
		}else{

		}
	}



Big hint: When is &msg ever dispatched? :lol:


:stupid: That's the first time I've ever forgotten TranslateMessage and DispatchMessage... As I said, I was running on a few days of no sleep, so I thank you very much!

View PostSkydiver, on 26 August 2012 - 07:02 PM, said:

Also psyking, there is some kind of problem with your header files. How did you get your wWinMain() code to compile without a #using namespace overrdrive? That means one of your header files has a stray #using namespace overrdrive for things to compile nicely.

Additionally, one of your header files also includes <cassert> or <assert.h> because your window.cpp and test wWinMain() code use assert(), but the file is never included.


Yes, in window.h I include my debug file "debug.h" which includes <assert>. In terms of the namespace, I don't have any stray using namespace overdrive;, in the test file I have that line, I must have somehow deleted it on accident while posting it to here. Sorry for the confusion on that.

View PostSkydiver, on 26 August 2012 - 07:02 PM, said:

And last thing: the assert in IsWindowCreated() keeps firing because you are asserting on false rather than the window handle.


:stupid: Another mindless mistake that I made, thank you for telling me. I would not have seen that otherwise because it's not showing on my tests...

(P.S. please enjoy the +1 for your solution)
Was This Post Helpful? 0
  • +
  • -

#10 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 494
  • View blog
  • Posts: 1,543
  • Joined: 20-March 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 10:15 PM

View Postpsyking, on 27 August 2012 - 02:36 AM, said:

(P.S. please enjoy the +1 for your solution)



Oh don't worry I will make it +2 as I think he deserves it for spotting
it in the debris of your obfuscated windows code.

psyking you really need to concentrate on how to write prettier code,
after all you might need to update or plain old modify this code one day.

Writing hidden code is all well and good but it does look like it has been
written by someone who had no sleep for two days or even worse...
Putting in a few comments also would not hurt, breaking everything into well defined blocks of code
would not hurt either.
Was This Post Helpful? 0
  • +
  • -

#11 psyking  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 165
  • Joined: 17-January 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 11:20 PM

View Postsnoopy11, on 26 August 2012 - 10:15 PM, said:

View Postpsyking, on 27 August 2012 - 02:36 AM, said:

(P.S. please enjoy the +1 for your solution)



Oh don't worry I will make it +2 as I think he deserves it for spotting
it in the debris of your obfuscated windows code.


Yeah, I agree, he does for finding it in that mess.

View Postsnoopy11, on 26 August 2012 - 10:15 PM, said:

psyking you really need to concentrate on how to write prettier code,
after all you might need to update or plain old modify this code one day.

Writing hidden code is all well and good but it does look like it has been
written by someone who had no sleep for two days or even worse...
Putting in a few comments also would not hurt, breaking everything into well defined blocks of code
would not hurt either.

Yeah, I will be going back through it adding comments and making it much prettier after I get a major sleep session in.
Was This Post Helpful? 1
  • +
  • -

#12 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 494
  • View blog
  • Posts: 1,543
  • Joined: 20-March 10

Re: [SOLVED]Window's window does nothing on creation

Posted 26 August 2012 - 11:26 PM

Enjoy your sleep..
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1