Search found 85 matches
- Thu Jul 19, 2018 12:39 pm
- Forum: C++ Development
- Topic: How to set focus on message box button.
- Replies: 10
- Views: 2489
Re: How to set focus on message box button.
I just copied the example code and modified the section shown below and when the test runs it automatically closes the message box. virtual int Enter(wxDialog* dialog) { return wxID_OK; } my original plan was to set focus and simulate a key press same as what you have shown in your @PB example, the ...
- Thu Jul 19, 2018 11:36 am
- Forum: C++ Development
- Topic: How to set focus on message box button.
- Replies: 10
- Views: 2489
Re: How to set focus on message box button.
this works perfect for what i need. http://docs.wxwidgets.org/3.1/classwx_m ... _hook.html
I only need to add it to the test application and the code for my main application stays the same.
I only need to add it to the test application and the code for my main application stays the same.
- Wed Jul 18, 2018 6:14 pm
- Forum: C++ Development
- Topic: How to set focus on message box button.
- Replies: 10
- Views: 2489
Re: How to set focus on message box button.
I found something that might work wxModalDialogHook.
- Wed Jul 18, 2018 5:04 pm
- Forum: C++ Development
- Topic: How to set focus on message box button.
- Replies: 10
- Views: 2489
Re: How to set focus on message box button.
the section of code that gets called is part of a test suite which i need to run automatically. the test stops at the point where the message box is created, after i close it manually the test carries on.
- Wed Jul 18, 2018 1:58 pm
- Forum: C++ Development
- Topic: How to set focus on message box button.
- Replies: 10
- Views: 2489
How to set focus on message box button.
I am having difficulty finding the command to setfocus on the OK button in the messagebox. I would like to know how to close the message box automatically by either simulating a button click on the "OK" button or the x at the top right corner. the code below is the one i am using to genera...
- Wed Jul 18, 2018 10:41 am
- Forum: C++ Development
- Topic: How do i write a unit test for testing gui
- Replies: 2
- Views: 2338
Re: How do i write a unit test for testing gui
I managed to get the test to work, but i don't understand why the test works with a space but not with enter.
with
Code: Select all
acts.Char(WXK_RETURN);
Code: Select all
acts.Char(WXK_SPACE);
- Wed Jul 18, 2018 9:10 am
- Forum: C++ Development
- Topic: How do i write a unit test for testing gui
- Replies: 2
- Views: 2338
How do i write a unit test for testing gui
I am trying to follow this tutorial. http://www.remy.org.uk/tech.php?tech=1407951209 the test compiles and runs apart from not getting the correct result. for some reason the test gui is not getting focus. I tried to step through the code it appends the text on the current window i have focus which ...
- Wed Jul 04, 2018 11:07 am
- Forum: C++ Development
- Topic: wxthread unit test synchronization.
- Replies: 0
- Views: 7059
wxthread unit test synchronization.
I am trying to rewrite the unit test below so that it waits for the thread to finish and carry on the next test without a specified sleep time. I was told to make the thread joinable, and remove the sleep. I am currently struggling to synchronize the thread with the test suite. the program always cr...
- Wed Feb 28, 2018 3:44 pm
- Forum: C++ Development
- Topic: googletest and wxuiactionsimulator
- Replies: 1
- Views: 798
googletest and wxuiactionsimulator
I am trying to create a unit test with some user interface simulations using google test. The code under test works in my main application the problem i am encountering is that on my test code I want to extract some data that the user input in the text field. I think the message loop isn't working p...
- Tue Oct 24, 2017 9:58 am
- Forum: Compiler / Linking / IDE Related
- Topic: wxwidgets dll example
- Replies: 5
- Views: 2941
Re: wxwidgets dll example
thanks for the input i narrowed my problem down. this is what i am using now #pragma once #include <wx/wx.h> #ifdef CONTROLLERLIBRARY_EXPORTS #define CONTROLLERLIBRARY_EXPORT __declspec(dllexport) #else #define CONTROLLERLIBRARY_EXPORT __declspec(dllimport) #endif class CONTROLLERLIBRARY_EXPORT Cont...
- Mon Oct 23, 2017 10:03 pm
- Forum: Compiler / Linking / IDE Related
- Topic: wxwidgets dll example
- Replies: 5
- Views: 2941
Re: wxwidgets dll example
originally i have the one application that uses wxwidgets and its been working fine. i would like to split my solution into 3 projects. a main project , a library , and a unit test project. the sample code with the mathlibrary i can use with my unit test fine. could you show me an example for the wx...
- Mon Oct 23, 2017 5:35 pm
- Forum: Compiler / Linking / IDE Related
- Topic: wxwidgets dll example
- Replies: 5
- Views: 2941
wxwidgets dll example
I am using visual studio 2015 with wxwidgets 3.1.0 I have a main project with a library and a unit test project. basically I would like to use wxwidgets in the library and compile it as a dll which both the main project and unit test will use. when i am using stl i can export the dll no problem. I a...
- Thu Nov 21, 2013 4:11 pm
- Forum: C++ Development
- Topic: Need disabled ctrls that look like enabled
- Replies: 4
- Views: 2044
Re: Need disabled ctrls that look like enabled
i use wxFormbuilder v3.2 and wxwidets 2.9.4
i have a wxnotebook and inserted a panel i uncheck enable in object properties in wxFormbuilder.
i put a sizer and a text box. the text box is enabled.
when i compile and run it doesn't grey out the textbox.
i have a wxnotebook and inserted a panel i uncheck enable in object properties in wxFormbuilder.
i put a sizer and a text box. the text box is enabled.
when i compile and run it doesn't grey out the textbox.
- Thu Nov 21, 2013 9:09 am
- Forum: C++ Development
- Topic: Need disabled ctrls that look like enabled
- Replies: 4
- Views: 2044
Re: Need disabled ctrls that look like enabled
if you disable the panel holding your controls.
it will look like its still active but you wont be able to click on anything.
it will look like its still active but you wont be able to click on anything.
- Fri Nov 15, 2013 5:01 pm
- Forum: C++ Development
- Topic: Inter-Thread Communication.
- Replies: 2
- Views: 1790
Re: Inter-Thread Communication.
thanks.
i decided just to use globals with locks.
i decided just to use globals with locks.