C++ :: Make Colors Transparent Using 3rd Party Library

Jan 19, 2014

I'm trying to make colors transparent in c++ using a 3rd party library. I've successful made my background transparent but I feel I'm cheating by not understanding how I entered the value.

"0xff, 0xff, 0xff" is the color white but i'm not sure how it's the color white like with RGB values.

View 5 Replies


ADVERTISEMENT

C++ :: Linking 3rd Party Library To Existing Project - Unresolved Externals

Jan 14, 2013

I am trying to add in a few 3rd party libraries to an existing project solution. I have no source code or knowledge on how the libraries were built (i.e. what run-time library was used). I have recieved the following errors and warnings:

1>CAPS_LIB.lib(PCEfunc.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>libcmt.lib(getenv.obj) : error LNK2005: _getenv_s already defined in MSVCRT.lib(MSVCR90.dll) ***There are multiple of these errors
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>libcmt.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
1>C:Program Files (x86)BCI 2000 v3progRelWithDebInfo..CAPSVRInterface.exe : fatal error LNK1120: 1 unresolved externals

CAPS_LIB.lib is one of the libraries I am trying to add in and it seems to be the one causing the problem. I believe I have added in all three libraries into the project solution correctly, but I can't seem to find a solution to these errors.

View 2 Replies View Related

C# :: Make A Button Transparent?

Apr 22, 2014

How can I make a button transparent? I know i can select color Transparent, but that takes the background color, and i want to be transparent all because i have a video behind it. What can i do? :o3

I have a video and there is some buttons which should be pressed. I could insert the buttons but they are semi-transparent...

View 11 Replies View Related

Visual C++ :: Creating Program To Make Sine Function Without Any Library Other Than Iostream?

Nov 10, 2012

My assignment is to create a C++ Program to find the sine of a number without any library other than iostream by using Taylor Series:

sin (x) = (x/1!) - (x^3/3!) + (x^5/5!) - (x^7/7!) + (x^9/9!) ...... (x^n/n!).

Here is what i have done till now:

#include <iostream>
double fact (int f); //declaration of factorial function
double power(double x, int y); //declaration of power function
double sin(int x); //declaration of sine function
//double cos(int x); //declaration of cosine function
//double tan(int x); //declaration of tangent function

[code]....

View 3 Replies View Related

C :: Implementing Simple Transparent Proxy With Filtering

Feb 9, 2014

My question is mainly about networks. I wan to implement a simple transparent proxy in C, which will filter the browsed sites according to URL blacklist (check before sending the HTTP request) and keywords in content (check the <meta> in the HTML that was responded).

How can I do this? Listen in a local socket (ex. 8080), set the proxy in my browser and according to the requests that the browser sends to me open a socket with the server, forward the browser's request to the server and forward the server's response to the browser? (Of course by applying filters in the stages where needed.

View 7 Replies View Related

C/C++ :: Draw Sprite On The Window Of Third Party Application

May 8, 2014

How can I draw a sprite/graphic on the window of an third party application? E.g. I want to draw a graphic beneath each tab of Firefox for additional information. The position of the sprite needs to be relativ to the position of firefox, so if you move firefox, the sprite moves with it.

The solution needs to work on mac and pc. So I'll use a crossplatform framework like c++ boost or something.

Of course I can get the position and then just redraw it. But what's the best way to draw it?

Just found a tool which does what I need. Basically a HUD like this: [URL] .... The boxes with the numbers are what I need.

View 2 Replies View Related

C :: Strings To Be Printed In Different Colors

Aug 21, 2013

I am currently using Dev-C++ 4.9.9.2 compiler for creating a C project. I need few strings to be printed in a different color.

Code:
#include<stdio.h>
#include<conio.h>
int main(void)
{ textcolor(RED);
cprintf("Hello world
");
system("pause");
}

While I use " textcolor(RED) " it says: 'RED' undeclared, first use in this function.

If i make it: " textcolor(3) ", it says: [Linker error] undefined reference to textcolor & undefined reference to cprintf.

have been searching for a solution on google since morning. At last I could make out that it is not the correct compiler with suitable library or outdated <conio.h> header file.

I had switched from turbo(or borland, I don't remember) to Dev-C++ compiler due to some kind of library issue. Now I guess I'll have to switch to some other IDE. Which one is that, I don't know yet. There was another thread also about this topic, but didn't provide any solution.

Is there any method to upgrade certain header file (I don't think so)? What would be the best IDE with updated libraries?

View 7 Replies View Related

C++ :: How To Draw Lines With Different Colors

Nov 8, 2014

I want to write a function called DrawLineSegments.This function must change the color of lines at every corner where the corner angle is greater than 60 deg (Assume that there is a function called checkangle). The color sequence must be black, red, green, blue, and repeat this sequence after the fourth color.

View 1 Replies View Related

C# :: Colors - Integer Value For Alpha

Jul 14, 2014

I want to use a new color for BaseColor in iTextSharp.

I can easily set a new color using RGB values from 0 to 255.

However, if I want to adjust the alpha value (and I know alpha ranges from 0 to 1), I can't make the alpha 0.5 because it's not an integer in the definition of BaseColor.

public BaseColor(int red, int green, int blue, int alpha);

So I can set my BaseColor like below:

static BaseColor newColor = new BaseColor(192, 192, 192);

but I can't use a non-int value for alpha. How can I easily convert double alpha values to integer values? What would be the range for alpha in int values and how do I, e.g., set the alpha value to 0.5 in int values?

EDIT: btw, I found online something like this: int alpha = (pixel >> 24). I don't understand why 24 and how can I break that into chunks I understand?

View 5 Replies View Related

C :: Check How Many Colors Terminal Supports

Feb 17, 2013

I'm generating all ncurses color pairs like this

Code:

void generate_all_color_pairs(){ int foreground;
int background;
int i = 0;
for(foreground=0; foreground<8; foreground++){
for(background=0; background<8; background++){
i++;

[code]....

but according on several sources, some terminals suport more colors.Is there any way to determine how many colors the current terminal supports?

View 3 Replies View Related

C++ :: Detect Colors In The Black Rectangle?

Oct 5, 2013

I want to detect colors that in the black rectangle. [URL] How can I do? What library should I use?

View 7 Replies View Related

C# :: Manipulating Images Colors With ColorMatrix?

Feb 6, 2015

I found this elegant looking code on the net that claims to be able to manipulate an images colors using ColorMatrix.

When I run it, it does nothing! I used the code exactly as is with no editing, except to feed it my own image to do its work.

private void ApplySaturation(float saturation) {
float rWeight = 0.3086f;
float gWeight = 0.6094f;
float bWeight = 0.0820f;
float a = (1.0f - saturation) * rWeight + saturation;

[code].....

View 8 Replies View Related

C++ :: Assigning Colors To Individual Characters In Array?

Aug 31, 2014

Basically I am making a console RPG (isn't every beginner nowadays?) and I am having an incredible amount of trouble assigning specific characters their own color. e.g. monsters being red, cash being green, etc.

I took out Left, Right, and Down controls because of character constraint.

#include <iostream>
#include <windows.h>
//%%%%%%%%%%%%%% COLOR CALL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void setcolor(unsigned short color) {
HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hcon,color);

[code]....

View 8 Replies View Related

Visual C++ :: Moving Mouse Cursor To Certain Colors On Monitor

Apr 22, 2013

I am currently starting to attempt to make a program that can move my cursor to certain colors on my monitor. The problem is this seems like it will be 10x harder than I first thought.

View 4 Replies View Related

C++ :: Print To Console Contents Of A File Using Foreground Colors And Other Attributes

Jun 29, 2013

Suppose I have a txt file that I want the contents printed to the console in such a way that every five words are colored blue and the following five are red. How do I accomplish such a task? I am currently only able to print the contents of the file in regular color using ifstream.

View 1 Replies View Related

C# :: Customize Font Styles / Colors / Size In Custom Message Box

Jul 15, 2014

I made my own custom message/dialog box.

I have a template mock up view using xaml. I have a viewmodel that raises the message property. I binded the message property to a textblock inside my xaml.

Since my messages are different for every viewmodel I have.

E.g.in every viewmodel, I have something like

messagewindow.Message = "This is a new message";
dialogService.ShowDialog(Success, messageWindow);

In one of my messages, I want to make the font bold and different color for a specific message segment.

How can I do that without messing up with the other messages that inherit from the xaml or code behind?

Currently, I'm not using any code behind and a lot of the examples online I've seen use code behind and/or don't have dynamic message textboxes.

View 5 Replies View Related

C++ :: Shared Library Vs Static Library?

Jan 17, 2014

I've been reading about libraries; How to make them, how to use them, the different types of libraries, etc..

When using a shared library, does the program require that library to be installed on the computer after the program has been compiled into an .exe?

Ie.. if somebody downloaded a "Helloworld.exe" that I had compiled on my computer using a shared library (that wasn't part of a standard operating system), would they also need that shared library on their computer for the program to run without errors?

and for Static Libraries, when I compile a program using a static library, does it include in the final binary only the functions of the library that are actually used, or does the compiler add in the entire library?

View 8 Replies View Related

C :: How To Install GMP Library

Feb 19, 2013

How do you install the gmp library.How do you use it?

View 11 Replies View Related

C++ :: GMP Library Memory

May 11, 2013

I'm trying out the gmp library by building a simple pi calculation program (original, I know!). On a million digits of Pi I've debugged the program and seem to have about a megabyte too much of memory at the end of the program (I start with around 250k before any allocation begins and end at around 1200).

int main(int argc, char *argv[]) {
//set a//
int digitsofpi =1000000;
mpf_set_default_prec(log2(10) *digitsofpi );

mpf_t a;
mpf_init (a);
mpf_set_ui (a,1);

[code].....

View 2 Replies View Related

C++ :: How To Set Bullet Library To GCC

Jul 11, 2013

I would like to set the bullet library to GCC. I downloaded source code of bullet but i don't know how to set that.

View 6 Replies View Related

C++ :: Using A Library Function?

May 9, 2013

I have been trying to find a way around the following:

I am using a library functor to solve the root of a non linear equation. It passes two doubles and the name of a function that contains the equation to be solved.

Its xtor and operator are

RootFind(double tL,double tR,double (*fn)(double t));

void operator()(double tL,doubleR,double (*fn)(double t));

I want to be able to send another variable to function fn; I don't know what the value of the variable will be ahead of time.

How do I get the library functor to take an extra variable in the function passed?

View 1 Replies View Related

C++ :: How To Use Library Opensteer

Nov 5, 2014

I use the library opensteer, but I do not know where you should start.

Opensteer is a library written in C ++. My problem is figuring out whether to create a blank project in visual studio and import the library or directly import the library.

View 2 Replies View Related

C++ :: UDP Socket Library On Linux

Jan 29, 2014

I'm attempting to write a little UDP socket library in c++ on linux so a user can just create a new instance of a UDPSocket class, specify destination ip and port, and just connect. Then the user should be able to call send() or receive() in any order they want.. and here I encounter a little problem..

Most of the tutorials for udp socket sending out there include a bind() call when you create your "server" that is supposed to receive data, but the code that send data does not need one. Because I also want my library to support unicast/broadcast/multicast, I have read that I need to set the socket option SO_REUSEADDR on my sockets (since multiple sockets will need to be connected to same destination IP/port for broadcast/multicast)

My question is.. do I need to create 2 socket handles per "UDPSocke in order to make this work? One for sending and one for receiving data? In my code when I try to work with only 1 socket, it is only able to receive stuff from itself on unicast.. Or should I just remove the SO_REUSEADDR when in unicast mode, then try to bind with both sockets, accept that the bind will only work on the 1st socket, and take it from there?

View 1 Replies View Related

C :: Graphic Library For Plots (2D And 3D)

Dec 28, 2014

Any common and good library for plots ? (2D and 3D)

View 1 Replies View Related

C :: Creating A Library Function

Jan 27, 2015

I want to create a C library function that i can directly call in my code from any .c file having main program.following are codes...code of library function "foo.c"

Code:

#include "foo.h"
int foo(int x) /* Function definition */ {
return x + 5;
} header file "foo.h"

Code:

#ifndef FOO_H_ /* Include guard */
#define FOO_H_
int foo(int x); /* An example function declaration */
}

[code]....

to use this i have to compile the file in below manner...

Code: gcc -o my_app main.c foo.c

My concern here is that i want to compile the main.c and use function without compiling foo.c with i.e.

Code: gcc -o my_app main.c

any user of this function should only compile his program and should be able to use the function, the foo.c file should remain hidden from him

my system is Linux 2.6.18-308.4.1.el5 #1 SMP Wed Mar 28 01:54:56 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

View 9 Replies View Related

C :: Static Library Linking

Oct 7, 2014

I am trying to refresh my memory here as I did some studies many years ago but the results elude me.Also todays c/c++ compilers may have better optimizations.Say I have a static library that includes three obj modules.Each of these object modules has a number of functions. These functions do not reference any other functions within the obj module.My main app links this library but only references one function from each of the object modules.

Question: Are the complete contents of each module linked into my main app or are todays linkers smart enough to just link the functions used?

View 4 Replies View Related







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