Tried adding dialog and main window
This commit is contained in:
BIN
Dialogs.aps
BIN
Dialogs.aps
Binary file not shown.
31
Dialogs.rc
31
Dialogs.rc
@@ -46,6 +46,37 @@ END
|
|||||||
|
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_TOOLBOX DIALOGEX 0, 0, 398, 64
|
||||||
|
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||||
|
FONT 8, "MS Shell Dlg", 0, 0, 0x0
|
||||||
|
BEGIN
|
||||||
|
CONTROL "",IDC_TOOLBOX_BROWSER,
|
||||||
|
"{A8F8E829-06DA-11D2-8D70-00A0C98B28E2}",WS_TABSTOP,0,0,398,64
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog Info
|
||||||
|
//
|
||||||
|
|
||||||
|
IDD_TOOLBOX DLGINIT
|
||||||
|
BEGIN
|
||||||
|
IDC_TOOLBOX_BROWSER, 0x376, 76, 0
|
||||||
|
0x0000, 0x0000, 0xb293, 0x0000, 0x0048, 0x0000, 0x0003, 0x0008, 0xf20b,
|
||||||
|
0x4757, 0x0020, 0x0000, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e,
|
||||||
|
0x0074, 0x0078, 0x3db4, 0x0000, 0x0003, 0x0008, 0xf20a, 0x4757, 0xffe0,
|
||||||
|
0xffff, 0x005f, 0x0065, 0x0078, 0x0074, 0x0065, 0x006e, 0x0074, 0x0079,
|
||||||
|
0x0ac0, 0x0000,
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
47
main.cpp
47
main.cpp
@@ -1111,6 +1111,8 @@ App::~App() {
|
|||||||
|
|
||||||
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
App *app = (App *)GetWindowLongPtr(hwnd, GWL_USERDATA);
|
||||||
|
|
||||||
switch(msg)
|
switch(msg)
|
||||||
{
|
{
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
@@ -1143,8 +1145,51 @@ int main(int argc, char** argv) {
|
|||||||
//wnd->setInputCaptureCount(200);
|
//wnd->setInputCaptureCount(200);
|
||||||
wnd->setMouseVisible(false);
|
wnd->setMouseVisible(false);
|
||||||
App app = App(settings, wnd);
|
App app = App(settings, wnd);
|
||||||
HWND hwnd = wnd->win32HWND();
|
|
||||||
|
|
||||||
|
WNDCLASSEX wc;
|
||||||
|
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||||
|
wc.cbSize = sizeof(WNDCLASSEX);
|
||||||
|
wc.style = 0;
|
||||||
|
wc.lpfnWndProc = WndProc;
|
||||||
|
wc.cbClsExtra = 0;
|
||||||
|
wc.cbWndExtra = 0;
|
||||||
|
wc.hInstance = hInstance;
|
||||||
|
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||||
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
|
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||||
|
wc.lpszMenuName = NULL;
|
||||||
|
wc.lpszClassName = "containerHWND";
|
||||||
|
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
|
||||||
|
|
||||||
|
if (!RegisterClassEx (&wc))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
HMODULE hThisInstance = GetModuleHandle(NULL);
|
||||||
|
HWND hwnd = wnd->win32HWND();
|
||||||
|
HWND hwndMain = CreateWindowEx(
|
||||||
|
WS_EX_ACCEPTFILES | WS_EX_CLIENTEDGE,
|
||||||
|
"containerHWND",
|
||||||
|
"Main test",
|
||||||
|
WS_OVERLAPPEDWINDOW,
|
||||||
|
CW_USEDEFAULT,
|
||||||
|
CW_USEDEFAULT,
|
||||||
|
800,
|
||||||
|
800,
|
||||||
|
NULL, // parent
|
||||||
|
NULL, // menu
|
||||||
|
hThisInstance,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
ShowWindow(hwndMain, SW_SHOW);
|
||||||
|
if(hwndMain == NULL)
|
||||||
|
{
|
||||||
|
MessageBox(NULL, "Failed to create HWND","Dynamica Crash", MB_OK);
|
||||||
|
}
|
||||||
|
SetParent(hwnd, hwndMain);
|
||||||
|
SetWindowPos(hwnd, NULL, 0, 0, 640, 480, NULL);
|
||||||
|
SetWindowLong(hwnd, GWL_STYLE, WS_VISIBLE | WS_CHILD | WS_BORDER);
|
||||||
|
SetWindowLongPtr(hwndMain, GWL_USERDATA, (LONG)&app);
|
||||||
app.run();
|
app.run();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,16 @@
|
|||||||
// Used by Dialogs.rc
|
// Used by Dialogs.rc
|
||||||
//
|
//
|
||||||
#define IDD_ABOUT_DIALOG 102
|
#define IDD_ABOUT_DIALOG 102
|
||||||
|
#define IDD_TOOLBOX 103
|
||||||
|
#define IDC_TOOLBOX_BROWSER 1001
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 105
|
#define _APS_NEXT_RESOURCE_VALUE 106
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40004
|
#define _APS_NEXT_COMMAND_VALUE 40004
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
#define _APS_NEXT_CONTROL_VALUE 1002
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user