ok heres code
This is for the first child window:
.classex is the wndclassex which gets registered after and class.dwstyle and class.exstyle are for the createwindowex parameters. I spend a while clearing only the inrevelent:
Code:
Class.ClassEx.cbSize = sizeof(WNDCLASSEX);
Class.ClassEx.hInstance = g_ins;
#ifdef _UNICODE
Class.ClassEx.lpszClassName = L"CodeCTRLBASE";
#else
Class.ClassEx.lpszClassName = "CodeCTRLBASE";
#endif
Class.ClassEx.hbrBackground = NULL;
Class.ExStyle = 0;
Class.dwStyle = WS_BORDER|WS_CHILD |WS_VISIBLE|WS_CLIPCHILDREN;
Class.ClassEx.cbWndExtra = 0;
Class.ClassEx.cbClsExtra = 0;
Class.ClassEx.hIconSm = 0;
Class.ClassEx.lpszMenuName = NULL;
Class.ClassEx.style = CS_DBLCLKS;
Class.ClassEx.lpfnWndProc = &BasicProc;
Class.ClassEx.hIcon = NULL;
Class.ClassEx.hCursor = 0;
This next piece is for the child window inside the child window above.
Code:
memset(&Class,0, sizeof(CodeClass));
Class.ClassEx.cbSize = sizeof(WNDCLASSEX);
Class.ClassEx.hInstance = g_ins;
Class.ClassEx.hbrBackground = 0;
Class.ExStyle = 0;
Class.ClassEx.hCursor = LoadCursor(NULL, RESOURCE(IDC_ARROW));
Class.ClassEx.cbWndExtra = 0;
Class.ClassEx.cbClsExtra = 0;
Class.ClassEx.hIconSm = 0;
Class.ClassEx.lpszMenuName = NULL;
Class.ClassEx.style = CS_DBLCLKS;
Class.ClassEx.lpfnWndProc = &BasicProc;
Class.ClassEx.hIcon = NULL;
Class.ClassEx.lpfnWndProc = CodePROC;
Class.ClassEx.hbrBackground = 0;
#ifdef _UNICODE
Class.ClassEx.lpszClassName = L"CodeCTRLFRONT";
#else
Class.ClassEx.lpszClassName = "CodeCTRLFRONT";
#endif
Class.dwStyle = WS_CHILD| WS_VISIBLE | WS_VSCROLL | WS_HSCROLL;
Class.ClassEx.cbSize = sizeof(WNDCLASSEX);
I did my best in clearing whats not relevent to the creation of the window. Any help would be greatly apreciated.
EDIT:
I found out that bitblt or setpixel or other image api's don't work. But the only api that works is TextOut.
Thanx in advance!