Search found 54 matches

by okurtsev
Wed May 19, 2010 10:25 am
Forum: C++ Development
Topic: How to create a wxBitmap from data
Replies: 2
Views: 478

The code is suspicious. You probably want to create a bitmap with color depth 8, but you use a default depth. wxBITMAP_TYPE_BMP means "Windows bitmap file". I suspect it probably needs bmp-header or something in the data. I think more comfortable way to create bitmap is create wxImage firstly. It al...
by okurtsev
Wed May 12, 2010 7:46 am
Forum: C++ Development
Topic: wxWidgets and MDI containers
Replies: 2
Views: 532

Check docview sample from the samples directory. I've not noticed any difference with the frames behavior comparing MFC.
by okurtsev
Thu Mar 04, 2010 5:27 pm
Forum: C++ Development
Topic: Embedding png in App best solution?
Replies: 17
Views: 2772

If I know right, xpm is not very suitable if you are going to use big images and need compression. I wrote this small program for creating cpp file with all needed staff for creating an image - #include "stdio.h" void convert_image_to_cpp(const char* i_file_name, const char* i_name) { FILE* sf = fop...
by okurtsev
Thu Mar 04, 2010 12:22 pm
Forum: C++ Development
Topic: Problems with my first event posting.
Replies: 12
Views: 1593

try to use brackets
((main_frame*)GetParent())->orbitas_dlg
by okurtsev
Wed Mar 03, 2010 12:18 pm
Forum: C++ Development
Topic: how can I emulate key press event?
Replies: 3
Views: 862

wxKeyEvent::m_keyCode
it is public.

http://docs.wxwidgets.org/2.6/wx_keycodes.html - here are all possible key codes, except ASCII characters
by okurtsev
Tue Mar 02, 2010 10:11 am
Forum: C++ Development
Topic: Trouble with value validation inside kill focus handler
Replies: 1
Views: 483

Hi, seems as it is an unpleasant bug in AUI which does not process wxEVT_MOUSE_CAPTURE_LOST correctly. It is easy to check in AUI demo, stealing the focus from the application - switching to another one for example - while dragging some docked panels separator or simply resizing a docked panel. I ha...
by okurtsev
Tue Mar 02, 2010 9:52 am
Forum: C++ Development
Topic: xrc resource system and cursor resource
Replies: 0
Views: 445

xrc resource system and cursor resource

Hi, I use to work with xrc resource system translating xrc files to c++-source with wxrc utility. The problem is that I can't find the cursor resource in the specifications. Now I have to place the cursors near executable file and do not like it. Please prompt me a comfortable way for storing and lo...
by okurtsev
Fri Feb 26, 2010 12:58 pm
Forum: C++ Development
Topic: undefined reference, where is it?
Replies: 4
Views: 1091

Yes, if you move #include <wx/*> to the top before including windows.h then there would not replaced GetClassInfo in wx headers. I think it should solve your linking problem. But if in a future you will decide to call GetClassInfo in your sources which include windows.h you will receive compiling er...
by okurtsev
Fri Feb 26, 2010 11:04 am
Forum: C++ Development
Topic: Is it possible to get the cursor's position on the textctrl?
Replies: 5
Views: 1697

possibly this one would help

wxTextCtrl::PositionToXY
bool PositionToXY(long pos, long *x, long *y) const

Converts given position to a zero-based column, line number pair.
by okurtsev
Fri Feb 26, 2010 10:52 am
Forum: C++ Development
Topic: Splitting window using wxauimanager
Replies: 7
Views: 1018

I have to change the layout dynamically. so i think its not possible with wxSplitterWindow. I suspect that class wxSplitterWindow was made exactly to split windows. Also I think there is little sense of such windows without dynamic layout. Several samples use wxSplitterWindow - font, splitter and r...
by okurtsev
Thu Feb 25, 2010 4:32 pm
Forum: C++ Development
Topic: Windows calculator
Replies: 5
Views: 1123

You can use PSAPI for enumerating all processes. Here is example - http://msdn.microsoft.com/en-us/library/ms682623(VS.85).aspx Possibly this way you can find out is the calculator already run. I suspect it is simple if you know the name of calculator process and there are not any impostors which pr...
by okurtsev
Thu Feb 25, 2010 11:03 am
Forum: C++ Development
Topic: bitmaps 32 bpp problem
Replies: 11
Views: 1213

Yes, this on refresh I mean in a PaintHandler: Connect( wxEVT_PAINT, wxPaintEventHandler(EditPanel::OnPaint ) ); And the loop for is inside of EditPanel::OnPaint as well the call for the method drawObject consequently. I am not sure that it is a problem, but I really do not like that you create wxP...
by okurtsev
Tue Feb 23, 2010 4:07 pm
Forum: C++ Development
Topic: bitmaps 32 bpp problem
Replies: 11
Views: 1213

"method called on Refresh" - do you mean onPaint handler?

I mean wxPaintDC can be used only in onPaint handler.

In other case you should use wxClientDC.
by okurtsev
Tue Feb 23, 2010 8:49 am
Forum: C++ Development
Topic: Splitting window using wxauimanager
Replies: 7
Views: 1018

I suspect that using wxSplitterWindow::SplitHorizontally or SplitVertically you can initialize the panes with other wxSpliterWindow(s)
by okurtsev
Mon Feb 22, 2010 4:47 pm
Forum: C++ Development
Topic: wxMessageDialog does not open
Replies: 4
Views: 767

I suspect wxMessageDialog uses a native dialog for showing messages, and it is always modal with preventing modeless. I also think it is OK, because "modeless message" is anything, but not a message.