Create an accelerator resource using resource editor (or manually by editing the resource file). Set the Key combinations you need for your acceleraton (like Ctrl+K etc.).Give ID of this accelerator same as your manu ID. Thats all.
Hi ! I'm developing a SDI application using CHtmlView. Java applets which contain TextAreas emit beeps although they do accept & relect the characters - this problem does not occur in Win2000 however ! IE too is able to successfully side-step this problem. The underlying MSAWT_Comp_Class seems to be receiving a WM_GETDLGCODE message ! I tried the CMyView::PreTranslateMessage fix suggested by the MS Support site but it hasn't helped ! Has anybody else come across this problem ? Thanks for everything...
I'm trying to make a game, and every thing works fine! But the keyboard!...
If i press the key, it doesnt act all the time. Like it should in a game. When i move my ship, by pressing the button, my ship only move a litle, then after a second it moves full. But i want to get around this problem.
Like, i want it to move when i hold the key, and stop when i release it.
I think whats wrong is i use the windows keyboard input to Move my ship(The keyboard repeat delay).
Most games have a "main loop", in conjuction with some timer code to make it run at a constant rate. You can also make a game behaving like a standard application - I mean make it event driven. Of course, you can combine these two...
Here is some pseudocode for the 1st and 2nd type:
Event Driven Here, the main loop is the standard message dispatcher
The reason you have this problem is because windows sends WM_CHAR and WM_KEYDOWN messages using the keyboard delay and repeat rate. If it wasn't like that, it would be impossible to typeeeeeeeeeeeeee;)
One way would be to use DirectInput (part of DirectX). I haven't used it, but I'm sure it won't be hard.
If you're using the game loop method, you could replace the pseudo-is_key_down functions with GetKeyState() (or GetAsyncKeyState()). These functions take the virtual key you're interested in as parameter and return the status of that key. If I remember correctly, you should "and" the return value with 0x8000 to get the pressed/unpressed state.
If you're using the OnTimer() and OnKey() method, you can remove the OnKey() function and use what I wrote above in (2), inside OnTimer().
There are all sorts of possible reasons for this. What you should do is put some message boxes into the function in question, so by a process of elimination you can figure out where the program is crashing. I have lots of _bstr_t variables, and lots of CComBSTR, and I'm pretty crash free right now, but I've had to use the old message box trick a few times to figure out what line was failing so I could debug it.
Secrets of a happy marriage #27:
Never go to bed if you are mad at each other. It's more fun to stay up and fight.
I've developed a VC addin which works fine and now i want to provide some more feedback to the user and get rid of boring message boxes. This output should go either
a) into a new pane in the VC output window
b) into a existing pane in the VC output window (Results)
Using vcspawn is out of question. Using the OpenVC approch is to "illegal" for my taste.
Any clues how to send output to VC's output window? Or, maybe even better: how to add another docking bar with my own output window?
I was interested in doing this for my ResOrg add-in, but came to the conclusion it would be risky and time consuming, so I never got around to it.
What you want to do will almost certainly involve subclassing the main DevStudio window. You might be able to do it by hooking the WM_CREATE message of the mainframe and adding a child window to the control bar.
I suspect though that if the VC code isn't aware of the pane it won't work correctly - the only way to find out is to try it.
Adding a docking window of your own is non-trivial but possible - remember you'll need to provide a menu command or toolbar button to show/hide it, which means handling WM_COMMAND and WM_INITMENUPOPUP messages from the mainframe (and probably others too). You'll also need a suitable framework (such as BCGControlBar) to provide the docking window classes, unless you intend to write them yourself (which I wouldn't recommend).
Note that that there can be problems if several Add-Ins attempt to subclass the same window. This is a known issue with VC which has no resolution yet I'm afraid.
All in all, I think you'll find that you have to use the OpenVC "tricks" in order to get it too work. If I can assist in any way, please feel free to ask.
Thanks a lot for this detailed explanation.
In the meantime i found a more or less convenient solution: PrintToOutputWindow() in the IApplication object.
It will output whatever you pass as parameter into a pane called "Macro". Suppose we cant choose another name for this pane.
Maybe this will be sufficient for your excellent ResOrg?
I have read that article, fining it useful, but I am trying to implement that type of thing into the CODCBReocrdset class http://www.codeproject.com/database/odbcrecordset.asp
This dynamic class does not support writing binary types to the DB, but can read them. I've tried to adapt the code from the Using Blob article. It works fine for string less than ~50 characters but get I get a 'string truncated' error for anything larger. I'm using a memo field in Access, but its the same error with varBinary types as apposed to varChar.
In my application i use ADO method in differents method. So, in each of them when i need of smart pointer as _RecordsetPtr or _ConnectionPtr, i declare them as local variable in each of them. So, i would like to know how and where i could declare the variable so that they would declare one time only. I try to declare them in the .h file or at the top of the .cpp file and it doesn't work, so what is the correct way of doing that?
thanks in advance
Last Visit: 31-Dec-99 18:00 Last Update: 23-May-17 17:25