DLL Registering Probelm

336 byte By sudeephooli at 2007-11-20 11:26:50
Hi All,I had created DLL- SDI application (Regular DLL) and I registered using regsvr32.exe it works fine in developer machine.But If i tried to register some other machine it shows the error.debug assertion failed olelink.cpp lineno 291, pls tell me how to solve this problemThanks...

Struct Involving Reading From File

2416 byte By kc0poc at 2007-11-20 11:27:02
This is a homework issue I am attempting to work through.Text File:Car,1996.75Truck,3971.54Motorcycle,1429.09Freight Train,356478.98*****START CODE********#include <iostream>#include <fstream>#include <iomanip>#include <string>using namespace std;const int NUM_OF_ITEM = 8;str...

execute a command line program and get the error

598 byte By IndikaNiva at 2007-11-20 11:27:11
I'm executing a command line program (bcp which is SQL bulc copy) through a winexec is there a way to get the error string if one is generated by this bcp program.I could change my code to use createProcess or any other form of exec method. Urgent help needed. ThanksCString oErrorTables;CStrin...

Homework help plz!

2679 byte By mythassassin at 2007-11-20 11:27:14
Hi new to the forums, thought you guys might be able to help me out, maybe not. I have a programming assignment as it follows:1. Star Search (10 points) A particular talent competition is taking place on campus. This competition has 5 judges, each of whom awards a score between 0 and 10 to each...

Please compile this

4948 byte By lood at 2007-11-20 11:27:15
HelloI'm trying to compile a c++ function (not mine) as a DLL for VBCompile is ok, but I'm getting link error:error LNK2001: unresolved external symbol I'm running vc++NewSrc.h#include <stdio.h>#include <stdlib.h>#include <string.h>#define CWS_NETMSGSIZE 240typedef u...

CopyMemory fails after MapViewofFile

2516 byte By ChessMaster at 2007-11-20 11:27:21
I have created a file mapping object. I have mapped views, taking into account allocation granularity. Yet, after MapViewOfFile returns a valid pointer, I have trouble assigning data to allocated memory pointed by the same. Is there something that i have missed here?Following is the piece of the cod...

How to determine whether a Edit Control field is empty

377 byte By tajepe at 2007-11-20 11:27:25
In DoDateExchange I have:DDX_Control(pDX, IDC_TISSUENAME, m_tName1);IDC_TISSUENAME is a Edit Control resourcem_tName1 is CEdit varHow do I know if the field IDC_TISSUENAME is empty?I know I can use GetDlgItemText(IDC_TISSUENAME, tissueName1, MAXBUFFSIZE);to get the chars from to field to a buffer ti...

"Dynamic cursors not supported by ODBC driver" Error for dynaset CRecordset

789 byte By ganga at 2007-11-20 11:27:27
Platform: Window 2003 Server Enterprise Edition, VC 2005 , ODBC version3.52, MDAC 2.8, MSAccess2000 databaseHelloIn our multithreaded VC++ application, we are accessing certain tables usingCRecordset (with dynaset properties set)We are facing ODBC related error (for MS ACCESS database) i.e. "Dynami...

How to identify Non-printable ASCII characters in ReadString function

691 byte By hardik at 2007-11-20 11:27:28
Hello,I am using ReadString function of CStdioFile class to read text file like below:FNAME = SomethingLNAME = SomethingDOB = MM/DD/YYYYSSN = 111223333Sometimes, the text file has some garbage non-printable ASCII characters, which are causing ReadString to fail.Appliation is not able to do any furth...

Looking for Memory Leak Advice

658 byte By Complete at 2007-11-20 11:27:30
Apart from buying BoundsChecker or any of the other tools to track down memory leaks. Does anyone have any advice or tips from your years of programming experience to offer on how to track down the causes of memory leaks?I find that the big dump that happens at the end of a program does not typical...

Removing article from deque

761 byte By JMooney5115 at 2007-11-20 11:27:32
am doing a project for c++. One part of it is removing articles from the front and back of a deque. I keep getting a run time error.d.erase(di); is messing up the program. I have tried d.remove, d.clear. They do not work. I could use some help with this.Here my code for removing from the front of th...

Calling C++ DLL from VBA - strings. Please help

1109 byte By sanjupan at 2007-11-20 11:27:38
Hi,I have a c++ method that I need to expose to VBA script ( to be used for Excel). The method takes 2 parametersvoid foo ( char* inputString)How should I expose it in a DLL so it can be used by VBA. ( I think this is a C++ question because the coding has tobe done in VC++ )I tried using void _MY_f...

Help with Loop (C++/MFC)

2117 byte By EOTF at 2007-11-20 11:27:39
Hi folks,I'm having problems with my loops, and possibly more...hehe!I'm loading a text file, which has 1 word per line, into a buffer and I want to search the buffer for all the words that start with the same prefix (3 letters) and return the words in an edit box.I successfully accomplish...

Command ID Conflict

398 byte By s196675m at 2007-11-20 11:27:45
I am trying to create dynamically some menu and controls. I am assigning some arbitrary number as a command id. How Can I ensure my command Id is unique?In OnCmdMsg I have found my function is called even though I haven't initiated my menu. It might be same ID is used by other objet.menu->A...

weird compiler error

1361 byte By magnaku at 2007-11-20 11:27:47
hello, i am new to this thread, so forgive me if i posted this on the wrong forum, or if its a question it already has been asked... but this is a project specific...i have created a Point2D class and a Vector2D class, since I only need basic components of both...in the Point2D class, i have the fol...

★ToolBarCtrl dropdown menu Dialog based★

901 byte By lafeng at 2007-11-20 11:27:48
CDialog based ,not SDI.Add a true color menu on dialog , that's ok.Now adding a dorpdown menu like IE ToolbarMenu:First Question: How to notify dropdownmenu message. Second Question: How to add menu into dropdown toolbar(et "IE").I try to add : .......

_T(" ") Vs TEXT(" ")

149 byte By amit_srms21 at 2007-11-20 11:27:50
hi,<br/>pl z, tell what is Difference between _T(" " ) and TEXT(" "), And when we have to use _T(" ") and when TEXT(" "). thanks For Ur Response.....

Is it possible to avoid context switch?

206 byte By tangjun at 2007-11-20 11:27:52
I need to send 256 bytes over serial port without any interrupt, it will take less than 500 ms, but any context switch will fail the task. Is it possible to make this short period of time no context switch?

Timer in SDI application

114 byte By VCProgrammer at 2007-11-20 11:27:53
Hi all,<br/>I want to implement a timer in my simple sdi applcation. How to do it?<br/>Thanks in advance

How to embed a class into windows form?

960 byte By fulltime at 2007-11-20 11:27:54
Hi all,This is the 1st time I am using Visual C++ to create a GUI, I hope to seek some advice for the qns I have.I am using visual C++ windows form to create my GUI. Visual C++ generated a "form1.h" based on my design of the GUI. Now, I am trying to add in the "brain" of the GUI by instantiating an...

to check if the program exists in virtualstore?

299 byte By mase at 2007-11-20 11:27:58
I was asked to implement simple code to check if the application exist in virtualstore in windows XP, but the problem is that I don't know where virtualstore in registry for windows XP although I know where it is in vista. Does anybody know where virtualstore is in windows XP?<br/>thanks

Retrieving PE files import module names

1330 byte By serimc at 2007-11-20 11:27:59
HiI am trying to get list of import module names from PE file. But i can not find the solution.This is my code:CString CPE::GetImportModuleNames(CString str_SectionHdrName){ CString c; IMAGE_DOS_HEADER * dosheader=(IMAGE_DOS_HEADER *)g_pMappedFileBase; IMAGE_OPTIONAL_HEADER * opthdr =(IMAGE_OPTIO...

How to get the Dropped Location when a file was dropped to Windows Explorer

603 byte By Chinthak at 2007-11-20 11:28:01
I searched hard through the forums and found nothing resolves the below problem.I just want to get the Folder Path when a file is dropped from my application to the Windoes Explorer.I drag files from a List Control in a dialog application using following.ON_NOTIFY(LVN_BEGINDRAG, IDC_MY_LIST_CONTROL,...

Public Ref Class Form1 in windows form

1895 byte By fulltime at 2007-11-20 11:28:04
Hi all,I am using visual C++ windows form to create my GUI. Visual C++ generated a "form1.h" based on my design of the GUI. Now, I am trying to add in the "functionality" of the GUI by combining this form1.h with another class (for example, test.h) that I wrote using windows console application.Exa...

[RESOLVED] Text Size

836 byte By grahamr -work at 2007-11-20 11:28:06
Just a quickie: How do find the exact size of text? If use DrawText, GetOutputTextExtent or GetTextExtent and draw around the rect that it returns, it is always nearly twice the height and 50% longer than what I expect. I've also tried getting the font while calling these commands, but I either...

usng gmail as default mail

107 byte By resumurof at 2007-11-20 11:28:08
is it possible to call gmail programatically??? since i want to use it as a default mail in my application

mouse click to logical coordinates

351 byte By Ajami at 2007-11-20 11:28:10
Hi,The mouseclick event gives me the coordinates of the mouse position in device coordinates.Can anybody please tell me how I could convert thes coordinates to logical coordinates.Note that I am using opengl where the bottom left logical coordinates is (0,0) and the top right logical coordinates is...

DLL Register - in machine dont have visual studio 6

328 byte By sudeephooli at 2007-11-20 11:28:13
Hi All,I had created a Regular MFC dll, it registers and works fine with the Machine containing VISUAL STUDIO 6.If I try register it in a machine which don't have VISUAL STUIO 6, it gives error "The specified module could not be found"Pls let me know how to solve this problem.Thanks...

Ming Lib Question

348 byte By rutu at 2007-11-20 11:28:19
Hi, I am working c++ version of the ming Library. I want to set a rigion on the frame sot hat when i will take the mouse on that rigion it will show some message. But i dont want to draw anything on that region. Just i want to set 4 co-ordinates and specify the region. How to do it?Anyone worked...

Image handling in native C++

651 byte By thehumph at 2007-11-20 11:28:21
Hi folks,I'm working on a project that will eventually perform image processing and analysis operations. Right now though, I am having some trouble working out how to get an image IN TO my C++ program and store it in an appropriate data format so that I can apply convolution masks etc. Does any...

how to add color combobox and button in my font property page

275 byte By kranti at 2007-11-20 11:28:27
Hi,<br/> I have added a property page where we have combo boxes for font size selection, font type selection and font styles selection. Now i need to enhance that property page so that i can select font color also as we do in our emails.<br/>can anybody plz help me out...

How to get Folder size throuogh program

205 byte By ashishbhatt12 at 2007-11-20 11:28:33
Hi All,<br/>I am using MFC Application , in that I want to get the specific folder size.So How can I do that??<br/>i have the full path of the folder.<br/>Thanks in advance. <br/>Ashish

Child windows

902 byte By dellthinker at 2007-11-20 11:28:34
Hi all. Im trying to find the child windows in task manager. But i can only get the parent window. Spy++ gave me these classes in order. "Windows task manager""""Processes" SysListView32What i tried was this#include <iostream>#include <afxcmn.h>using namespace std;int main(){ HWND taskmn...

Read MS-Excel file through EVC++ 4.0

146 byte By pri_skit at 2007-11-20 11:28:38
I want to read MS-Excel file using EVC++ 4.0.The file contain strings.How this could be done?Thanks in Advance.<br/>Regards,<br/>priyank

Pointer vs array

89 byte By rambovn at 2007-11-20 11:28:39
What is the different between <br/>int *pint;<br/>and<br/>int intarr[];<br/>Regards,

Disabling Alt+F4

309 byte By Penfold at 2007-11-20 11:28:44
Hi,Does anyone know how to disable Alt+F4 so that when the user presses this key combination, my windows application does not close down? Can this be completely done within code, or does this also require registry setting changes?I'm using Visual C++ 6.0.Thanks,Jason....

importing an SQL table

85 byte By IndikaNiva at 2007-11-20 11:28:46
has anyone got code to export and import an SQL table to a text file?<br/>thanks

CTreeCtrl and Heirarchy Lines

653 byte By craigsm78 at 2007-11-20 11:28:50
Hey,I am using a CTreeCtrl and going through OnCustomDraw. There are several reason why we are going through OnCustomDraw, but now I am now having to draw a checkbox, expand/collapse, and 3 additional images concerning the product I work on.Everything is drawing fine... the expand/collapse, checkbo...

How to intercept CreateProces() ?

264 byte By AndyS1 at 2007-11-20 11:28:51
I need to debug complicated build environment which consists of many *.bar, *.make *.pl and other files. It is real mess! The process stops somewhere I i do not know where. My Idea to trace all CreateProcess() calls from cmd.exe. Does somebody know how to do that?

if statement of only declared variables

987 byte By mmanuelmac at 2007-11-20 11:28:56
I would like to know if this is a legal segment of code: (I have written it in Borland so the Application->... is from Borland)float test; if(test){ Application->MessageBox("inside 'if' part of test","",MB_OK); } else{ Application-&g...

OnCtlColor question

214 byte By quorsum at 2007-11-20 11:29:00
hello<br/>when using OnCtlColor for an edit field with SetBkMode(TRANSPARENT) set the "old" lnes stay visible when scrolling.<br/>how can it be done do avoid this problem?<br/>thanks for your help.

[RESOLVED] How to add code to dynamically created button?

137 byte By zarraza at 2007-11-20 11:29:05
Hi i have an SDI App and wan't to create some buttons dynamically(new operator), and don't know how to handle BN_CLICKED event.

CMemoryException , how to use it?

530 byte By itsh11 at 2007-11-20 11:29:10
I have a very basic question regarding exception handling. I have in my code a line like this:pData =new double[nPoints];I am not sure if I should be prepared to handle any CMemoryException when there is not enough memory available to allocate for pData. Assuming there is not enough memory, if I do...

Database Question

372 byte By reeksy at 2007-11-20 11:29:20
Hi Im new to C++.I was just wondering how C++ programmers tackle large amounts of data? I am a web developer and use MySQL on a daily basis (as most do) but I cant seem to find a common database solution for C++.With C++ do programmers tend to store their data in flat files and simply write to them?...

Storing Random Numbers in an Array

2083 byte By whitebluesc2 at 2007-11-20 11:29:23
I am having trouble setting up an array of random numbers and passing it through 3 separate functions. I need to use a for loop to generate the 10000 numbers.-Each number is stored in an array element using arrIndex as the index.-Increment arrIndex.Code so far:#include <stdio.h>#include <s...

[Help] Resource DLL

158 byte By DarkLotus at 2007-11-20 11:29:32
How, in C++ 6, can you make a Resource DLL?<br/>By "Resource DLL" I mean how can you make a DLL popup a form which is "inside" it?<br/>Any examples?

Text file - grab specific line

761 byte By tarja311 at 2007-11-20 11:29:34
Hello all,I have a program that reads in a multi-lined text file and displays it to the user. This works fine. What i am trying to do is pull out a specific line from that file and into a variable but i am not exactly sure how to do it.Inside the text file is a line that looks just like this :# ---...

SetFocus() Problem

600 byte By slender_bamboo at 2007-11-20 11:29:40
BOOL CXXXNoteDlg::OnInitDialog(){ CDialog::OnInitDialog(); OutputDebugString("Initing the Dialog -- Setting the focus"); mySetFocus(); return FALSE; }void CXXXNoteDlg::mySetFocus(){ m_Edit2.SetFocus();}m_Edit2 is of type CEdit.Setting focus on startup of the modal dialog works well.But after typing...

Compiling in release configuration with debug configurationed dlls

449 byte By Avihay at 2007-11-20 11:29:47
Hi all, I have an application that I want to complile in release configuration cause I want to gain the performance upgrade. The problem is that my application uses alot of dlls which are built in debug configuration, and I can't build them in release configuration. I wanted to know if an appli...

Getting the printer resolution

674 byte By Pavel Kotrc at 2007-11-20 11:29:49
I have a problem getting the resolution of a printer set in the CPrintDialog. I've tried numerous mechanisms but none of them seems to work. I am able to detect the resolution only if the user selects one of the Best, Normal or Draft modes on the Paper/Quality tab of the printer properties dial...