I developed an application by using Visual Studio 2005 (Visual C++/MFC based project). The developed exe works fine over the machine that already have installation of Visual Studio 2005. But it does not run over other machine. I even installed the .net2 frameowrk and service pack of .net2 framework as well but did not succdeed in running the application. I remember that in old days, there was an option of static compilation in Visual C++ (6 version) without .net framework. So how we can do the same in Visual Studio 2005 that is dependant over .net framework. In static compilation, the compiler/linker put all the dependant stuff in exe file. Please guide me how I can run the application over machines that does not have installation of Visual Studio 2005. THANKS.
Madhu_Rani
Posts
-
Static Compilation in .net project/ Dependancy of EXE file over Visual Studio Installation -
SendInput API is a mess indeedI find the error. Actually I am not assigning the proper values to flag. Documentation says that when key is pressed, do not assign any thing to flags. KEYEVENTF_KEYUP If specified, the key is being released. If not specified, the key is being pressed
-
SendInput API is a mess indeedI studied the msdn and the forum in detail but I could not figure out what is the problem with this code? The key press event is not working?? SendInput API is a mess indeed. INPUT input; KEYBDINPUT kinput; kinput.dwFlags=KEYEVENTF_KEYUP|KEYEVENTF_EXTENDEDKEY; kinput.wVk=91; // key to activate start up window kinput.time=0; input.type = INPUT_KEYBOARD; input.ki = kinput; ::SendInput( 1, &input, sizeof(input));
-
Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel)use the setscrollsizes() function just before u try to load the image on the screen. YES u are right . I called setscrollsizes() in OnInitialUpdate() whereas I load the bitmap against a menu click but still it is not working. :((
-
Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel)YES. I already set them to 1600. void CTRYView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; // TODO: calculate the total size of this view sizeTotal.cx = sizeTotal.cy = 1600; SetScrollSizes(MM_TEXT, sizeTotal); } BUT no benefit?
-
Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel)Hi, I have an SDI based application. The view class has a base class CScrollView to accomodate large data. Horizontal and Verticals scrolls can be used for navigation. Now I want to upload a bitmap having larger dimension but I am unable to do it. The client view accomodate only normal size of bitmap say (700*1100)... so what shold I do... Also One have to write code in OnDraw() as when he navigates, so that bitmap upload again and the stuff is full of flickers. even then I could not view the EXTREME BOTTOM and EXTREME RIGHT of the image. Please guide?
-
GetDesktopWindow() and Window HooksLRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) { int x=12; if (nCode==HCBT_MINMAX) { AfxMessageBox(_T("Called")); } return 0; } CSDITESTView::CSDITESTView() { SetWindowsHookEx(WH_CBT,&CBTProc,NULL,0); } After reading the mentioned article, I wrote these lines, but it is not working? I am expecting that when I minimize the window , the associated call back function should be called.
-
GetDesktopWindow() and Window HooksLRESULT CALLBACK CBTProc(int nCode, WPARAM wParam, LPARAM lParam) { int x=12; if (nCode==HCBT_MINMAX) { AfxMessageBox(_T("Called")); } return 0; } CSDITESTView::CSDITESTView() { SetWindowsHookEx(WH_CBT,&CBTProc,NULL,0); } After reading the mentioned article, I wrote these lines, but it is not working? I am expecting that when I minimize the window , the associated call back function should be called.
-
SendInput() and MOUSEINPUT ProblemsThanks. Though it is not a recomended method but I called the SendInput function twice and now it works:) ::SendInput( 2, leftClick, sizeof(leftClick[0])); ::SendInput( 2, leftClick, sizeof(leftClick[0]));
-
GetDesktopWindow() and Window HooksI am capturing the screen by using GetDesktopWindow(). Now I want that when ever desktop (captured screen)changes/updates, I get the information, so that I would capture it again. I have heard the word " window hooks" but do not know how to apply it. please guide? The application is MFC based.
-
SendInput() and MOUSEINPUT ProblemsAnother Problem: The logic of SetCurPos()works for the right clicks and OS take the appropriate action against the right click, but it did not work for left click. When I changed both flags to MOUSEEVENTF_ LEFTDOWN in the code. The cursor goes at the bottom-left corner but application can not trigger the start button (Window Start) event, as cursor was at that point. Actually if the cursor is at the button, then we require to have a left click at button? so how we manage a click at a button by using sendinput() method. SetCursorPos(10,790); INPUT rightClick[2]; MOUSEINPUT rightDown; rightDown.dwFlags = MOUSEEVENTF_RIGHTDOWN + MOUSEEVENTF_ABSOLUTE; rightDown.dx = 0; rightDown.dy = 0; rightDown.time = 0; rightDown.mouseData = 0; MOUSEINPUT rightUp; rightUp.dwFlags = MOUSEEVENTF_RIGHTUP + MOUSEEVENTF_ABSOLUTE; rightUp.dx = 0; rightUp.dy = 0; rightUp.time = 0; rightUp.mouseData = 0; rightClick[0].type = INPUT_MOUSE; rightClick[0].mi = rightDown; rightClick[1].type = INPUT_MOUSE; rightClick[1].mi = rightUp; // finally, send the spoofed right-click to invoke the menu ::SendInput( 2, rightClick, sizeof(rightClick[0]));
-
SendInput() and MOUSEINPUT ProblemsVOW you are GENIOUS. THANKS. Now I also find the solution of problem2 that I pasted below. Actually in none of the article that are related with the SendInput , anyone talked about SetCursorPos. I guess it is good to call SetCursorPos first and then use the SendInput() function. 1- First Call SetCurPos() 2- then Call the SendInput() to perform the mouse events like button down up etc. INPUT rightClick[2]; MOUSEINPUT rightDown; rightDown.dwFlags = MOUSEEVENTF_RIGHTDOWN + MOUSEEVENTF_ABSOLUTE; rightDown.dx = 0; rightDown.dy = 0; rightDown.time = 0; rightDown.mouseData = 0; MOUSEINPUT rightUp; rightUp.dwFlags = MOUSEEVENTF_RIGHTUP + MOUSEEVENTF_ABSOLUTE; rightUp.dx = 0; rightUp.dy = 0; rightUp.time = 0; rightUp.mouseData = 0; rightClick[0].type = INPUT_MOUSE; rightClick[0].mi = rightDown; rightClick[1].type = INPUT_MOUSE; rightClick[1].mi = rightUp; // finally, send the spoofed right-click to invoke the menu ::SendInput( 2, rightClick, sizeof(rightClick[0]));
-
SendInput() and MOUSEINPUT ProblemsINPUT myInput; myInput.type = INPUT_MOUSE; MOUSEINPUT mouseInput; mouseInput.dwFlags = MOUSEEVENTF_MOVE|MOUSEEVENTF_ABSOLUTE; mouseInput.dx = 0; mouseInput.dy = 690; mouseInput.mouseData = 0; mouseInput.time = 0; mouseInput.dwExtraInfo = NULL; myInput.mi = mouseInput; SendInput(1, &myInput, sizeof(INPUT)); PROBLEM 1: The mouse is moved at the upper-left corner while through this code, I am requesting :laugh: him to move to BOTTOM-LEFT corner? Why this is not happening. PROBLEM 2: I want to send event MOUSEEVENTF_RIGHTDOWN ( right button pressed at BOTTOM-LEFT), and request the system that please feel like as I click you at start button :( , but it is not accepting my command, I changed the flag to mouseInput.dwFlags=MOUSEEVENTF_RIGHTDOWN|MOUSEEVENTF_ABSOLUTE; So What is wrong ?
-
View with Larger DimensionI have an SDI based application, and is uploading a bitmap having dimension 1280*1280... The size of client area is less and the bitmap size is large... It only uploads the portion of bitmap that fits into the client area. So how I may increase the client area, so that scroll bar horizontal/vertical appears and bitmap loaded properly. I changed the structure CREATESTRUCT in PreCreateWindow(CREATESTRUCT& cs) but it did not work. any idea? THANKS
-
memcpy and buffer concatenationYES. U are right ... BYTE* bmpBuffer=NULL; bmpBuffer=(BYTE*)GlobalAlloc(GMEM_ZEROINIT,size); memcpy( bmpBuffer,lpData, dwCount); How I may increase the size of bmpBuffer at run time? Should I create a BIG buffer (upto 3 Mb to accomodate the incomimg image) or I can manage to increase the size of buffer on request as well...
-
memcpy and buffer concatenationThanks both of you
-
memcpy and buffer concatenationHi, I am reading data from a socket (i.e Array of BYTES, lpData)... I stored the incoming data in a buffer by using memcpy( bmpBuffer,lpData, dwCount); Now I received some more data... ( data is coming continuously)... Now I want to augment the bmpBuffer with the incoming data (till the time I receive the last packet,) What function I can call to augment the coming data in existing buffer. To explain more, as we can add two strings str="Hello" + "Hi", How we can add data of two buffers
-
Heavy Duty Client/Server ApplicationTCP... but do you think it is protocol dependant?
-
Heavy Duty Client/Server ApplicationWell, I developed a very basic client/server application by extracting knowledge from the article. http://69.10.233.10/KB/IP/serversocket.aspx[^] The application works fine when client/server exchanges text data (Hello, Hi etc of few bytes). But when server sends the image data (say a bmp of 3 MB). The send function sends data properly but on receiving side, the received bits are just 256. where the rest bits gone? How can we transfer image data (upto MB) through the client/server application? any idea
-
Conversion of CBitmap into Array of BYTE and Vice VersaI tried with the way discussed in the article as well. Using GetBitmapBits and SetBitmapBits[^] but it does not work. There is no error but the output is not correct. see the code below CDeskTop desktop; BITMAP bmpX,bmpY; CBitmap mybmp,bmpClone; DWORD dwValue,dwValue2; mybmp.Attach(desktop.GetDeskTopImage()); mybmp.GetBitmap(&bmpX ); bmpClone.LoadBitmap(IDB_BITMAP1); // IDB_BITMAP1 bears the same co-ordinate as the source int x=bmpX.bmHeight*bmpX.bmWidth; BYTE* bmpBuffer=NULL; bmpBuffer=(BYTE*)GlobalAlloc(GMEM_ZEROINIT,bmpX.bmWidth*bmpX.bmHeight); dwValue=mybmp.GetBitmapBits(bmpX.bmWidth*bmpX.bmHeight,bmpBuffer); dwValue2 = bmpClone.SetBitmapBits(bmpX.bmWidth*bmpX.bmHeight,bmpBuffer); bmpClone.GetBitmap(&bmpY); CDC memDC; CClientDC dc(this); memDC.CreateCompatibleDC(&dc); memDC.SelectObject(&bmpClone ); dc.BitBlt(0, 0, bmpY.bmWidth, bmpY.bmHeight, &memDC, 0, 0,SRCCOPY); DeleteDC(dc.m_hDC); GlobalFree((HGLOBAL)bmpBuffer);