Visual C++ :: Grab Screen(s) And Invert Their Brightness

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


ADVERTISEMENT

Visual C++ :: Grab Special Lines From A File

Nov 28, 2012

I have a file that contain different content, some lines inside that file looks like that :

Time : xx:xx:xx
Time : xx:xx:xx

So, I want to grab lines that start with "Time : " and put them inside a list<string> for later use. I am using windows so I don't know if the newline character is '
' or '
' also I don't want my grabed line contain any special character.

I have this code, but didn't work well because some special characters remain inside the string.

Code:

string buf;
list<string> ls;
ifstream read("test.txt", ios_base::binary);
while(!read.eof())
{
getline(read,buf,'

[Code]...

View 1 Replies View Related

C# :: Average Brightness Of Area In Bitmap?

Aug 6, 2014

I need to calculate the average brightness of a defined area in a bitmap. Is there a way to select the area which a watermark is going to be applied to, and then find it's average brightness?

I have the below code, but at the moment Color pixel is displaying 0, 0, 0 for RGB, I believe i'm doing it wrong, I have tried to use this as a reference but use part of the image instead of the entire image.

See Company Watermark region!

public void addWatermark() {
Image source = Image.FromFile("C:UsersMartyn BallDesktopImages38.JPG");
Image watermark1 = Image.FromFile(Glb_venueWatermark);
Image watermark2 = Image.FromFile(Glb_companyWatermark);
//Get width and height of image
int sourceWidth = source.Width; int sourceHeight = source.Height;

[code]....

View 11 Replies View Related

C# :: Invert ListBox Selection?

Apr 18, 2014

I have my ListBox working and I'm able to select the items I want to keep. I'm trying to now get the Invert of the current selection for the items to delete.

I tried using:

if (lstLinePatterns == null) return;
for (int i = 0; i < lstLinePatterns.Items.Count; i++)
lstLinePatterns.Items[i].Selected = !lstLinePatterns.Items[i].Selected;

But
.Selected
is giving me an object error.

Is there an easy way to just inverse current selection?

Current Code:

private void btnSelectNonRvt_Click(object sender, EventArgs e)
{
// Unselects any Items to Prevent Infinite Loop
lstLinePatterns.SelectedIndex = -1;

[Code]....

View 3 Replies View Related

C :: Function Capable To Invert Matrix Of Integers

Jun 4, 2014

I am looking for function capable of converting square matrix of integers.Where to find such function? I know the algorythm but have no time to implemnt it.

View 12 Replies View Related

C# :: Detecting CD-ROM Drive And Grab Filepath Of Only CSV File

Jul 8, 2014

I would like the user to insert a CD into their computer and click on an button on my application that allows them to read the CD-ROM and find a specific file type, e.g. csv, and then grab the info in the csv file.

I already have my StreamReader setup grabbing a filepath.

Now I am just wondering...how do I detect the CD-ROM and how do I grab the filepath of the only CSV file on the CD-ROM?

What's behind detecting a CD-ROM and grabbing a specific file type from a CD-ROM?

I heard about DriveInfo

However, that only allows me to detect a drive but not look at it's contents.

View 14 Replies View Related

C++ :: Getting A File From Designated Location / Grab Value And Make Calculations

Oct 30, 2013

My project is to get a file from a designated location in my computer and not just read, but grab the values from the user and make a count, sum, and average calculation of the numbers in my code. I am using the fstream library and I am trying I did do it, I got the values and calcualated them, however I want the values to be accessed from maybe my desktop or my drive, I want to know how to manipulate my code to get a path like C:UserDesktop and maybe executed from the path input or given. I dont know if this is possible, or easy to do. ALso I did copy some of this code from my teachers examples and I dont know exatly why the variables have to be initilized at zero, and I would like to know a little more on the Bitwise right shift breaker used in line 20 something.

Here is my code below.

#include <iostream>//For avergae functionality
#include <fstream>//For the file commands, such as ifstream and the Bitwise right breakers(<< and >>).
#include <iomanip> // To control the amount of decimals in my results desired.
using namespace std;
int main () {
int aNumber=0; //Initilized at zero because of Stack Overflow:

[Code] .....

View 2 Replies View Related

Visual C++ :: How To Implement Crosshairs (whole Screen) In MDI-App

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

C++ :: Clear Screen For Microsoft Visual 2010?

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

Visual C++ :: How To Print Mathematical Series On Screen

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

Visual C++ :: How To Determine If A Metro App Is Currently Displayed On The Screen

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

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 View Related

Visual C++ :: Draw Multiple Lines And Move Them On Screen

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

Visual C++ :: Floating CDialogbar On Multiple Screen Environment

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

Visual C++ :: Edit / Update And Display Group Of 40 Parameters On Screen

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

Visual C++ :: How To Detect If Window Media Player Is Running In Full Screen Mode

Jan 21, 2013

How can I check if window media player is running in full screen mode & topmost in c++ MFC?

What I used is this logic:

I compared media player full screen coordinates to that of monitor coordinates.If they are same implies media player is in fullscreen.But it has one flaw.Whenever there are control(for play,pause) displayed in full screen in media player, coordinates are not coming same as that of monitor.

View 10 Replies View Related

Visual C++ :: Internet Explorer Displays Blank Page When Opening Local File While Screen Is Off?

Apr 28, 2015

I'm making a small MFC module that should generate a report (formatted using HTML) and then display it for a user on schedule at 8:30 AM every day. Pretty straightforward stuff.

I compose my report and then save it as a local HTML file in the CSIDL_APPDATA folder. I then use the following calls to display it using the default web browser (Internet Explorer in this case):

Code:
//Error checks are omitted for brevity
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
ShellExecute(NULL, NULL, strSaveFileTo, NULL, NULL, SW_SHOWNORMAL);

This module is run on schedule from the Task Scheduler. (The task is set up to run when a user is logged on, which is all the time for that PC. It is never turned off, put to sleep, etc. That computer has only one user that is never logged off either.)

This works perfectly fine when I test it by setting the task a minute or so in the future. But when the actual task is supposed to run at 8:30 AM, when the user wakes the screen all they see is a blank Internet Explorer page. (Note that if someone refreshes that page by hitting F5, only then my report is shown on the screen.)

So I started looking into it:

1) I checked that the file is properly saved (before calling ShellExecute) by reading it back and by comparing it with the original HTML markup that I saved earlier. It's all correct there.

2) I then checked the power saving options. That computer is set up to show screensaver after 5 minutes and to turn off screen after 25 minutes.

3) The web browser that causes this issue is IE version 11, with the latest updates installed. The operating system is Windows 7 Professional.

And why is IE showing a blank page only when computer is running unattended?

View 14 Replies View Related

Visual C++ :: Text Size In Screen Is Different From Size In Print Preview?

Feb 1, 2013

I must take an old MFC project in VC++ 6.0 and make changes.

The problem is text size in screen is different from size in print preview.

for example with this font

Code:
CFont f50;
f50.CreateFont(100,0,0,0,FW_BOLD,0,0,0,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE,"Frutiger LT Std 45 Light");

And this text

Code:
s=_T("Let's try to calculate the size of this text");

and with MM_LOMETRIC map mode

GetTextExtent() returns me:

On screen: (1595,99)
Ink printer + print preview: (1589,100)
PDFCreator + print preview: (1580,100)

comparing with screen size the height is bigger but lenght is smaller. I don't understand.

I can understand that different printers process the fonts in different way and then to have different lenghts. That's not the problem. The problem is I need to simulate in screen the same behaviour i will have on printer because these texts are being aligned in the document, and I don't want to see that the text si aligned different in text than in paper.

What can I do to render the text on screen with the same size I will have on the printer? Print preview is doing it. Should I change the font parameters? is something related with pixels per inch?

View 4 Replies View Related

C++ :: Output Displaying Out Of The Screen

Feb 11, 2014

I have turbo c++ on windows xp SP2.....whenever i compile my code in turbo c++ i am getting output outside the screen.....but when i used code::block....i get the correct output...fits to screen ...

View 7 Replies View Related

C :: How To Get Sum Of Areas And Print On Screen

Mar 19, 2014

So i am struggling for days to get this done and all i need is to get the sum of the areas and get them printed on the screen my code is this:

Code:

#include<stdio.h>
#include <stdlib.h>
#include<conio.h> //Not needed in Dev C++//
#define PI 3.1415
float Area_of_Rectangular(float length,float width);
float Area_of_Circle(float radius);
int main()

[Code]...

View 7 Replies View Related

C# :: Can't Output Ounces On Screen

Jun 25, 2014

why I can't output ounces on the screen in c#...here's the code:

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Chapter7Problem12
{
class Program
}

[code]....

View 6 Replies View Related

C :: Write To Screen Lowest N

Oct 31, 2013

My problem is :

Code: numbers[10]={25,27,17,19,47,3,98,5,124,10};

You write a program at do below processes for above array.

You want a number 1 between 10 at user.

if user enter N value,program write to screen lowest N. number at array. For example user enter 2,program write to screen lowest secondary number of 5 value at array or user enter 10 value,program write to screen maximum number of 124 value at array.

But write the program with don't use sorting algorithm.

View 6 Replies View Related

C++ :: Clear Screen Without Blinking

Nov 4, 2013

I have a one simple question :D. I want to output to the console some symbols. Let's say that i have a loop.

for(int i = 0; i < 10; i++) cou << "* ";

Then I want to output other symbols but I want to overwrite the previous symbols. I know I can use system("cls"); but it blinks if I try to output the same characters. For example if I have:

for(int i = 0; i < 10; i++) cou << "* ";
system("cls");
for(int i = 0; i < 10; i++) cou << "* ";

After I run this code the first loop outputs ten "*". Then there is a blink and there are again ten "*" shown. How can I avoid this blink?

View 4 Replies View Related

C++ :: Restrict Screen Scrolling

Oct 14, 2013

I have screen scrolling up and running but it keeps going after the background finishes. how do you fix that?

View 4 Replies View Related

C++ :: Odd And Even Integers - How To Output On Screen

Apr 18, 2013

#include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
using namespace std;
int main()

[code]....

I do not know how to output on the screen, I believe that i have written it to the file correctly but i dont know how to output it.

View 1 Replies View Related

C++ :: Getting Screen Capture Of Whole Program?

Oct 8, 2014

For my class we have to take a screenshot of the program and put it in a word document. How can I accomplish this?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved