- AxWin3_SendMessage(ret->Window, ret->Window, MSG_WIDGET_CREATE, sizeof(tmp), tmp);
+ AxWin3_SendIPC(ret->Window, IPC_WIDGET_CREATE, sizeof(tmp), tmp);
+ }
+
+ return ret;
+}
+
+tAxWin3_Widget *AxWin3_Widget_AddWidget_SubWindow(tAxWin3_Widget *Parent, tHWND Window, int Flags, const char *DbgName)
+{
+ tWidgetWindowInfo *info = AxWin3_int_GetDataPtr(Parent->Window);
+ int newID = AxWin3_Widget_int_AllocateID(info);
+
+ tAxWin3_Widget *ret = calloc(sizeof(tAxWin3_Widget), 1);
+ ret->Window = Parent->Window;
+ ret->ID = newID;
+ info->Elements[newID] = ret;
+
+ // Send message
+ {
+ char tmp[sizeof(tWidgetIPC_CreateSubWin)+1];
+ tWidgetIPC_CreateSubWin *msg = (void*)tmp;
+ msg->Parent = Parent->ID;
+ msg->NewID = newID;
+ msg->Type = ELETYPE_SUBWIN;
+ msg->Flags = Flags; // TODO: Flags
+ msg->WindowHandle = AxWin3_int_GetWindowID(Window);
+ msg->DebugName[0] = '\0';
+ AxWin3_SendIPC(ret->Window, IPC_WIDGET_CREATESUBWIN, sizeof(tmp), tmp);