Code Error

536 byte By a.gilani at 2007-11-20 11:40:34
Hi,I just started learning C++ and wrote the following code. It basically asks the user to input to input two integer values, then asks him to choose +,-,*,/ and which outputs the result. the problem is that the program terminates when i choose to divide. The odd part is that the program builds perf...

Downloading Files

202 byte By corranrogue9 at 2007-11-20 11:40:36
Hey<br/>I am trying to find a way to download files and set their contents as a string. If this is not possible, then saving it to a temporary directory will be fine. Anyone know how I can do this?

Very basic questions: buttons and events

800 byte By lypun at 2007-11-20 11:40:37
Let me preface by saying I do not have a lot of experience in programming in visual C++. And yes, I've done a forums search; I've also searched the internet for tutorials and such. But I think my question is so profoundly stupid that there's nothing written on this - as far as I can...

How to subclass an edit control to catch the tab key

318 byte By dillydadally at 2007-11-20 11:40:39
Hi, I have a bunch of edit controls on a dialog box that I would like users to be able to tab between. I understand the best way to do this is to subclass the edit control to somehow catch the tab key and handle it. Does anyone know how to do this? I've never had to subclass a control before...

Interest Earned

741 byte By douche at 2007-11-20 11:40:42
Hi, I've looked hi and low and cannot find the line of code that calculates interest earned. For example, a user enters the values in year 1 and the rest is calculated based on those first entries:Year Balance Interest Earned Additional Deposit Result1 1000 65.00...

how to write compare function of <set>?

2167 byte By fantasy2004 at 2007-11-20 11:40:44
Hi,allI want to write compare function of set, but failed.the following is the codes, I can compare a,b or c,d separately.but when I want to combine them in a set, it failed.#include <set>#include <iostream>using namespace std;const int LINE_SEG = 1;const int CIRCLE_SEG = 2;class Segme...

function pointer

225 byte By Jacko123 at 2007-11-20 11:40:47
Hello All,<br/> What is the difference between the two?<br/> int (&pFunc)(int, int); -- 1<br/> and<br/> int(*pFunc)(int, int);-- 2 <br/>Why would someone write code as in 1 above?<br/>Thanks in advance.

Simplest way to find power of number...

582 byte By ryu at 2007-11-20 11:40:49
Hi GURUs,I want to be able to find out whether a specific number is 2^x or not.For example:64 --> yes, it is a 2^632 --> yes, it is a 2^524 --> no, because it is not part of 2 power of x.8 --> yes, because it is 2^36 --> no, because it is not a 2 power of x.My question is, given a spe...

Creating directory

276 byte By faisals at 2007-11-20 11:40:50
i want to create a folder(i know in c we call it directory) by retreiving date and current time.i.e first time and then date for example hr:min:date.I have retreived system date and time.I have used CString for holding all these info.How can i cxreate a folder by C++ commands

My first time converting C struct to C++/CLI class -- Is this proper?

7371 byte By mmessuri at 2007-11-20 11:40:51
Please forgive me if this is a bit on the trivial side; however, I am a systems engineer who spends 99.99% of my time at the firmware and systems level.To make a long story short, I have been tasked to convert some of our firmware/systems level accessing applications into C++/CLI version. The probl...

Various projects in one workspace

411 byte By VCProgrammer at 2007-11-20 11:40:54
Hi all,I want to make 5 exe's from 1 project only...how to do it? suppose i want to make a set up program in which i want that a main exe that will take various exe's as input and path , a extractor, my uninstall exe and then a setup exe which will place all the given exe's at a menti...

Matrix Class

431 byte By imtwo at 2007-11-20 11:40:56
Hi aLL; i want a matrix class class matrix {private: int row1; int col1; int row2; int col2; public: matrix(); matrix(int,int,int,int); void input(...); void add(); void multiply(); void transpose(); virtual ~matrix();};the code file is basically my need can any one help m...

interprocess window

164 byte By gossip at 2007-11-20 11:40:57
Hi,<br/>Is there a way to make a window of another process (i.e. an exe) to be a child window of a dialog ?<br/>Anybody has idea ? Thanks,<br/>Gossip

Application failed to start becoz .dll not found

826 byte By ashishbhatt12 at 2007-11-20 11:40:58
Hi All, I have read many forum answers on this error but I could not found solution. I am using MFC Application in VS 2005. I my application I have created one .dll file named VNCHooks.dll which is running before the my MFC solution .exe file. Now when I run it uising F5 I got tjhe error like below....

How to set mouse position in linux,mac

506 byte By MFCQuery at 2007-11-20 11:40:59
Hi,To set the mouse position in windowsPOINT pt;pt.x=pt.y=100;ClientToScreen(GetActiveWindow(),&pt);SetCursorPos(pt.x,pt.y);here we need to change client coordinates to screen coordinatesTo get the mouse position in windowsGetCursorPos(&pt);ScreenToClient(GetActiveWindow(),&pt);// to get the coordin...

Tree Control

223 byte By banavatu_vas at 2007-11-20 11:41:01
Hi<br/>can any one tell how can i do ,when we click the different child node in tree control, i want to display different bitmap image on the dialog box when i click to each child node as my option <br/>regards<br/>vasanth

Problem Using cin.getline in prototype vector..

3363 byte By rydzx at 2007-11-20 11:41:02
Hi there...i`m new in programming language...today i learning algorithma for writing source code...these program below will get student information from user...##################################################include <iostream.h>#include <string.h>#include <iomanip.h>#include <...

Driver Installation

689 byte By kulkarniquiet@gmail.com at 2007-11-20 11:41:03
Hi,I am working on the module in which I need to install driver (Ethernet card, SCSI disk, PCI Interface etc.) without using the add hardware wizard.As of now I am not aware of how to implement such thing. Do you have any idea how to achieve this without using wizard? Is it possible?I read in articl...

Memory exception

569 byte By anandtugaon at 2007-11-20 11:41:04
Hi,-----------Test.cpp------------main(){char *p = "Hello";char *s; while((*s++ = *p++) != '\0') ; cout << s;}-----------------------------Why this progam is giving memory exception?syntax wise as per my knowledge it is correct(I did in "C" language)?Please suggest what is the pro...

Dialog application

168 byte By amit_srms21 at 2007-11-20 11:41:06
hello,<br/>I am writting a dialog based application ,and i want that when i click on it's exe it will run in hide mode, plz tell me how can i achive it.<br/>Thanks

Getting into DIrectx, what compiler?

396 byte By spleblem at 2007-11-20 11:41:07
so i have been learning some c++ using dev c++now im getting into to directx, and i have read on the net that dev c++ isn't good for directx and i have found that it wont compile lots of codesit all ways has annoying errorslike no new line .ectso i was wonder what a good complier would be or ho...

IAccessible problem

572 byte By Fester at 2007-11-20 11:41:08
Hi all!I'm implementing IAccessible interface for a custom list control. I've seen, that there is a different behavior for different role IDs.For example the client (narrator) calls the followed chain get_accRole -> get_accName -> get_accValue -> accLocation -> get_accChildCoun...

Hide The Application

177 byte By amit_srms21 at 2007-11-20 11:41:10
Hello,<br/>I want to write the code through which i can run another dialog based application and i want to hide the dialog by my code...pl z tell me how to do this<br/>Thanks

getting active view of a mdi application

462 byte By resumurof at 2007-11-20 11:41:11
HI, i want to get an active view of a mdi application..CMainFrame *pFrame = (CMainFrame*)AfxGetApp()->m_pMainWnd;//CChildFrame *pChild = (CChildFrame*)pFrame->MDIGetActive();CChildFrame *pChild = (CChildFrame *) pFrame->GetActiveFrame();CmyView *pView = (Cm...

Cases & Accolades

680 byte By zvenny at 2007-11-20 11:41:12
For readability reasons, I tend to keep my code after a case between accolades. For code after multiple cases, I generally put the opening accolade after the last case ... int test=3;switch (test){case 1:{ AfxMessageBox("1"); break;}case 2:case 3:{ AfxMessageBox("2 or 3"); break;}}I now noticed th...

how to monitor exe and dll interactions?

811 byte By George2 at 2007-11-20 11:41:13
Hello everyone,Are there any tool or other methods which could be used to monitor which class/method exe is accessing a DLL?Now I met with an issue that when I provide the DLL I developed to a 3rd parth application, it will crash sometimes and I suspect the 3rd party application is invoking some cla...

Suggestions Needed...

395 byte By usman999_1 at 2007-11-20 11:41:16
Hi All,I want to implement a GUI, where I have to split the Window in four different parts using a splitter. I am not sure, if I create four different views or just use a single window, and size the controls within every split ed region myself? Also, I am not sure if I user SDI or MDI?As always, you...

small device copying program

364 byte By tootypegs at 2007-11-20 11:41:17
Hi, i plan to create a small program that can read a USB device and then create an exact image of this device (.dd image?? ive herd things about this). Anyway i think im in the correct section of the forum. Can anyone give me any advice on how create a copy of the device, point me in the direction o...

Address Searcher

301 byte By yoni1993 at 2007-11-20 11:41:18
Sorry if its not to the right section !I want to know how i can build a tool which can search a value from address.Starting 0x40000 to 0xfffffff.but how i can do thats ?with a loop ? 0x40000++ ?I know the readmemoryfunc.Thank you very much !...

How can we prepare PrepCache using Virtual list control

850 byte By Faheem_Arshad at 2007-11-20 11:41:20
Hi.I am using virtual list contro and my requirements is to load the items in chache on demand.OnChildNotify............NMLVCACHEHINT* pcachehint=NULL;if (message == WM_NOTIFY) { NMHDR* phdr = (NMHDR*)lParam; switch(phdr->code) { case LVN_ODCACHEHINT: pca...

Setting default values in FontDialog

141 byte By kranti at 2007-11-20 11:41:21
Hi,<br/> I need to set some specified face name,style,etc.. as default values on FontDialog before seleting other settings.how can i do it?

ClientRect of SDI

448 byte By usman999_1 at 2007-11-20 11:41:24
Hi all,I am working on a SDI application, there I am using a splitter to split the frame into two panes. Now, I want to adjust the pane size, for that I use GetClientRect within the Frame, the only problem is that that Rect returned also includes the size for the Toolbar above. Is there a way, that...

Need help with radio button ,for default selction

1145 byte By poshyradha at 2007-11-20 11:41:26
http://www.dev-archive.com/forum/showthread.php?t=437300I Have two radio button and i have enabled 'Group' Property for one of the radio button.When i launch the application the both the radio buttons remains unselected, I want one of the radio button to be selecetd by default when the app...

Splitter Window inside a View

584 byte By abhinav_805 at 2007-11-20 11:41:28
Hello All,I want to create a Splitter Window which can be placed at a specific location inside a View(e.g. derived from CScrollView) using the CRect valueThis Splitter Window will contain two panes :-Top Pane : Grid ControlBottom Pane : View derived from CScollView containing simple MFC controls lik...

how to create a win32 dll

782 byte By sina_izad at 2007-11-20 11:41:29
hii want to create an importable dll using visual c++. i want to be able to import this dll in C#. my problem is that in visual studio project wizard the only two project types that i see associated with win32 are 1- win32 console application and 2- win32 project and when i choose either and select...

functions

3371 byte By shooter23000 at 2007-11-20 11:41:33
hey, we just started learning about functions, and i'm trying to write a grade program using functions, but looks the functions are talking with eachother and i'm not sure why. i've made a function for the numeric grade, letter grade, grade sign and then the output, any tips? thanks g...

How to read ACK (0x06) from serial port

732 byte By LPGDEV at 2007-11-20 11:41:36
HiI am trying to read commands from a serial port in linux. I am able to open it, write commands to it and receive command strings back. The hardware on the other end sends a ACK (0x06) command as confirmation when it receives an incoming command. What I have at the moment is this...char buf [255];w...

random word generator function

808 byte By khenzel at 2007-11-20 11:41:37
i need a little help...What i'm trying to do is create a function that passes a random word selected from a list contained inside that function to a structure string contained in the globals.or more simply...struct Console{ // Identify structure for the game consolestring word; // the word to b...

C union question

706 byte By Lindley at 2007-11-20 11:41:38
This is actually a C question rather than C++.If I've got a union, is there any way to take a pointer to a particular member of it, so that the currently "active" member of the union can be abstracted away?In C++ I'd just do something with operator overloading, but that isn't an optio...

function pow..

435 byte By Rooting at 2007-11-20 11:41:39
searching on internet i see that the function pow of maths.h don't exist whith a tipe int..so int pow() doens't exist..if in openbsd i make a simple program, whith a pow funciton like thisint a= 2;int b= 3;cout << pow(a, b);return an error..but in visual cpp don't return it..why...

functions

424 byte By staticVoid at 2007-11-20 11:41:40
I'm fairly new to c++ and was wondering...LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);I assume LRESULT is a typedef and WindowProcedure is the name of the function but what is CALLBACK. I thought the stucture of a function was data_type function_name(parameters). Ive been thre...

How to view all Process FullPath

1170 byte By Dunkel Kamui at 2007-11-20 11:41:41
Hi to all...ummm... I've a problem... I'm trying make a function that return me the list of all processes executing in a Win95 to Win Vista platform using EnumProcess() and GetModuleFileNameEx() functions of psapi.dll, or PROCESSENTRY32 struct...My problem is... in W2k and XP, (Vista... ee...

Adress Type

58 byte By yoni1993 at 2007-11-20 11:41:42
How i can know if 0x123456 is a char/int/float or double ?

Sub-Functions in C

1177 byte By cuba06 at 2007-11-20 11:41:44
I've been instructed to create a program that will print a table of efficiencies of a four-stroke engine for different values of compression ratios depending on the specific heat that the user enters.The only thing is that we've been told that we need to use sub-functions to do different t...

socket show page

347 byte By Rooting at 2007-11-20 11:41:45
hi friends!!..it's my first programm of socket..i 'd like to programm a software that show me, the text ofa html page..how I do??..i'd like whith a unix structure , becouse i like to run ina bsd machine..how i can start whith??..an example or a page that i start study??..thanks!!.....

how do I debug a program that crashed...

1083 byte By the_learner at 2007-11-20 11:41:46
I ran my program from the command line and it crashed... and I got the following classic dialog box: "MyProg.exe has encountered a problem and needs to close. We are sorry for the inconvenience" And then there are three buttons:[DEBUG] [Send Error Report] [Dont Send] So, I clicked on Debug, hoping t...

population of an array of string...

677 byte By khenzel at 2007-11-20 11:41:48
Hi,i'm trying to figure out how to populte an array of strings...lets say i declare:string wordList[100];so now i have 100 strings populated on the string array wordList right?so if i did something like:wordList[100] = "one","two",..."onehundred";shouldnt that work?i have to ultimitely have it...

problem compiling resource file for dialog box

914 byte By verbal at 2007-11-20 11:41:49
i try to compile a simple windows application but when i try to add the code for the dialog box i get a syntax error in the resource file. The code for the dialog box is this:IDD_ABOUT DIALOG DISCARDABLE 0, 0, 239, 66STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENUCAPTION "My About Box"FONT...

need help regarding logon date and time

1027 byte By kvk at 2007-11-20 11:41:51
hello,This is Vamshi Kumar Kota, i am a graduate student. Till now i didn't work on windows programming and win32 API. Now i have to work on a project.The project is:1) i have 15 workstations - windows XP2) a winodows 2003 server and Sql server 2000.3) i have to connect 15 workstation and serve...

Vectors in Managed Code

282 byte By pyro32@gmail.com at 2007-11-20 11:41:52
I want to create a vector of a managed class within a managed class. I know that I can't mix unmanaged and managed types and this is why it will not work directly. Is there a way to accomplish this or is there a data structure similar to vector that is already a managed class?