I want to create a console like dialog, I was thinking like in a multi-line edit boxt, but I don't know how so I need some ideas to start with. It should work like a "real" console, where you only can write at the prompt, only delete what you just have written, but not yet executed and so on. Many games have a console like this, to send messages etc, maybe there's some code to start with? What the result should be is an interactive console for Python, but intergrated in my application as a modeless window or a dialog. Python is easy to embed with, for example PyRun_InteractiveLoop, reading and writing to stdin/out. Any ideas how this can be archived? Thanks!
z33z
Posts
-
Ideas for an embedded interactive console? -
How to stop popup menu from closing?I found out how to do it: Inherit CMFCPopupMenuBar and handle the button clicks there. In my inherited CMFCDropDownListBox I override GetMenuBar and returns an instance of my inherited CMFCPopupMenuBar class.
-
How to stop popup menu from closing?What I'm after it to stop CMFCPopupMenu from getting left button click messages, and handle those messages myself. :)
-
How to stop popup menu from closing?How do you stop a popup menu from closing when clicking with mouse button? What I want to do is to create a CMFCDropDownListBox with check boxes (to create a drop list with check boxes). I've created a derived class of CMFCDropDownListBox and CMFCRibbonComboBox. CMFCDropDownListBox inherits from CMFCPopupMenu. I've tried to add PreTranslateMessage to my derived DropDownListBox class, but LBUTTONUP/DOWN messages never happens. Any tip on how to do this? A CMFCRibbonComboBox with check boxes..
-
Possible to detect mouse click in macro?Is is possible to write a macro event handler to detect when I double click on a word in the editor in Visual studio (2005)?
-
Digit combination string [modified]Hi! I wan't to construct a list of numbers which covers all combinations of those numbers. Say for example that I want all combinations of the numbers 1 2 3 4, with the lenght of four (or say numbers 1 to 9 but still with the lenght of four, or if I know that '2' must be in the combination i.e. 2xxx, x2xx, xx2x or xxx2), like 1234, 1324 etc, but as a sequential string, e.g. 1234232 etc, where every new number becomes a new combination (in this case that string tests 1234, 2342, 3423, 4232). How can I construct such an algorithm to finde the shortest possible string covering all combinations? I think it's called Euler path, but not sure. Did some googling. Anyone who can push me in the right direction? Maybe an implementation as well? Thanks in advance!
modified on Wednesday, October 1, 2008 4:41 AM
-
Problem with inherited macro variablesHi! I want to create some macro variable specific to my project, just like $(SolutionDir) etc that is predefined, and there for I create property sheets containing the macros (I'm using VS 2005) What I want to achieve is to have one vsprops-file with macron common for all my projects, and one file which inherits from the common file with some extra macros specific for this project (and maybe redefinitions). Like: Common file: $(Foo) Project specific file: $(Bar) Available in Visual studio: $(Foo) $(Bar) The problem is that if I write a macro in the parent/common file, it can't be seen in the project if I don't redefine it in the project specific file using same name but an empty value. Can this be done with inheritage?
-
Direct Input problemI don't know if this is correct forum..? I'm writing a plugin to an application to support force feedback. The original application doesn't use dinput, but windows winmm.lib functions to read the joystick. Here's the problem: How can I "match" a joystick ID from Winmm to use the same with DInput? If I in the original application call
joyGetPosEx(JOYSTICKID1, ...)
to poll it, then I want to call my plugin to create a force feedback effect on the same joystick. Now I do something like:// Enumerate all joysticks using windows MM and add to a list ... if (joyGetDevCaps(i, &jc, sizeof(JOYCAPS)) == JOYERR_NOERROR) { dwJoystickList[i] = MAKELONG(jc.wMid, jc.wPid); // Save product ID } ...
and when enumerating using direct input:... if (pJoysticks[i] == pdidInstance->guidProduct.Data1) { (*it) = tJI; // Save the interface at same position } ...
This works if all joysticks are different, i.e. product ID is different. Then I can call my functionCreateFFEffect(joystick number 1, ...)
. But how to solve the problem to separate many joysticks of same brand? Direct input has an instance ID, but is there any way to get the same from windows multimedia functions? Thanks for any tips! -
Socket method advice?Hi! I'm writing a program which needs to recieve a lot of data though a socket. Another application sends a lot of small portions (like 50 byte) of data (measurement data) to it over the network, like 1000 messages per second. Which socket communication is the best/fastest? Right now I testet a blocking CSocket in its own thread, but that really slows down the machine. But how should I do instead? Any tip? Should I use CAsyncSocket instead, and how? Blocking or non blocking? Thankful for any suggestion!!