Visual C++ :: On Screen Keyboard Error On 64 Bit Windows 7
Dec 6, 2013
By using visual studio 2010, I have problem calling up on screen keyboard using line below for Windows 7 64 bit.
WinExec("OSK.EXE", SW_SHOW);
However, it is working fine on windows XP 32 bit. How to call up on screen keyboard for 64 bit windows?
Code:
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[]) {
int nRetCode = 0;
HMODULE hModule = ::GetModuleHandle(NULL);
if (hModule != NULL) {
// initialize MFC and print and error on failure
[Code] ...
View 2 Replies
ADVERTISEMENT
Mar 27, 2014
I am writing an application that needs to temporarily disable the Play/Pause button that appears on multimedia keyboards.
Normally, a key can be blocked quite easily by installing a low level keyboard hook (WH_KEYBOARD_LL) where the KeyboardProc intercepts the key (in this case VK_MEDIA_PLAY_PAUSE) and returns a "1" instead of calling CallNextHookEx. I have tried this with other keys (including the Windows key VK_LWIN) and this works perfectly. I also have no problems with this method under Windows 7 where all keys, including VK_MEDIA_PLAY_PAUSE get blocked.
Windows 8 is a different story. When my application has input focus, everything works as expected, meaning the VK_MEDIA_PLAY_PAUSE key gets blocked and no other application responds to it. However, when my application loses focus, my hook procedure gets called (this was verified by sending out a OutputDebugString) but other applications respond to key even though I return a "1". As soon as my app gets focus again, everything is block as it should.
After some investigation, I found that the multimedia keys not only generate keystrokes but also generate WM_APPCOMMAND messages so I added ShellProc (WH_SHELL) hook with the following hook procedure:
LRESULT __declspec(dllexport)__stdcall CALLBACK ShellProc(int nCode,WPARAM wParam,LPARAM lParam) {
// Do we have to handle this message?
if (nCode == HSHELL_APPCOMMAND) {
OutputDebugStringX(">>>>> HSHELL_APPCOMMAND");
[code]....
This procedure is only getting called when my app has input focus. Whenever I have input focus and return "1" the Play/Pause command gets blocked. As soon as I lose focus the procedure does not get called/hooked.
As I have mentioned, the code works for other keys, just not the multimedia keys.
Alternatively, another way of blocking the multimedia keyboards Play/Pause button?
View 6 Replies
View Related
Dec 3, 2013
How to move a character (an arrow or any other character) on screen using keyboard? I'm actually a beginner and have only wrote simple (starter's) programs in C++. It would be great without using any external library which is not included in C++ by default (in other words, using plain C++).
View 8 Replies
View Related
Feb 18, 2015
Basically this is what i need to do. Write a program that reads a number from the keyboard, separates it into its individual digits and prints the digits to screen, each on its own line followed by the same number of stars as itself.
For example, if the number is 2339 the program should print
9 *********
3 ***
3 ***
2 **
So far i have managed to separate the number and have them on different lines, but how to implement the stars onto each line with the number!
My code so far:
int main() {
int n;
printf("number? ");
scanf("%d", &n);
while (n > 0) {
printf("
%d
[Code]...
View 4 Replies
View Related
Jan 28, 2013
The following code it taken from msdn library but it is failing to compile.
the following code has a header where all the variables used here are stored in header App.h.
The following lines are giving trouble:
Code:
DialogBox(pApp->getInstance(), MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, pApp->About);
error: 'App::About': function call missing argument list; use '&App::About' to create a pointer to member
Code:
wcex.lpfnWndProc= &App::WndProc;
error: '=' : cannot convert from 'LRESULT (__stdcall App::* )(HWND,UINT,WPARAM,LPARAM)' to 'WNDPROC'
There is no context in which this conversion is possible
Here is the complete code:
#include "stdafx.h"
#include "App.h"
App::App(void) {
}
App::~App(void) {
[Code] .....
View 4 Replies
View Related
Jun 20, 2014
I am trying to detect keys pressed on a keyboard and mouse on both, Windows and Linux but I am unsure what would be the best practice way to do so. Will I have to detect the keys for each platform individually? Would you make use of an event listener? What's the best way to detect the input-devices?
View 1 Replies
View Related
Mar 6, 2015
Auto lock screen coding for windows phone 8.1.
View 2 Replies
View Related
Mar 13, 2014
I am writing an software that should be able to detect all keyboard inputs by the user. i.e., both hardware and software/on-screen keyboard.
This software is going to be written in a platform independent way and supposed to run on Windows, Linux, Android & iOS.
The idea is to capture the keyboard inputs from a low level, there by making sure that it doesn't miss any inputs even if it's a on-screen keyboard like in a mobile device.
I am looking at possible open source libraries that can be used.
View 1 Replies
View Related
Feb 6, 2015
I downloaded Visual Studio 2013 on a new laptop. On my old one I could press things like ctrl + F7 to compile and ctrl + F5 to start without debugging however now it isn't responding when I type those commands. Nothing happens at all. How to change this? I googled "keyboard shortcuts not working in Visual Studio 2013" but per the usual Google comes up with garbage search results that do not pertain at all.
View 1 Replies
View Related
Oct 4, 2013
I have a C++ WIN32 DLL that acts as a server for a UI. Now i want to capture all keyboard inputs in the PC on the WIN32 dll, whenever the UI has active focus. If the user is typing something into another app, i don't care.
The trick is that, the keyboard can be both a software keyboard or a hardware keyboard. I want to be able to capture every keyboard input from the user on the PC in which the UI and DLL is running.
Is this possible to do? How can i implement this?
View 1 Replies
View Related
Oct 30, 2014
i got project to make a program of text predictor. i know the concepts of c++. array, classes , recursion, in data structure linked list, stack, queues and trees etc.. but i still need to make fast and efficient program of text predictor.
i got data in file.txt , in fact it is a dictionary data.....
View 14 Replies
View Related
Mar 10, 2013
Actually the below program is for Dispersal Algorithm called Rabin-IDA; this algorithm divided the data into N pieces and then recombine it from M pieces (such that M<N).
Thus, the below program needs command line arguments,which entering by Project properties/Debugging. this argument is file name, where the program performing spitted the file into N files, and then recombine it from M divided files, and put it on another file which should also passing its name as argument .
Now my question is, How can i make this program enter the file name by keyboard??(i mean enter the files name by user from screen not as command line arguments) ... In another word, How I can exchange ?
Code:
argc == 3
and
Code:
argc == 2
To enter file name ? i mean what i should do to in
Code:
rabin.split(argv[1])
To pass my file name by use keyboard not Project properties/Debugging?)
the below code is just the main function of program, and the whole of it in this link [URL] .... Information Dispersal Algorithms Rabin-IDA.
Code:
#include "include.h"
void __cdecl _tmain(int argc, TCHAR *argv[]) {
DWORD ini=GetTickCount();
try {
if( argc == 3 ) //recombine
[Code] ....
I know I should use getline() function but how exchange argv[] ?
View 1 Replies
View Related
Feb 5, 2014
My professor wants me to write a program that will read from a dat file, and produce an output on the screen based on the file. I don't understand why I am getting this error. I suspect it has something to do with the number of characters I've told it to read.
#include<iostream>
#include<iomanip>
#include<fstream>
#include<assert.h>
#include<string>
using namespace std;
using namespace System;
struct TStudent {
string month[10];
[Code] .....
I noticed I had a 2 beside girl, after I removed it, it still didn't fix my problem.
View 8 Replies
View Related
Dec 27, 2012
i am doing a structure program "struct book",but at the time of run cmd is opening and i am getting 'windows don't send' error and program has been terminating.
the code is following:
#include<stdio.h>
#include<conio.h>
display();
struct book
[Code]....
View 3 Replies
View Related
Aug 10, 2013
I am writing a program to map keyboard and mouse to an xbox 360 controller with win32 and xinput. I have everything going fine but when im trying to control the mouse with the thumbsticks I get problems with the movement if my program has the focus it moves fine but when I put another window in focus the movement is over sensitive here is the code I am using
Code:
if(_controllerState.Gamepad.sThumbRX >= XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE) {
GetCursorPos(&mousepos);
profile->Buttons[6]->input.type = INPUT_MOUSE;
[Code] .....
I have tried everything to fix it.
View 1 Replies
View Related
Mar 20, 2014
I'm fairly new to visual C++ programming in a windows form and the code displayed below works fine. However my issue is as soon as the program is running it will display "failure" on label7 as soon as the button is clicked. I understand why it is doing this as "a" is not in the textbox at this time so it reads the else line and displays the message. When I enter "a" in the textbox everything works fine and label7 changes to the right message.
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
label1->Text = "Question 1: test";
label2->Text = "A. test";
label3->Text = "B. test";
label4->Text = "C. test";
[code].....
View 4 Replies
View Related
Nov 28, 2013
I am working on a solution for the above problem. Without success by now. To draw it within OnMouseMove with XOR-operation in not a good solution.
One problem: OnMouseMove is not called if the mouse moves to outside the CView-window.
But in this case the crosshairs should be deleted.
Second: working with XOR will not be good because we need a defined state (visible/not visible).
View 11 Replies
View Related
Jan 11, 2013
I checked through the net and most of the solution like clrcr(); is not working for microsoft visual 2010. SO i was wondering for those who was using the same ver of c++ as me how do you clear the screen?
View 5 Replies
View Related
Nov 24, 2013
How do I print a mathematical series such as
1 + 2/2! - 3/3! + ...... n/n! //n is read from user
Not only we need to print the series on the screen but at the same time find the sum using simple loops.
View 1 Replies
View Related
Apr 22, 2014
I'm trying to determine (from my Win32 process) if a Metro (or a Modern UI) app is currently displayed on the screen. I found the IAppVisibility::GetAppVisibilityOnMonitor method that can do just that, and I even found a C++ sample, but my issue is that I'm compiling it with the Visual Studio 2008 that does not have the definitions for the IAppVisibility interface, so the following:
Code:
#include <Shobjidl.h> //Earlier version
IAppVisibility* pAppVis = NULL;
HRESULT hr = CoCreateInstance(CLSID_AppVisibility, NULL, CLSCTX_INPROC_SERVER,
IID_IAppVisibility, (void**) &pAppVis);
Results in a set of errors:
Code:
error C2065: 'IAppVisibility' : undeclared identifier
error C2065: 'IID_IAppVisibility' : undeclared identifier
how to define them?
View 4 Replies
View Related
Jan 15, 2014
I have a visual impairment that makes it very hard for me to use the standard dark text on white background themes. I use High Contrast but many apps don't query the system for colors (I.E. aren't theme-aware) and consequently display pale or dark text on a white background regarding of the theme selected.
There is a product called ZoomText that allows for inverting the brightness of everything being displayed. I just use a normal theme, let all apps display naturally, and then invert the entire screens brightness.
But ZoomText doesn't support multiple monitors. And it does a lot more than I need. And it hogs the CPU. And it costs a lot.
Looking for some of the APIs that I need to capture the bitmaps for all monitors, invert the brightness of all pixels, and refresh the display contexts. And make that happen so smoothly that it appears like there is nothing going on behind the scenes. (DirectX, OpenGL, ???)
View 4 Replies
View Related
Jul 28, 2013
I am writing a pure C based win32 applications. I have drawn line. Now i want to translate that line, move the line whereved user wants to move on screen. Then again I drawn another line, I am drawing multiple lines.
I have created rectangle region for each line and trying to move the line.
When I move the 2nd line over the 1st line on screen the 1st line is getting wiped out. Because I am InvalidateRect() of the rect for the line being moved, so when that rectangle is crossing the other line then the other line is getting removed from the screen.
How can I rectify it. How can I have all the lined being on the screen and moved according to the user's wish. The code should be pure C and win32 no MFC.
View 4 Replies
View Related
Jul 11, 2014
I have an problem with a CDialogbar if my app runs on a system with two screens (side by side). I can not resize it while the CDialogbar is in floating state on the second screen.
I figured out that the problem is the mfc-function CDockContext::Stretch().
It limits the CDialogbar to the primary screen (using ::GetDesktopWindow() to verify the position).
What can I do?
View 2 Replies
View Related
Feb 26, 2014
I need to edit ,update and display a group of 40 parameters on screen. (10 parameters per page and use of Arrow Key pad or touch screen clicks to modify value)....
For that I will need .. Parameter No . , String Name , Point Screen Cord , double value , next element no. etc I have my old code with structure and array of structure written in C. I have translated it on C++/MFC .
How can I implement Class property of c++ ?
View 8 Replies
View Related
Apr 27, 2013
I've just integrated the Windows SDK V7.0A into my VS2005 application, and I'm getting the dreaded "Application configuration error" when I try to run it on an XP machine.
It runs fine on the development machine, and some customer machines (Win7 and Win8), but will not run on XP due to missing/incorrect version dlls.
I've rebuilt all my libraries, but still no joy.
So, my first question is - If I upgrade the Windows SDK to V7.0A, do I also need to use MFC 10 and msvcrt10, or can I stick with MFC 8?
The next question is, how do I find out which dlls are missing, and which libraries or other dlls are requesting the missing versions?
View 11 Replies
View Related
Apr 17, 2013
In my application I have some type of windows showed in an instance of time, and an action shows a new one that i want have the focus all the time , in the way that i can't works with no one of the others. They all are windows, child windows an modeless dialogs, but i don't know how to do. I try use EnableWindow(FALSE) that all the others windows and dialogs, but not works.
View 2 Replies
View Related