Search found 1195 matches

by mc2r
Mon Aug 17, 2009 3:55 am
Forum: C++ Development
Topic: Copying a metafile to the clipboard
Replies: 6
Views: 686

Sorry. Call wxClipboard::SetData() once, but call wxDataObject::SetData() of the data object you pass in the one call to wxClipboard::SetData() multiple times for each format http://docs.wxwidgets.org/stable/wx_wxdataobject.html#wxdataobjectsetdata -Max FYI: I haven't tried it but wxDataObject::SetD...
by mc2r
Mon Aug 17, 2009 3:47 am
Forum: C++ Development
Topic: Copying a metafile to the clipboard
Replies: 6
Views: 686

Use the SetData() method of wxClipboard to set the data for each of the different formats you are interested in.

http://docs.wxwidgets.org/stable/wx_wxc ... xclipboard

-Max
by mc2r
Mon Aug 17, 2009 2:33 am
Forum: C++ Development
Topic: wxTreeListCtrl
Replies: 3
Views: 750

Solved my problems. Mostly. This gets it to compile on linux(Fedora 11), both gcc 4.4.0 and mingw cross compiler 4.4.0. The Makefile in samples/treelisttest thinks it needs to run windres for some reason make windres `wx-config --cppflags -rescomp` -i treelisttest.rc -J rc -o treelisttest.res -O cof...
by mc2r
Mon Aug 17, 2009 12:46 am
Forum: C++ Development
Topic: wxTreeListCtrl
Replies: 3
Views: 750

forgot wxWidgets versions wx-config --list Default config is gtk2-unicode-release-2.8 /usr/i686-pc-mingw32/sys-root/mingw/bin/wx-config --list Default config is i686-pc-mingw32-msw-unicode-debug-2.8 Default config will be used for output Alternate matches: i686-pc-mingw32-msw-unicode-release-2.8
by mc2r
Mon Aug 17, 2009 12:36 am
Forum: C++ Development
Topic: wxTreeListCtrl
Replies: 3
Views: 750

wxTreeListCtrl

Just checking to see if anyone has compiled the newest release of this? Trying to get the 07/09/2009 version fo this to build from here http://wxcode.sourceforge.net/components/treelistctrl/ I thought from reading the forum that it was stable and would just build. But I can't get it to compile with ...
by mc2r
Wed May 27, 2009 10:53 pm
Forum: C++ Development
Topic: Have the application restart
Replies: 10
Views: 1601

Write a helper app that only waits a moment and then starts your app.

Launch it from your app, your app exits
helper app waits for your app to exit and then restarts it
helper app exits
by mc2r
Sun May 24, 2009 3:16 am
Forum: Component Writing
Topic: A node system.
Replies: 4
Views: 2406

yes
by mc2r
Tue May 19, 2009 9:39 pm
Forum: C++ Development
Topic: Send pre defined 'keystrokes' + string (txt) to window
Replies: 16
Views: 2337

All i need to figure out now : How to send an 'ENTER' to guildwars or better.. in a way that guildwars will accept it as an enter.. Don't the bots send ENTER? I'd think the answer should be there. But one thing you could try and this is just a guess is send "\n". remembering of course that you'll h...
by mc2r
Tue May 19, 2009 3:26 pm
Forum: C++ Development
Topic: Send pre defined 'keystrokes' + string (txt) to window
Replies: 16
Views: 2337

One other thought before I get to working on my own buggy code. You could google for "guild wars bot" and see if you can find one with source code. Might be able to figure out how to interact with the game through some already written code.

-Max
by mc2r
Tue May 19, 2009 3:17 pm
Forum: C++ Development
Topic: Send pre defined 'keystrokes' + string (txt) to window
Replies: 16
Views: 2337

What did not work to my surprise was combining the isupper with the isdigit : if(isupper(SENDTXT[letternr] || isdigit(SENDTXT[letternr])){ } Resulted in not showing numbers nor upper cases, just nothing so i had to split that one up. I think you have a missing paren. Not sure if that was an error e...
by mc2r
Tue May 19, 2009 3:09 pm
Forum: C++ Development
Topic: GUI freezes while wxThread is reading serial port
Replies: 3
Views: 668

Like Romas said you're going to need to post some code. From your description of the problem I'd hazard a guess that it's a lot of code in regards to posting on a forum. What you want to do is start removing stuff until you have the minimal code needed to reproduce this. Chances are in trying to fin...
by mc2r
Fri May 15, 2009 6:35 pm
Forum: C++ Development
Topic: Send pre defined 'keystrokes' + string (txt) to window
Replies: 16
Views: 2337

At a guess, guildwars isn't using a text box with a an HWND, but some gui element of their own design. You don't post any code but I assume you are doing something like SendMessage(hNotepad, WM_CHAR, (TCHAR) 'H', 0); SendMessage(hNotepad, WM_CHAR, (TCHAR) 'E', 0); SendMessage(hNotepad, WM_CHAR, (TCH...
by mc2r
Fri May 15, 2009 3:47 pm
Forum: General Development
Topic: Portable Overlapped Serial Communication
Replies: 1
Views: 790

Overlapped I/O is a windows'ism introduced in NT. In unix/posix you might want to look at the Asynchronous I/O API (AIO). I've never used Overlapped I/O so I couldn't begin to guess how compatible the two are or how much it would take to convert. Boost also has an asycn I/O library. Mostly used for ...
by mc2r
Fri May 15, 2009 3:36 pm
Forum: C++ Development
Topic: c++ const reference question
Replies: 2
Views: 556

Hi, const T& xx and T const& xx are the same. It is a matter of choise. Just to elaborate on Romas. There is no constant reference only references to constants as opposed to pointers where you can have a constant pointer or a pointer to a constant. In the case of a reference as Romas says it is a m...
by mc2r
Wed May 06, 2009 5:08 am
Forum: C++ Development
Topic: Set Window/Dialogue size to optimal values
Replies: 2
Views: 518

Not sure what exactly the LayoutManager does or what the "optimal size" is that you are looking for. There are a couple of options that might work for you. Check out the docs for wxSizer . Look at wxSizer::Fit() wxSizer::FitInside() wxSizer::Layout() I think one of those might be similar to what you...