DebugBar for setting breakpoints

734 byte By rlien at 2007-11-20 11:57:29
Hey people,Here comes a cry out for help at the end of the day. I am working on an IDE environment where I want a bar to appear on the left side of the frame. This is the bar that for example visual studio has where you set breakpoints. I am now using a dialog bar that I instantiated in the ChildFra...

Need Help finishing school project.

7204 byte By Rick2101 at 2007-11-20 11:57:30
I need help finishing this school project. I've been trying to work around the problems but I just keep going in circles. My Code is the following:# include <iostream># include <cmath># include <iomanip># include <ctime>int randValue( int level );int generateProblem( int...

Splitter Window

137 byte By Tamiz at 2007-11-20 11:57:31
I need to create a splitter window (vertical split) with navigation links on left side and text view similar to html view on right side

How to register COM on Windows XP

905 byte By Taphoda at 2007-11-20 11:57:32
Hi, First of all I beg your pardon because my poor English.I need to run an application (using Delphi 7) that uses a COM component developped in Visual C++ (Visual Studio 2005), on a Windows XP environment, but without installing Visual Studio 2005.This COM component (xupita.dll) has dependences of...

Very basic program. Need criticism.

1943 byte By goldbomb444 at 2007-11-20 11:57:33
Ok, first of all I am tottally new to C++ and programming in general. I am determined to learn C++. I have been using three diffrent books and been going VERY slowly as to not miss anything. I made this extremely simple program (at least to you veteran programers :P). I would just like some criticis...

Drop Menus and Dialog Boxes

1615 byte By Plasmator at 2007-11-20 11:57:36
Hi, my application is just a simple dialog box (from a resource script) that I spawn using CreateDialog.I wanted to add some drop down menus to my application, so I added the following to my resource script just to test everything:#define IDR_MAIN_MENU 1001#define MENU_EXIT 1002//...IDR_MAIN_MENU ME...

local function definitions are illegal...help plz

3710 byte By keithb1984 at 2007-11-20 11:57:38
Ok so I have been working on the following program for quit some time now (my eyes burn :p). I feel i have most of the code in place, as it should be, but when I compile I am getting "error C2601: 'FloatSum' : local function definitions are illegal"I can't seem to figure out exactly...

Heap allocated wasnt deleted.

1025 byte By forester at 2007-11-20 11:57:39
I want to post a message to the main UI thread from a secondary thread, the message is a CString type, when I ran the EXE, the string posted from the threadPorc() could be shown on the main dialog, but in the Windows task manager, the "VM Size" kept incrmenting, it looked like that the heap allocat...

getline() and Delimiter problem

590 byte By clcaruthers at 2007-11-20 11:57:40
OK. so im trying to read in from a file that contains names(6) each seperated by a comma.e.x. John Doe, Jane Doe, etc...I know using getline( in_stream, candidateNames[0][5], ','); would read the line up until the first column. I know i need a loop to cycle thru the array to put the strin...

Declaring and implementing methods

397 byte By lontana at 2007-11-20 11:57:43
Dear All,What is the best practice for writing classes:Should implementation of methods be inside the body of the class or should be defined separately?If yes should the implementation be in the same file or in some other?Should classes be defined in header or source files?Is it good practice to def...

Unsupported operation

902 byte By John E at 2007-11-20 11:57:49
Gosh, I feel so amateurish today... For years I've been succesfully programming MFC apps where the Debug and Release builds behaved identically. They weren't always doing the right thing - but at least they did the same thing. Now suddenly, I've got an app whose Debug version works bu...

No priority boost when messages is received

654 byte By locksleyu at 2007-11-20 11:58:00
I am trying to categorize the behavior of the automatic priority boost done by windows in certain scenarios. I can see a +1 priority boost for around 200 ms when doing a Wait on a Semaphore or Mutex. I expected that a similar boost would occur when a message is received by a window, because that thr...

Casting functions

715 byte By akamal at 2007-11-20 11:58:10
Hi,I'm new to c++ and am trying to decipher some code that I've inherited. In a couple of places it's doing things like this:h=GetModuleHandle("SomeDLL")ptr1=(void *)((long)SomeFunction-((long)h+0x9e41)-5);This looks to me like it's casting the function SomeFunction to a long (wh...

CFtpConnection remove file

520 byte By mwong7025 at 2007-11-20 11:58:14
My CFtpConnection remove file failed, the GetLastError is 12003. Can anyone tell me what caused the failure. The ftp GetFile fucntion worked, but the ftp Remove function failed.My code is following, pConnect is CFtpConnection : bStatus = pConnect->GetFile(strSrcFileDir, strDestFile, FTP_TR...

Toolbar icon on dialog bar?

108 byte By richiebabes at 2007-11-20 11:58:15
Is it possible to put a toolbar icon on a dialog bar that has all the qualities of a regular toolbar button?

MissingManifestResourceException

261 byte By AlicanC at 2007-11-20 11:58:23
When I add "anything" that uses a resource file, I get this exception. I tried to change the icon of my program and I got this error. Now I get this because a multiline Label uses the resource file. How can I fix this?<br/>Note: I attached the source code.

Why does C++ need throw()

388 byte By warrener at 2007-11-20 11:58:34
I understand that An exception specification with an empty throw, as invoid MyFunction(int i) throw();tells the compiler that the function does not throw any exceptions. But why do we need this function? If MyFunction doesn't want to throw() something, then just doesn't throw it.What happe...

Cstring not recognized

1062 byte By ashlesha24 at 2007-11-20 11:58:35
Hi,I have Cstrings as members of a couple of classes in my project. I have included the <cstring>, <string> & <iostream> headers -- however, I still get multiple cstring related errors.Below is one the code for one of the classes:struct SMAFInfoHeader{ SMAFInfoHeader (): strF...

Optimizing search in listview

621 byte By zspirit at 2007-11-20 11:58:37
I have a simple linear search implemented in a listview with about 5000 items.LISTDATA * CTestView::FindItem(ST_TIME time){ CListCtrl& ctlList = GetListCtrl(); int count = ctlList.GetItemCount(); LISTDATA * pItem = 0; for (int i = 0; i < count; i++) { pItem = (LISTDATA *) ct...

liscontrol and SQL

101 byte By aguess at 2007-11-20 11:58:39
hi<br/>i am looking for an exemple how to load database(tables) to a ListControl using an SQL query ?

program isnt executing correctly (newbie question)

2029 byte By SkaR3D at 2007-11-20 11:58:40
alright so I wrote the code, and when I build it/compile the application the output window states that there isn't any errors.However when I execute the program it doesn't work as I thought it wouldhere's the code:// All about you program#include "stdafx.h"#include <iostream>usi...

Progress Indicator called from other class fails

1199 byte By robalo at 2007-11-20 11:58:47
I have a simple dialog app which includes a progress indicator (CProgressCtrl). I have previously successfully managed to get this working by having a decoding program doing everything from the same class (dlg class).The difference now is that Im doing the decoding from other standard ANSI C++ class...

problem in remote debugging in vs2005

1468 byte By gusto at 2007-11-20 11:58:49
i am running a MFC program on the computer HOST, while trying to debug it in anther computer main... the VS2005 professional is installed on MAIN..how ever, i get ths following message while try to attach the procedureCan not connect to "Microsoft Visual Studio remote debugger monitor" on the compu...

error c2078 too many initializers

3393 byte By ritvik at 2007-11-20 11:58:58
#include <iostream.h>#include <ilcplex/ilocplex.h>ILOSTLBEGINtypedef IloArray<IloIntVarArray> VarMatrix;void main(){ int nofnodes = 9; int nofarcs = 16; int arcij[9][9] = {{0, 1, 1, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, {1, 1, 0, 0, 1, 1, 1, 1, 0, 0},...

Linkage problem

463 byte By Saeed at 2007-11-20 11:58:59
:( Ok created a generic class with only one method apart from the const and destructor.In another class used it by#include "HSMSV.h"... HSMSV c; c.method("");class HSMSV {public: HSMSV(); virtual ~HSMSV(); bool method(CString p1);};why is it coming up with error LNK2001: unresolved external symbol...

LinearGradientMode

86 byte By acemahesh at 2007-11-20 11:59:03
Hi All,<br/>What enum in VC++ 6.0 is equivalent to LinearGradientMode (VC++.Net)?

call code in c++ from vc++

100 byte By fofa4ever at 2007-11-20 11:59:06
hi<br/>please I want call code in c++ from vc++<br/>I need the way step by step <br/>thanx

Am i creating the Bitmap Byte array correctly?

3656 byte By flynny1st at 2007-11-20 11:59:08
Hi guys,basically i want to create a monochrome images from another image i pass to the method, here i will set the selected colour to be black and all other pixels to be white.i'm getting a bitmap being output of the same size of the original, however when i try and open the bitmap i get the m...

Tracking include file nesting

775 byte By j66st at 2007-11-20 11:59:11
In a large project (>1000 C++ files for a single executable) I want to track the #include file tree. To answer questions like "Why would abc.cpp need xyz.h?" and "which *.cpp files depend on xyz.h". Like the source browser can give cross-reference trees for function calls, I want to see a cross r...

Code which will refresh my Internet page automatically required

144 byte By Ajith Sivakumar at 2007-11-20 11:59:12
Hello,<br/>Can any one tell me how to refresh an opened URL automatically using an exe which is written in VC++.<br/>Thanks,<br/>Ajith

CEdit transparency

783 byte By alav at 2007-11-20 11:59:15
Hi,I want to have a transparent CEdit control. I derive from CEdit, here are snippets of my code:BEGIN_MESSAGE_MAP(CEditEx, CEdit) ON_WM_CTLCOLOR_REFLECT()END_MESSAGE_MAP()HBRUSH CEditEx::CtlColor(CDC* pDC, UINT nCtlColor){ pDC->SetBkMode(TRANSPARENT); pDC->SetTextColor(m_bHasFocus?m_clrTextFo...

How to connect to database after using SQLConfigDataSource to create database

1642 byte By DumbMonkey at 2007-11-20 11:59:16
Hi,I use SQLConfigDataSource to create an access database-BOOL CDatabase::Create(CHAR *fileName, CHAR *name, CHAR *username, CHAR *password){CHAR driver[MAX_STATEMENT_LENGTH];CHAR attributes[MAX_STATEMENT_LENGTH];sprintf(driver, "Microsoft Access Driver (*.mdb)");sprintf(attributes, "CREATE_DB=%s Ge...

Deleting double elements in a vector

443 byte By lontana at 2007-11-20 11:59:26
for( int i = 0; i < (p.size()-1); i++ ) { for( int j = i+1; j <p.size(); j++ ) { if( p[i]==p[j] ) { p.erase(p.begin()+j); } } }Dear All,I want to deleete all duplicate elemnts in a vector (p) : Afore given piece of code tries t...

IE Home Page

177 byte By somasundaram.er at 2007-11-20 11:59:35
Hi Everybody,<br/> i have a question. how do i change IE's Home Page programmatically, without actually touching registry.\<br/>Help me please.<br/>bye <br/>P.Somasundaram

edit control problem

4113 byte By atriker1 at 2007-11-20 11:59:50
I am trying to catch the enter key from a edit control ...everything I have tried has failed...any suggestions would be a big help...here is what I have so far.#include <windows.h>#include <iostream>#include <stdlib.h>#include <string>#include <fstream>#include <stdi...

Drag/Drop from Server

1717 byte By Paul Fake at 2007-11-20 11:59:52
I am creating an MFC application which allows a user to explore files in a database and interact with them as if it were a Windows Explorer window. This includes file deletion, uploading, and downloading to a local directory. I want to include drag/drop functionality, so a user can drag files from...

An interesting simple code of forward declaration

671 byte By warrener at 2007-11-20 11:59:57
There are 2 classes, A and B:----------FileA.h----------#include <FileB.h>class B; //Why forward declaration hereclass A{...B objB;...};----------FileA.cc----------#include <FileA.h>...implementation of class A...----------FileB.h----------class A; // I understand this is forward declar...

How do I use IDictionary interface inside my simple VC++ application?

226 byte By AnitaEugene at 2007-11-20 12:00:00
Hi<br/>How do I use a simple IDictionary interface inside my simple VC++ Dialog application without any complication?<br/>I need to use the KeyValue pair inside my application for row manipulations.<br/>Thanks<br/>Anita Eugene