Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Browsing all 3021 articles
Browse latest View live

Blitting scaled content of CRichEditCtrl to screen DC.

Hi, I need to render content of CRichEditCtrl on device context of some CWnd. This code works ok: Code:                 CDC *dc = wnd->GetDC();                 CRect cr;...

View Article


reading character symbols on lines of text, position by position

hello all, I noticed that this forum has many viewers and I try to post on forums that have that. This is a duplicated post from StackOverFlow.com simply because over there it seems they require...

View Article


How to change the height and width of a png image dynamically using vc++?

Hi, I m trying to load a png image by giving the dimension of my own. CImage Image; Image.Load (L"D:\\Images\\PNG_Images\\Image7.png"); But here what happens is that I m not able to give my own...

View Article

C++ Programming Help!

Please build this program for me so I can dissect it and study each line! Write a C++ program to calculate the fewest number of each denomination needed to pay a bill of amount TOTAL. For example, if...

View Article

Using COM without registering.

In a C++ project, I need to call a C# created COM object (as a .dll) Is there a way to use such a COM object without having it be registered in the registry? The C# COM dll is just a "go between" our...

View Article


Transferring a C++ application from VS 2010 to another environment...

all, I have a request from someone else to see a C++ example of work, which is what this thread is about: http://forums.codeguru.com/showthrea...on-by-position what I'm not understanding here is *what*...

View Article

How can I compare two histograms in OpenCV c++?

I am tying to compare two histograms, but it gives error. Here I have given my code, histogram file and error message. Histogram file 3*5 matrix(output_test.txt): 1 2 3 4 5 5 2 1 4 2 2 1 2 4 2 code:...

View Article

Iterator Debugging

One of my apps links to a DLL which uses the standard containers (std::vector etc). I recently noticed that my compiler (VS2005) has an option to build with iterator debugging. From what I can gather,...

View Article


Noob questions on C++ relating to DAW's and musicand programming in general

Hi This is my first post and if this is in the wrong area please feel free to point me where a beginner should ask questions. That being said I am a total noob to coding and am interested in the best...

View Article


nested loops to streamlined code

all, in C++ right now, I have code similar to this (symantics may not be right, just ignore it. Example came from PHP): Code:         If (ctr = 4) {           for (block = 1; block <= 27; block +=...

View Article

I am trying to change the text hue in this gump.

I am trying to change the text hue in this gump, i have made most the changes but cant figure out these two errors? errors virtuestatusgump.cs:cs1002: line 75, column 32) ; expected...

View Article

VS 2010 Project Property Sheet !

Hi, In VS 2010, I know that there is an option to add project property sheet, under "Property Manager" Menu. But can someone explain why do we need to add a New Project Property Sheet? Under the...

View Article

help with algorithm for pascal

can someone please give me an algorithm on finding the sum and average of 'n' numbers in pascal language pleasee!

View Article


How can insert value in structure vector?

Here I have given my sample code, but it gave error. How can insert value in structure vector? Code: struct Hough_Transform_3D_Accumulator {         long int i;         long int j;         long int k;...

View Article

Tired of googling. How to set a global hook to catch WM_MENUSELECT.

Hi, I have a global hook system that uses a dll. I can install hooks for everything under the sun and my hookproc will see what I expect. I cannot for the life of me however install a hook and get...

View Article


Help me port line of code with "operator"

Hi! I need to rewrite this from C++ to C# Code:     FORCEINLINE bool operator == (const edge2f &other) const     {                 return (_vids[0] == other._vids[0] && _vids[1] ==...

View Article

Why "char" is inside "int" loop?

Can someone explain this to me: Code: ......   static char str[BIG_STRING];   static char str_copy[BIG_STRING];   char **words;   int max_words = 10;   int num_words = 0;   char *ptr,*ptr2;   char...

View Article


How can I create histogram from a set of values in OpenCV?

I have a text file which consist of several values. These values represent distance from origin to any point in the triangle. How can I create histogram from these values? Is there any functions in...

View Article

Friend class and pointer function

Hi! I need help with understanding this block of code, particullary this line: *getLeftChild() { return this - _child; } Code: public class UpperNode { BOX _box; int _child; FORCEINLINE UpperNode...

View Article

enter the file name by keyboard instead of command line arguments?

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...

View Article
Browsing all 3021 articles
Browse latest View live