- Joined
- Apr 22, 2005
- Sythe Gold
- 23
- Messages
- 7,825
You don't need to actually understand the language. I'm asking if you can read through the code and make a reasonable guess as to what this code does.
I posted a thread a while back where I said I would consider making an SDK to make designing RS cheating/autos easier.
I'm presently designing wrappers for lengthy and unnecessarily difficult procedures like creating windows and adding controls to them without the aid of .rc files or a visual designer.
Please vote yes if this code makes sense to you, or no if it does not.
I posted a thread a while back where I said I would consider making an SDK to make designing RS cheating/autos easier.
I'm presently designing wrappers for lengthy and unnecessarily difficult procedures like creating windows and adding controls to them without the aid of .rc files or a visual designer.
Please vote yes if this code makes sense to you, or no if it does not.
Code:
// testlib1.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "formdesign.h"
#pragma comment(lib, "formdesign.lib")
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HWND hWnd = CreateForm("A Window!"/*title*/,
"blahblah"/*classname*/,
500/*height*/,
400/*width*/,
&hInstance/*you don't need to understand why this is needed*/);
MSG Msg;
ShowWindow(hWnd,SW_SHOW); //make window visible
UpdateWindow(hWnd); //paint window
HWND textBox = AddTextBox(hWnd, //specifies that we are adding this to our existing window
1, //1 = multiline; 0 = single line,
1, //1 = scrollbars; 0 = noscrollbars,
100, //height
200); //width
UpdateWindow(hWnd); //paint window
while(GetMessage(&Msg,0,0,0) > 0) //mandatory for window
{
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
CloseWindow(hWnd); //close window when we're done (closes the child window (text box) as well).
return 0;
}


































