I am writing a such application in which i am need to block/disable the some shortcut keys like
WIN+L, WIN+G , Alt+Ctrl+Del,
ect...
we have already similar questions available on stack overflow but no one provided exact answer.
Is it possible ?
How?
I tried using LowLevelKeyboardProc but no luck, other normal shortcut is blocking like Alt+Tab...
Related
First off I've searched my hind end off for hours now trying to find an answer, but I can't seem to find anything remotely useful. What I am trying to do is to find a way to add in code-folding to the built in batch language. Basically I love using batch, but when I have tons of code, I want to be able to hide the code I do not need to edit which will make it easier to find the code I DO need to edit. What I want is to be able to make it so if I typed "::{" (without quotes) and have finished code in the middle and end with "::}" (also without quotes).
First question, is it possible? Can I add something like this (that one could normally add in the "user defined language") to the built-in batch language?
Next question, if not, where could I figure out how to basically re-create the batch language (and add my own twists) into a new "user defined language"?
Last question, if neither of those are possible, what are my other options?
Like I said, I've researched for hours. I'm not one to ask for help on forums, but I'm desperate at this point. All I want is to use the batch language and have code folding. Doesn't seem like too much to ask, but it might be!
Thanks!
In Notepad++ you can define a language by going to the Language menu --> Define your language (at least in version 6.6.9 anyway). On the Folder & Default tab, under Folding in code 1 style, input a ( into the "Open" box. Input a ) into the "Close" box. Save this as "Windows Batch" (or at least something that doesn't conflict with the in-built language named "batch".
Until you define styles, it'll be ugly and unusable, but it should allow you to collapse / expand parenthetical code blocks as a proof of concept and see whether this project is worthy of further effort. Your next steps will be to copypaste batch keywords from %PROGRAMFILES(x86)%\Notepad++\langs.model.xml, and use the "batch" language styles from your favorite theme in Notepad++\themes\. If I were doing it, I'd input a few basic things using the GUI (like keywords, folding characters, etc.), then export to an XML file on the Desktop and copypaste the rest from a theme, search-&-replacing stuff as needed to massage the theme into your user-defined language. At the end, import your massaged XML into the Define your language dialog. It was going to be more effort than I felt like exerting, but your mileage may vary. If you decide to undertake this journey and you complete it, I hope you'll consider sharing your efforts.
This similar question has a few answers that suggest some workarounds you might find worthwhile -- in particular, hiding, rather than collapsing.
I'm trying to write some new statements for an internal C DSL.
The tool of my choice is MPS and the base is the c-core of mbeddr.
I found this tutorial on the internet. Since it is a little old, I am not able to duplicate the exact structure of the setup itself.
What I want to do is to create a new language. This language must be extended by com.mbeddr.core. I found, how to extend the language and did so. I needed to extend every single language com.mbeddr.core.* by its own, everything else did not work (it does not even work properly now).
The I created a new statement in a structure module. There I extended the concept to a Statement (c.m.c.statements.structure is shown). Then, following the video tutorial, I wanted to add an expression as a child, this is where it fails.
I am not sure where I went wrong here. It is very difficult to set it up properly, since all tutorials/guides are outdated.
Thanks for your help,
Best Simon
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I was making some games using Game Maker, but I would like to make simple games using C. I am a newb C programmer. When I code the output is always in the CMD Windows Console. I could make some simple games but always in the console, which is not very flexible (you can't animate without scrolling). When you run a more complex game, a complete new screen is created and I actually interact whit that screen.
So the question that i am having using C language is: How is this new screen being loaded? I think there is some windows API to create a new screen or something. By the way, in the old times, I mean DOS time, you just used a console but you could load a new screen where the game was played. How can you achieve this?
I would like some guideline to research the root. I just don't want to call library X or use SDL.
Thanks your your help.
Since you mention library X i assume you are on a Linux system. There are several different ways to archive your goal. If you would like to still use the console but with more graphics involved you could take a look at library ncurses ( http://www.gnu.org/software/ncurses/ ).
If you want to do more advanced graphics i recommend you to take a look here : How do you create a window in Linux with C++?
C programming dates back to 1970's, so you can think of creating games similar to that era.
The window or the new screen is loaded by few preprocessor directives which are already compiled and stored by the developers.
A new screen can be achieved by giving a few commands:
#include<stdio.h>
#include<conio.h>
void main()
{
local declarations;
And your program for the game;
getch();
}
What this basically do is the function getch(); which is stored in (conio.h) will open a new window and it will display
the output till it gets a value from the keyboard ie it displays the output till you press any key from the keyboard.
hope this answer helps you.
Creating new Windows can get pretty hairy (ie. the code can be complicated and difficult to read). I'll try to give a somewhat high-level overview, then link you to a good tutorial for loading a basic window.
You need to declare a couple of variables of types HWND and WNDCLASSEX, and call a bunch of Windows API functions to initialize the Window with some settings and whatnot.
Once this is done, you need to enter a loop that handles all the window interactions, usually with TranslateMessage and DispatchMessage inside the loop.
You also need to implement a callback procedure for handling Windows events such as mouse clicks, closing the window, etc. This is usually done in a LRESULT CALLBACK WndProcedure.
I've now thrown a bunch of new words and ideas around with little explanation; check out this tutorial for a full example of what I've just tried to explain.
http://www.functionx.com/win32/Lesson01c.htm
(EDIT: the link above is dead now, so here's a link to a cache of it from the Wayback Machine https://web.archive.org/web/20190203182520/http://www.functionx.com/win32/Lesson01c.htm)
Hope this helps!
Also - this is all assuming you're on Windows based on your comment about a Windows API (ie. windows.h). If you're on Linux, you'll need to use X.
As my question was remained unanswered in Rapidminer forum via this address :
my original question
I would like to propose it here again, please inform me if by any chance you know the answer.
I have noticed no matter what type of extensions we use for getting export (i.e. .pdf, .ps .jpg , etc), the export engine do like a screenshot of the current view instead of the whole output space, this has caused lots of issues for me exporting gigantic decision trees of my research.
Please someone advise me on this issue.
Best,
Amir
Use the log operator at the end of your process and configure it by the information you need. The log operator will save all results in a text file. Based on this file you can generate all your graphs at any time using rapidminer or gnuplot...
I find this way the best to save your time and memory space and also very easy to share in my opinion.
I'm creating windows for debugging like this:
cvNamedWindow("a",0); cvShowImage("a", imageA);
cvNamedWindow("b",0); cvShowImage("b", imageB);
cvNamedWindow("c",0); cvShowImage("c", imageC);
OpenCV creates all these windows in the exact same spot, which is not very practical, since only one of them is visible unless you move them around.
Can I make OpenCV automatically arrange the windows so that all of them can be seen (like a tiling window manager)? Or do I have to do this myself using cvMoveWindow?
No, this is impossible - there's no such feature in User Interface (I also was wondering about such functionality a month ago).
You have to manualy set window(s) position by calling MoveWindow - this is the only solution.