LoadLibrary16 etc.

494 byte By YuraSV at 2007-12-5 22:13:27
Hi!I have to use dll library in my project. But I can not even load using it LoadLibrary(). I have suspicion that my dll is 16-bit (because I can load it under Windows 98 using LoadLibrary16() and I can not load it under 2000).How can I find out whether dll is 16-bit or 32-bit?The second question: L...

Socket programming...

354 byte By AndySoft at 2007-12-4 23:57:05
I want to make an Internet Cafe application used for distributing internet over several internet stations. The server is able to talk with clients an do many command based tasks. My question is:What type of socket should have the server? More connecting sockets or a single accepting socket?PS: I wan...

how checking/unchecking in a popupmenu

1595 byte By Osterreicher at 2007-12-4 10:39:23
I cannot modified the MENUITEM "&Hide/Show Icon", IDC_HIDE_ICONSfor checking or unchecking.how making?my popupmenu is initialised in class CDialog:int CClrBgDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -1; // assign a menu, icon, tooltip, a...

Help Related To ActiveX

1043 byte By VGirish at 2007-12-3 19:25:53
Hi, I am new to ActiveX and i created my first control today. It compiled succesfully and i was able to set a few properties in the ActiveX Control Test Container. It worked fine there. Then , i created a new dialog based application and tried to use my control there. It compiled without any errors,...

Linker error in msobj10.dll

301 byte By rkaltenthaler at 2007-12-1 0:34:58
I'm trying to compile a "native" C++ project using VS.NET.Everything compiles, but I get a strange linker error message:LINK : fatal error LNK2023: bad dll or entry point 'msobj10.dll'!'?FCreateReader@IDebugSSectionReader@@SA_NPAEIPAPAV1@K@Z'Any glue?...

How to instance a Frame/View program from a dialog based program?

910 byte By powerplane at 2007-11-29 14:56:29
Hi, I am a newbie to MFC.I wrote a CFrameWnd/CView based program( not a Doc/View based program). I need to open the former CFrameWnd/CView based program in a dialog program. So I complie my the CFrame/Cview based program as a static lib, and configure the lib dependency and #include file path.And th...

Question on my code

995 byte By elahe shafie at 2007-11-27 0:19:26
Hi friends,here is my program that read a file and push_back to the vvector and I have this error could you please correct me what part I am wrong?Many thanks,ElaheError=====C:\C++\sample.cpp(15) : error C2784: 'class std::basic_ostream<_E,_Tr> &__cdecl std::operator <<(class std::b...

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

226 byte By AnitaEugene at 2007-11-25 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

An interesting simple code of forward declaration

671 byte By warrener at 2007-11-25 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...

Drag/Drop from Server

1717 byte By Paul Fake at 2007-11-25 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...

edit control problem

4113 byte By atriker1 at 2007-11-25 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...

IE Home Page

177 byte By somasundaram.er at 2007-11-25 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

Deleting double elements in a vector

443 byte By lontana at 2007-11-25 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...

How to connect to database after using SQLConfigDataSource to create database

1642 byte By DumbMonkey at 2007-11-25 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...

CEdit transparency

783 byte By alav at 2007-11-25 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...

Code which will refresh my Internet page automatically required

144 byte By Ajith Sivakumar at 2007-11-25 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

Tracking include file nesting

775 byte By j66st at 2007-11-25 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...

Am i creating the Bitmap Byte array correctly?

3656 byte By flynny1st at 2007-11-25 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...

call code in c++ from vc++

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

LinearGradientMode

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

Linkage problem

463 byte By Saeed at 2007-11-25 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...

error c2078 too many initializers

3393 byte By ritvik at 2007-11-25 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},...

problem in remote debugging in vs2005

1468 byte By gusto at 2007-11-25 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...

Progress Indicator called from other class fails

1199 byte By robalo at 2007-11-25 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...

program isnt executing correctly (newbie question)

2029 byte By SkaR3D at 2007-11-25 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...

liscontrol and SQL

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

Optimizing search in listview

621 byte By zspirit at 2007-11-25 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...

Cstring not recognized

1062 byte By ashlesha24 at 2007-11-25 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...

Why does C++ need throw()

388 byte By warrener at 2007-11-25 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...

MissingManifestResourceException

261 byte By AlicanC at 2007-11-25 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.

Toolbar icon on dialog bar?

108 byte By richiebabes at 2007-11-25 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?

CFtpConnection remove file

520 byte By mwong7025 at 2007-11-25 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...

Casting functions

715 byte By akamal at 2007-11-25 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...

No priority boost when messages is received

654 byte By locksleyu at 2007-11-25 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...

Unsupported operation

902 byte By John E at 2007-11-25 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...

Declaring and implementing methods

397 byte By lontana at 2007-11-25 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...

getline() and Delimiter problem

590 byte By clcaruthers at 2007-11-25 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...

Heap allocated wasnt deleted.

1025 byte By forester at 2007-11-25 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...

local function definitions are illegal...help plz

3710 byte By keithb1984 at 2007-11-25 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...

Drop Menus and Dialog Boxes

1615 byte By Plasmator at 2007-11-25 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...

Very basic program. Need criticism.

1943 byte By goldbomb444 at 2007-11-25 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...

How to register COM on Windows XP

905 byte By Taphoda at 2007-11-25 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...

Splitter Window

137 byte By Tamiz at 2007-11-25 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

Need Help finishing school project.

7204 byte By Rick2101 at 2007-11-25 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...

DebugBar for setting breakpoints

734 byte By rlien at 2007-11-25 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...

passing a function pointer to function

791 byte By zspirit at 2007-11-25 11:57:27
Maybe I am tired at the end of today but I am not having luck passing function pionter to function, I was looking at some help here ( http://www.newty.de/fpt/fpt.html#chapter2)too.typedef void (*VOID_PROC_VOID) (void);void CTestDoc::OnFileSave(){ SafeSave(&CTestDoc::FileSave); // sytax error}void...

need some help please

4639 byte By jj71787 at 2007-11-25 11:57:24
Write a program that works with monthly rainfall data for a particular city. This program is partially based on Programming Project 1 at the end of Chapter 5. It uses the monthly rainfall measured in inches for the last 12 months (for Oct. 2006 - Sept. 2007). The data is to be read from a data file...

new line in constant?

1305 byte By SkaR3D at 2007-11-25 11:57:23
Im trying to make an a very simple application where you insert all of your basic info (age weight height hair color and eye color) and then the program will continue on to tell you what you just input. (Example you say you weigh 182 lbs, you are 6 feet tall, you have brown hair and green eyes the a...

need assistance, cannot build program (newbie question)

1665 byte By SkaR3D at 2007-11-25 11:57:18
Hello,Well Im attempting to get better at "if statements" (And C++ in general). However I have a problem with my latest project. Every time I try to build this application It sates that 'age' is an undeclared identifier. Does this mean that I have to identify it by placing 'int'...

SendMessage not working with WM_USER message

1965 byte By locksleyu at 2007-11-25 11:57:17
I am trying to test sending a message from a thread to a window (controlled by another thread) by using SendMessage().Here are the general steps of what I did:1) Create a project with the MFC wizard (mostly default settings)2) in CMainFrame::OnCreate() I create an object which is used to store a han...