Cromartie Posted March 31, 2021 Share Posted March 31, 2021 Hello everyone. How can I fix the .ico display problem? 571392425_Action31-03-202116-24-51.mp4 Quote Link to comment Share on other sites More sharing options...
Josh Posted March 31, 2021 Share Posted March 31, 2021 Your video does not load for me. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 Strange, I'll try to put it on my page. Quote Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 I'll try a photo. Quote Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 Sorry, an unknown server error occurred when uploading this file. (Error code: 2.jpg could not be saved.) Quote Link to comment Share on other sites More sharing options...
Josh Posted March 31, 2021 Share Posted March 31, 2021 @comanchetrProcess::GetHandle() has now been added. So I think you will do something like this: const EventID EVENT_PROCESSCLOSE = AllocEventID(); VOID CALLBACK ProcessCloseCallback( _In_ PVOID lpParameter, _In_ BOOLEAN TimerOrWaitFired ) { EmitEvent(EVENT_PROCESSCLOSE); } void main(blah, blah) { auto process = CreateProcess("C:/Windows/Notepad.exe"); HANDLE hNewHandle; RegisterWaitForSingleObject(&hNewHandle, process->GetHandle() , ProcessCloseCallback, NULL, INFINITE, WT_EXECUTEONLYONCE); ... 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted March 31, 2021 Share Posted March 31, 2021 What is happening in that video that should not be happening? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 The rendering window, so as not to overlap the rest of the interface, I don't really understand this how to fix this ( Quote Link to comment Share on other sites More sharing options...
Josh Posted March 31, 2021 Share Posted March 31, 2021 It seemed to be fine the second time you ran it, so what is the problem? The OpenGL context will cover the entire window, so you should create a child window for the area where the 3D rendering occurs. The OpenGL example in the documentation does this. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 Josh you are a wizard, just didn't think about re-declaring HWND, everything works thanks) HWND hwndW = window -> GetHandle(); HDC hdcW = GetDC(hwndW); HICON icon = LoadIconA(GetModuleHandle(NULL), (LPCSTR)IDI_ICON1); SendMessage(hwndW, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icon)); HWND hwnd = renderwindow->GetHandle(); HDC hdc = GetDC(hwnd); Quote Link to comment Share on other sites More sharing options...
Cromartie Posted March 31, 2021 Share Posted March 31, 2021 31 minutes ago, Josh said: It seemed to be fine the second time you ran it, so what is the problem? The OpenGL context will cover the entire window, so you should create a child window for the area where the 3D rendering occurs. The OpenGL example in the documentation does this. As soon as you wrote so immediately my brain started working) 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted April 1, 2021 Share Posted April 1, 2021 Fixed tab characters not displaying when text rendered. Fixed color schemes not loading correctly bug. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 1, 2021 Share Posted April 1, 2021 I've already started some designs on the backend of my application and I gotta say, UAK fits so well into all of this (I've not stumbled upon any limitations). There is so much room for code abstraction, it can pretty much conform to whatever design an application requires. The pattern I tend to follow when making a robust system is to have an Application class that contains a list of layers. Layers are my abstraction for other components of my application. I have various interfaces for each layer and my concrete classes derive from those for their implementations. In my applications run loop I simply iterate over all layers in the applications layer stack to execute their code. Following good programming practices such as DRY and SOLID this gives a pretty extendable architecture to your codebase. Thanks for the video tutorials for some of the code examples in the docs too, very welcomed stuff! Quote Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 1, 2021 Share Posted April 1, 2021 On 3/31/2021 at 2:08 PM, Cromartie said: Hello everyone. How can I fix the .ico display problem? 571392425_Action31-03-202116-24-51.mp4 I would recommend to check out post build events in Visual Studio if you wish to add any kind of content that your application will use (that is if you are even using Visual Studio). Post build events allow you to run commands post build (yeah, pretty obvious haha). This gives you the opportunity to do things like copy directories over for resources you have used in your application, for example lets say you used some nice looking icons for your GUI you will want to make sure your release target directory has all the appropriate folders and files for those to be packaged in your final target directory. Failing to do this will give you some nasty surprises (not really nasty surprises, its fairly obvious that any resources you use within your Visual Studio project won't be present in your built binary folder) when you run your application outside of the Visual Studio environment. If you are trying to change your applications default icon for some branding purposes then I did post an example a few pages from here in this thread 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted April 1, 2021 Share Posted April 1, 2021 49 minutes ago, SlipperyBrick said: In my applications run loop I simply iterate over all layers in the applications layer stack to execute their code. I think you can do something similar by adding a lot of ListenEvent() callbacks, using EVENT_NONE and NULL so that all events pass through the callback. I tend to put different tools and windows of my application each in their own code file so the program gets compartmentalized pretty well. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SlipperyBrick Posted April 1, 2021 Share Posted April 1, 2021 2 hours ago, Josh said: I think you can do something similar by adding a lot of ListenEvent() callbacks, using EVENT_NONE and NULL so that all events pass through the callback. I tend to put different tools and windows of my application each in their own code file so the program gets compartmentalized pretty well. One of the methods I use in my concrete classes (that derives from my Layer base class) is OnEvent(). With the event class UAK provides this gives some amazing flexibility, I pass an UltraEngine::Event as a reference to my OnEvent() methods and now I can iterate through all events in my applications layerstack. Applications Run(): void Application::Run() { // Initialize applications GUI OnInit(); while (!m_Window->Closed()) { if (!m_Window->Minimized()) { // Update all the applications layers in the layer stack for (Layer* layer : m_LayerStack) { layer->OnUpdate(m_TimeStep); } // Check if any events exist in the event queue if (UltraEngine::PeekEvent()) { // Return the oldest event from the event queue UltraEngine::Event e = UltraEngine::WaitEvent(); // Process the event (s_Instance is the instance of the application) s_Instance->OnEvent(e); } } } } Applications OnEvent(): void Application::OnEvent(UltraEngine::Event& e) { // Event callbacks go here UltraEngine::ListenEvent(e.id, s_Instance->GetWindow(), Application::OnWindowResize); // Traverse the applications layer stack to handle events for (auto it = m_LayerStack.end(); it != m_LayerStack.begin(); ) { (*--it)->OnEvent(e); } } Callback OnWindowResize(): bool Application::OnWindowResize(const UltraEngine::Event& e, std::shared_ptr<UltraEngine::Object> o) { if (e.id == UltraEngine::EVENT_WINDOWSIZE) { ... } return true; } Every layer in the layerstack has an OnEvent() which passes an Ultra Engine event. This allows me to call ListenEvent in each layers class and also allows me to implement the event callback in each layers class too. void SmartexGUILayer::OnEvent(UltraEngine::Event& e) { UltraEngine::ListenEvent(e.id, Application::Get()->GetWindow(), SmartexGUILayer::OnSomeButtonThatIsPressed); } GUI widget events I can handle now in my SmartexGUILayer class by calling ListenEvent in its OnEvent() and implementing the event callback in there too. UAK has made it real easy ? Quote Link to comment Share on other sites More sharing options...
Josh Posted April 1, 2021 Share Posted April 1, 2021 Yes, that functionality is built in. You can define the event source and event ID, or just supply NULL and EVENT_NONE to the command and it will call the callback for every event. In your case you would have a callback that is something like this: bool callback(const Event& e, shared_ptr<Object> extra) { auto app = extra->As<Application>(); if (app == NULL) return true; return app->OnEvent(e); } https://www.ultraengine.com/learn/CPP/ListenEvent 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 2, 2021 Share Posted April 2, 2021 Added example showing how Leadwerks can be used with Ultra App Kit: https://www.ultraengine.com/learn/CPP/Leadwerks 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 3, 2021 Share Posted April 3, 2021 On 3/31/2021 at 5:43 PM, Cromartie said: Josh you are a wizard, just didn't think about re-declaring HWND, everything works thanks) HWND hwndW = window -> GetHandle(); HDC hdcW = GetDC(hwndW); HICON icon = LoadIconA(GetModuleHandle(NULL), (LPCSTR)IDI_ICON1); SendMessage(hwndW, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(icon)); HWND hwnd = renderwindow->GetHandle(); HDC hdc = GetDC(hwnd); I like Resource Hacker: http://angusj.com/resourcehacker/ Just select the "Add a new image resource" menu item, select your ICO file, add it and save the EXE. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 3, 2021 Share Posted April 3, 2021 The standalone installer is now available on your account here: https://www.leadwerks.com/community/clients/purchases A subscription license is now available for just $1.99 / month: Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
mdgunn Posted April 4, 2021 Share Posted April 4, 2021 I don't see it in my account. If you joined the KickStarter (as I did) should it be showing now? Steam key working. Quote Link to comment Share on other sites More sharing options...
Josh Posted April 4, 2021 Share Posted April 4, 2021 11 minutes ago, mdgunn said: I don't see it in my account. If you joined the KickStarter (as I did) should it be showing now? Steam key working. I will set this up for you today. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
mdgunn Posted April 4, 2021 Share Posted April 4, 2021 Thanks! Quote Link to comment Share on other sites More sharing options...
Josh Posted April 5, 2021 Share Posted April 5, 2021 Update on Steam with some small bug fixes. In the TreeView example, Insert() has been replaced with a new overload of SetParent that accepts an index into the parent's child list. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted April 5, 2021 Share Posted April 5, 2021 On Steam, fixed a bug where a treeview node could be dragged and dropped onto itself, making it disappear. Standalone will be updated before final final release. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.