Visual C++ :: Pan Gesture In Desktop Application
Nov 11, 2014
I'm struggling with the pan gesture in a desktop application for my Surface Pro 2.
I simply want to pan (or "swipe" if you prefer) with two fingers, but it doesn't behave like I want it to. If I put two fingers on the screen and move them straight diagonally, I receive a series of client coordinates that are aligned in a vertical or horizontal direction. Only if I perform some circular motion, then it's suddenly possible to move diagonally and receive coordinates accordingly.
I've tried with MFC, by overriding CView::OnGesturePan. I've also tried with a sample project provided by Intel, that handles the GID_PAN message in WndProc to move a rectangle around, but with the very same result. The project can be downloaded from [URL] ... fordesktop.zip, so you can quickly reproduce the behaviour if you have a touch screen.
Code:
void GestureHandler::handlePan(HWND hWnd, GESTUREINFO gi) {
if (gi.dwFlags & GF_BEGIN) {
m_first.x = gi.ptsLocation.x;
m_first.y = gi.ptsLocation.y;
[Code] .....
I first thought it had to do with the points being too close to each other. I mean, if two points lies only one pixel apart, it can only result in eight different directions. But if I modify the code to only update "m_first" when the distance between the points are greater than some minimum distance, the points still keep being projected to a horizontal or vertical line relative to the first starting point.
View 1 Replies
ADVERTISEMENT
Feb 12, 2013
I want to develop windows application using c# ,.net framework 3.5 as front and Mysql4.1 as a backed language.Now my question is i want to install this application only on server PC,so is it possible to access this application within LAN connected PC.If yes how do i build my application.or do i need to install .net framework on LAN connected PC's(or on client PC's)
View 1 Replies
View Related
May 5, 2013
I plan on creating a desktop application that utilizes external hardware such as cameras and scanners and captures pictures and scans for use within the application. Is using straight C++ the way to go, or would a mixture between C++ and C# be beneficial? (I heard they can be used in conjunction but is it more hassle than benefit?)
Is GUI development any better in one language over the other? I am hoping to be able to choose a language with less installation requirements for the end user.
I understand that certain requirements are placed on the end users computer depending on what you are developing with (I would be using Visual Studio 2012).
View 2 Replies
View Related
Sep 26, 2014
i want to send SMS from APP Using Iphone. i can send SMS from andriod but when i connect Iphone so COM PORT can't be detected.
View 1 Replies
View Related
Apr 10, 2013
I have a project in VS2005 and I'm trying to add the two-finger panning gesture. Problem is, there doesn't seem to be a way to add this in Visual Studio 2005. None of the windows gesture code seems to be there. Is there a way to add this in VS2005, or can I only do this in VS2008 or later?
View 1 Replies
View Related
Jul 10, 2013
I have a CFormView derived window which I would like to position at run time. In particular when the user clicks a button I would like to shfit the CFormView window and open up a new Dialog window so that the two do not overlap.
I have created the CFormView window and the dialog window - how to shfit the CFormView window?
I shift the Dialog window as follows in OnInitDialog: SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
View 10 Replies
View Related
Oct 9, 2012
How can I do this??
Suppose I have Win2008server and many users from defferent domains log in, so every user has its own session.
How can I obtain from the session the domain name of the user who logged in to server??
View 1 Replies
View Related
Mar 24, 2014
I've been using code that takes a bitmap and then changes the color:
private void GetPixel(Bitmap ProcessedBitmap)
{
unsafe
{
[Code].....
Instead of using a Bitmap image (jpg, png, etc), I would like to use the desktop. I'm trying to scan my desktop for a pixel color using lockbits (GetPixel was way too slow.). I also do not wish to change the color of anything, I just want to loop until the pixel is found (with my getpixel method, I just put an if/then statement in the for loop). Something like:
if((CurrentPixel.R == 0xff) && (CurrentPixel.G == 0xff) && (CurrentPixel.B == 0xff)) Then
MsgBox("Pixel Found!")
View 3 Replies
View Related
Feb 7, 2013
I have a question about to run an MFC dialog based C++ application from console: if I run my application from console, I see the application start and the console immediately back to prompt. I need that console wait the application exit before show me the prompt again. I tried on Visual Studio 6, 2005 and 2010 but the behavior is the same.
View 3 Replies
View Related
Jun 23, 2014
I want to achieve such an efect like - one view which takes all MDI area and some views which arelike non modal dialogs
Two Child frames will be correct? one for "big" view which will be always visible and second for a "smal" views
View 2 Replies
View Related
Jul 5, 2013
write a program that will connect my laptop to my desktop unlike gotomypc.com. I want to have my desktop hooked up to a router and sends video and audio info to my laptop. At the same time my laptop will be sending it's keyboard and mouse. If there is an audio input from a microphone it will send that to the desktop. If the webcam needs to be used for something like Skype, it will send that to the desktop too. I think it would be faster for the laptop to process any flash drives, but it should be able to send that to the desktop too. Has a program like this already been created? Is C++ an optimal language to write the program in?
View 5 Replies
View Related
Mar 23, 2013
We have developed MDI application on 17 inch monitor in VC++ 2010 MFC. But now management wants application to run on 10 inch laptop.
Application does not fit,it goes out of screen. How to fit application on smaller screen
View 1 Replies
View Related
Feb 11, 2013
I passed the CStringArray to dll & wrote the String in a file.
The error File: array_s.cpp, Line No: 420 was occured when i close the .exe file.
For your reference:
Code:
Function Declaration in DLL :
DECLDIR void SetParName(CStringArray& ParName);
Function Definition in DLL :
DECLDIR void SetParName(CStringArray& ParName){
ParName.Add("X1");
ParName.Add("X2");
[Vode] .....
My doubt is, CStringArray items are allocated in the DLL. So, when i release the CStringArray object in the application. Is it can release memory that are allocated in the DLL ?
View 1 Replies
View Related
Jan 15, 2014
I have a HTML code and i need to developing a form application.
issue: i have a html code and a database table , how to put this together with code and link them and peu them on server ...
View 3 Replies
View Related
Feb 4, 2014
I have a SDI application. I created a method OnClose to handle ON_WM_CLOSE of CMainFrm. This onclose() function calls a method in cmyview.cpp. Here, I created a thread that calls global function and from this function it calls another function in cmyview.cpp. At certain condition my application should close at here, I used postmessgae(WM_CLOSE (or) WM_DESTROY). I am having an error as object reference not set on postmessage(WM_CLOSE) it is going to afxwin2.inl page where exception occurs.
Below is code snippetHere, either j or k will only be true depneds on user input)
MainFrm.cpp:
void CMainFrame::OnClose()
{
CMyView* pview = (CMyView*)((CFrameWnd*)AfxGetMainWnd())->GetActiveView();
pview->method1();
}
[Code]...
View 3 Replies
View Related
May 15, 2014
I have a Win32 C++ application which works pretty well, but I don't like the GUI and I want to replace it with one designed graphically, a la Windows Forms. What is the best strategy to port my code? I tried creating a new Windows Forms C++ application and got pretty far with it, but was stymied when trying to call my unmanaged functions on a button press. If I can't use Forms to add a GUI without completely rewriting the program, what's my best bet?
View 14 Replies
View Related
Jan 16, 2013
In a typical MFC application I use SetRegistryKey(_T("My_Company")); to set the root registry entry for my application. The MFC application however creates an entry by the name of executable where it stores all the settings of that application. I don't want that because we often change the name of executable and I want it read registry from the same set location. As example if my application name is Calculator.exe and Calculator_debug.exe it creates two different registry settings.
My_CompanyCalculatorsettings
My_CompanyCalculator_debugsettings.
How can I stop that?
View 1 Replies
View Related
Apr 17, 2015
I am developing a MDI application that will contain a RibbonBar and a Properties Pane window. The MDI documents are not tabbed. I am finding that when I try to move the client window around, it gets clipped by the RibbonBar and the Properties Pane window (shown in image). I know the client window cannot go outside the client area, but can the client window be on top of the ribbon bar and the properties pane window?
I am using VStudio 2008.
View 7 Replies
View Related
Nov 9, 2013
I am new in Visual C++ and I have to make an MFC application with "child" windows. Here is what i need to achieve - [URL] ..... As you can observe when you click on the cross of popup window or child window 2 both are closing.
View 2 Replies
View Related
Aug 8, 2012
I have 2 database. One is on live server and the other on local desktop.
User can make changes in database offline on local desktop.
But later he wants to move his changes to live server and also get the updates done on live server by other users. How can this be accomplished? What algorithm can be applied?
View 3 Replies
View Related
Jul 31, 2013
I have created a MFC dialog based application. Now I want to implement such a functionailty that I will be closing my application through command prompt. And while closing of my application the ExitInstance() method of my application should get called. What is the command which I should put in the command prompt to close my application in such a way.
View 8 Replies
View Related
Jan 23, 2015
This code doesn't send parameters to mysql database vis WININET post, i see it send empty fields, what exactly could be the problem:
Code:
#include <stdio.h>
#include <windows.h>
#include <string.h>
#include <Wininet.h>
#define PAGE_NAME "gate.php"
[Code] ....
View 13 Replies
View Related
Jan 20, 2014
For my project I need to check whether my application instance is already running or not. I got the following code from Net ..
Code :
HANDLE mutex;
mutex = CreateMutex( NULL, TRUE, _T("MYAPPNAME"));
if ( GetLastError() == ERROR_ALREADY_EXISTS ) {
// There's another instance running. What do you do?
AfxMessageBox(_T("Application Already Exists"));
PostQuitMessage(0);
ExitThread(0);
return;
}
The code works fine .. but the code even works fine , even if I pass any string as a parameter to CreateMutex. E.g.
mutex = CreateMutex( NULL, TRUE, _T("QQQQ"));
How it is working fine ?
View 5 Replies
View Related
Apr 8, 2013
I am doing an project in SDI. I have two functions name sendtext(CString str) and displaytext(CString inr) both in different class. I have a pointer name pView to send the string str to function "displaytext". The problem is after some operations i get a text in str and i send that text to display text in the output screen i get the text and wen the second text comes to "displaytext" the former text disappears and the latest string only present. How can i display both the text in the output window on ClistCtrl class.
Code:
Void sendtext(CString str)
{
// do some operations
................
pView->displaytext(str);
}
void displaytext(CString inr) {
CListCtrl &ctlsde = this->GetListCtrl();
ctlsde.InsertColumn(1, _T("First "), LVCFMT_LEFT, 80);
int nItem;
nItem = ctlsde.InsertItem(0, inr);
}
View 14 Replies
View Related
Mar 26, 2014
I am just at the starting point of this subject. How do i add a video player to my windows form application in vc++?
Can I link youtube videos to that player to be played?
View 2 Replies
View Related
Jun 16, 2013
I have a VC++ 6 dialog-based application. This application is intended for reading data from a USB device (this is a FTDI FT245R chip). I have a start button on the dialog. On clicking it, unsigned char data retrieved from the USB device is displayed on the dialog. The start button invokes a function which includes a while (1) loop inside which the USB device is read and the values displayed.
There are no break or continue statements inside the always operating while (1) loop. All this works fine. My problem is how do I exit the application as normally it would just run forever? I have put an exit button on the dialog with code added to call OnOK(). Normally this would nicely close the application but as I have an endless while loop in my application so this button doesn't seem to work. Nothing happens on clicking it and clicking it repeatedly just hangs the program.
View 8 Replies
View Related