49,761 Topics

Member Avatar for
Member Avatar for nwankpa.daniel.3
Member Avatar for cambalinho

how can i do the control autosize? i think in these way: 1 - get the text rect: RECT textrect; int a=DrawText (test->hDC,inst->strCaption.c_str(),-1,&textrect,DT_CALCRECT); (the a isn't zero) 2 - testing the rectangle with image size: if(textrect.bottom<inst->imgtest.height()) inst->intHeight=inst->imgtest.height(); if(textrect.right<inst->imgtest.width()) inst->intWidth=inst->imgtest.width(); 3 - change the control size: SetWindowPos(inst->hwnd, 0, 0, 0, inst->intWidth, …

Member Avatar for cambalinho
0
200
Member Avatar for msajid.sarwar.7_1
Member Avatar for guru.charan.77377

This is an project title for a c++ project given by my collage, Plz can anyone guide me with some good reference books/journals for data visualization and word image identification using image processing so i can begin my project with some kind of background study. Any help is appreciated

Member Avatar for vieru.dorincristian
0
130
Member Avatar for hamza.muzaffar.96

An ATM allows a customer to withdraw a maximum of $2000 per day. If a customer withdraws more than $700, the service charge is 4% of the amount over $700. If the customer does not have sufficient money in the account, the ATM informs the customer about the insufficient fund …

Member Avatar for ddanbe
-1
188
Member Avatar for mohmedd

Algorithm 1 Distributed Algorithm (at each node Si, i E N) Input: the neighbor set N(Si), the neighboring schedules, the critical location set Pi that Si covers, the importance factor of each location Pi, i E Pi, network lifetime L, battery life Bi, Si is initially unlabeled Output: the state …

Member Avatar for rubberman
-2
176
Member Avatar for TObannion

So here is another assignment I am working on. I can't get to my schools computer lab due to family, job, etc. Here is the assignment: Structs file name: lab2.cpp 1. (3 points) Define a struct, named FullName, that contains the following fields: lastname - a string firstname - a …

Member Avatar for rubberman
0
350
Member Avatar for andrew mendonca

I'm trying to write the function: int sum(int x, int y) For this function, I need to return sum of m and n using only increment, decrement and unary -. m and n can be any integers e.g. if m is 4 and n is -5, the return value would …

Member Avatar for rubberman
0
140
Member Avatar for hurry.barket
Member Avatar for rubberman
0
213
Member Avatar for Affifa

how we calculate this x%=y*3 where x= 10 , y = 5 after calculation x= ? (we know that x%=y equals to x= x%y and the prcedence will be from left to right )

Member Avatar for rubberman
0
30
Member Avatar for cambalinho

i'm owner draw some controls. here what i use for a button: case WM_DRAWITEM: { DRAWITEMSTRUCT *test=(DRAWITEMSTRUCT*) lParam; HIMAGELIST imlIcon=ImageList_Create(inst->imgtest.width(),inst->imgtest.height(),ILC_COLOR,1,1); ImageList_Add(imlIcon,inst->imgtest,NULL); HTHEME hTheme = OpenThemeData(inst->hwnd, L"BUTTON"); //fill the background with button face color FillRect(test->hDC, &test->rcItem,(HBRUSH) GetSysColor(COLOR_BTNFACE)); if ( test->itemState & ODS_SELECTED) // If it is pressed { DrawEdge(test->hDC,&test->rcItem,EDGE_SUNKEN,BF_RECT); // Draw …

Member Avatar for cambalinho
0
1K
Member Avatar for andrew mendonca

I am trying to create a recursive function: double fifthRoot(double x, double maxError) In this function, I have to return y such that y^5 will be within maxError of x. Assume x > 0. Also assume maxError is big enough to prevent problems due to rounding. In order to make …

Member Avatar for sfuo
0
382
Member Avatar for cambalinho

i have 1 class Timer. the class works fine, but when the windows loses the focus, the timer stops... why these happens?

Member Avatar for cambalinho
0
282
Member Avatar for mahmoud.beltagy95

what if I wanted the user to enter his birth month and I don't know whether the user input is integer or string for example july or 7 what should I do ???

Member Avatar for mahmoud.beltagy95
0
106
Member Avatar for TObannion

So here is my assignment: File name: project1.cpp You work for the Jet Propulsion Laboratory. They want you to write a program that will take a two-dimensional array containing the digitized representation of a picture of the night sky and locate the stars on it. The array elements are integers …

Member Avatar for TObannion
0
187
Member Avatar for Hasheeb

#include<conio.h> #include<iostream> #include<stdlib.h> using namespace std; class SStack { private: int *arr=NULL; int top=0; public: SStack(int size) { arr=new int[size]; } SStack() { arr=new int[5]; } void push(int x) { if(top>5) { cout<<"stack is full"; return; } arr[top++]=x; cout<<"successfully inserted:"<<x; } void pop() { if(top<0) { cout<<"stack is empty"; return; …

Member Avatar for dbfud1988
0
2K
Member Avatar for eliamck

As a begginner in C++ i'm having problems to use microsoft visual studio 2010. How do i go about it?

Member Avatar for ddanbe
0
64
Member Avatar for tentrabyte

Guys I need some help... This is my program... #include<iostream> using namespace std; int main() #include<iostream> using namespace std; int main() { int a=1; int b=5; cout<<"*"; cin>>a; while <a=>5>; { cout<<"*"; ++a } return 0; } { And this will be the output of my program. * ** *** …

Member Avatar for dbfud1988
0
647
Member Avatar for bobtherobot

I'm writing a piece of code for a class, and part of it is to take an operation on integers and store it in a double (without any truncation). I'm trying to use the static_cast <double> (EXPRESSION GOES HERE); form, but it isn't working. When I output the new value, …

Member Avatar for NathanOliver
0
265
Member Avatar for afra afzal

#include <iostream> #include <string> using namespace std; { int counter=0; string Username; string Password; string InvalidUser; int opt; system("cls"); cout <<"\n\n"; cout << " ====== MEDICARE HOSPITAL LOGIN ======="; cout<<"\n"<<endl; cout<<"\n"<<endl; cout<<"\n"<<endl; cout<<" *** ****** ******* ************* **** *** "<<endl; cout<<" *** ******** ********* ************* ***** *** "<<endl; cout<<" *** …

Member Avatar for tinstaafl
0
256
Member Avatar for DS9596

Can someone check if I am doing these right please, thanks ? int a=3, b=5, x; x= a/b + b/a +a%b + b%a; cout << x; // x=0+1+0+1= 2 y=float(b/a)+ float(b)/a; cout << y; // y=1.6+1=2.6 z=a*b/2; cout << z; // z= 4 w=pow(b, a)+sqrt(a+b); cout << w; // w=125+2sqrt(2) …

Member Avatar for YarMak
0
247
Member Avatar for cambalinho

i can show an icon on notify area: NOTIFYICONDATA NID; //on main NID.cbSize = NOTIFYICONDATA_V2_SIZE; //if i use the NOTIFYICONDATA_V3_SIZE //the compiler enters on conflits NID.hIcon = test2; NID.uCallbackMessage = WM_USER + 1; NID.hWnd = a; NID.uID = 01; NID.uVersion=4; NID.uTimeout=500; NID.dwInfoFlags = NIIF_INFO; strcpy(NID.szInfoTitle, "Test Title"); //NID.hBalloonIcon=(HICON)test2;//no member strcpy(NID.szTip, …

Member Avatar for cambalinho
0
822
Member Avatar for DS9596

So I have this so far, not sure how to make dollars * e^(rate*time) #include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { //declare identifiers double rate = 1; double time = 2; float dollars; float total=0.0; //initialize identifiers total= pow(exp(1.0), rate*time); cout << fixed << showpoint …

Member Avatar for YarMak
0
207
Member Avatar for Search_not

I want to read text from a file and display it in the win32 Edit(ReadOnly). I am having problems converting from std::string to w_char*/LPWCSTR. The program reads the text from the textfile into a vector<std::string> object. I want to display each item in the vector on a new line inside …

Member Avatar for Search_not
0
902
Member Avatar for myk45

Hi All, I'm trying to use bools to sync between two threads. I cant' use C++11 and I thought mutexes would be slightly heavy for this. So, I do something like this: // ================================== // Thread A .. do some stuff .. // wait for signal. while (!signalFromThreadB) { pthread_yield(); …

Member Avatar for myk45
0
987
Member Avatar for Luffy

hello guys.. i hope you can help me for this codes.. im trying to make a program that will accept username and password in c++. im using turbo c++ ide 3.0 "not dev c++". here is my code.. but the problem is.., i want to use * to appear as …

Member Avatar for deceptikon
0
6K
Member Avatar for Swalih

I'm trying to write 2 dimensional array of int type to a binary type file. int array[3][3]={Some data}; ofstream f; f.open("nameoffile.dat",ios::binary||ios::out); for(i=0;i<=3;i++) { for(j=0;j<=3;j++) { f.write((char *)&array[i][j],sizeof(array)); } } f.close(); Above code is not complete. I only wrote a part of the code where I need help. Is this code …

Member Avatar for Swalih
0
3K
Member Avatar for cambalinho

my image class can read animated gif's. using a timer i can change the menu item image. but when the menu item is showed, how can i refresh it? (i have tryied the DrawMenuBar() and SetMenu() without sucess. the image is, only, updated when i move the mouse from 1 …

Member Avatar for cambalinho
0
213
Member Avatar for glao

Hello , I wanted to ask why this works? int *p = new int[ 1 ]; for ( int i = 0; i < 5; i++ ) { p[i] = i; } for ( int i = 0; i < 5; i++ ) { p[ i ] = 2 * …

Member Avatar for glao
0
107
Member Avatar for 35nando

Hi, I'm looking for a library which provides edge detecion on color image. For example i have an 200x200 color image and i need to a table form it: bool is_edge [200][200]; Where is_edge[x][y] == true when there is edge in pixel [x,y] Sorry form my english, waiting for some …

Member Avatar for Abheek88
0
2K

The End.