Need help on friend template member function of a template class

1672 byte By SamWo123 at 2007-11-20 11:39:09
Hi.I am getting errors when trying to define a friend template member function of a template class.I started with just a friend function inside a template class. There's no problem.//complex_c.cpptemplate<typename T> class complex_c{ public: T i; T q; complex_c(){i=0; q = 0...

How to skip items in a list?

640 byte By frasifrasi at 2007-11-20 11:39:12
Basically, I have a list of integers in a text file and within the values there is a negative numbers/letters/ etc mixed up. So, what I have to do is output an error rather than the conversion(decimal to binary). I got the negatives covered, but here is what I am doing to locate letters:int x;x = -1...

About CListCtrl

2309 byte By bhushan1980 at 2007-11-20 11:39:13
Hi. I have to display some information in a list control on a CFormView. Hence, I used the resource editor and just put a list control and setting its style to Report. Now, using the wizard, I added a member variable to the list control to work with. And, I had a code to help me out to do it. Zafir...

How to draw a over-line on characters

200 byte By lilnelse at 2007-11-20 11:39:14
I want to draw some characters with underline, strikeout or overline, I've known how to get the first two, but how to do with the overline, please?<br/>I'm using VC++ 2005, GDI+.<br/>thanks~

Porting Win XP dll to Win CE dll

159 byte By chan_fookmun at 2007-11-20 11:39:15
Currently I have a win xp driver written in VS 6.0 C++. I want the same driver to work in Win CE 4.2 for example. How do perform the porting process? Thank you

Just started C++ a few days ago need some help(hello world)

1596 byte By SkaR3D at 2007-11-20 11:39:16
Hi im new to dev-archiveIm very new to C++ so I would appreciate it if people could fill me in on the terminology.I thought for sure some one would have asked this already, but i don't see any posts concerning this.I've been reading a little about C++ and I decided I should try to create t...

Compiling acitveX control in a win32 DLL

501 byte By mce at 2007-11-20 11:39:17
i need to access CMSHFlexGrid (a windows control supplied by VC++) get methods from a DLL project. I have tried to insert CMSHFlexGrid to a MFC dialog project and then copy over the generated source files and try to compile in my Win32 DLL project. However i am getting full of compile errors, 80 of...

can i send CBN_CLOSEUP message to COMBOBOX?

18 byte By aneird at 2007-11-20 11:39:21
how to write code?

thread is runing in background?!

577 byte By Abalfazl at 2007-11-20 11:39:22
Hello frineds!it is said:Foreground and Background ThreadsBy default, threads are foreground threads, meaning they keep the application alive for as long as any one of them is running. C# also supports background threads, which dont keep the application alive on their own terminating immediately on...

RTT in nanoseconds

235 byte By iStriker at 2007-11-20 11:39:24
Hi everyone. I'm new to socket programming so sorry if this is a noob question.<br/>Nway, is there a way to ping an access point, given that i know it's IP address, and get the RTT in nanoseconds, instead of miliseconds?

Int and Unsigned int?

129 byte By Lannie at 2007-11-20 11:39:25
Hello,<br/>Does visual C++ support unsigned int? If yes, is its values supposed to range from 0 - 4294967296?<br/>thank you.

How to parse VBA script file in MFC ?

350 byte By paresh_chitte at 2007-11-20 11:39:26
How to parse VBA script file in MFC ?I want the following information from the VBA macro file,1. Number of modules in the script.2. Name of all the modules.3. All the function names in the given modules.Is there any scripting engine ?Any help would be appreciated.Thanks and Regards,Paresh....

operator overload for pointer to class object

777 byte By newms86 at 2007-11-20 11:39:28
I am trying to figure out how to overload the assign operator= for an array of my class objects Square.I have declared Square *Cube[27]; and filled up the cube with square objects I want to overload operator= in:Cube[2] = Cube[3] for example. I know how to overload for a square object alone, but is...

How to parse VBA script file in MFC ?

350 byte By paresh_chitte at 2007-11-20 11:39:29
How to parse VBA script file in MFC ?I want the following information from the VBA macro file,1. Number of modules in the script.2. Name of all the modules.3. All the function names in the given modules.Is there any scripting engine ?Any help would be appreciated.Thanks and Regards,Paresh....

Vc++(mfc)

51 byte By SwagatikaSahoo at 2007-11-20 11:39:31
How to add progree bar in MFC.Give me some example.

Reading a custom image file

239 byte By galileogabi at 2007-11-20 11:39:32
I have to read a custom file that has multiple images in it and data associated with each of the image. File is structured file and tags are associated with all the information. Can you please get me any sample code for reading such files?

Help handling a device

1628 byte By tootypegs at 2007-11-20 11:39:33
Hi, my aim is to get a handle on my USB device, and dismount the USB drive (I would also like it to remount straight after but i will crawl before i can walk). I have worked out that FSCTL_DISMOUNT_VOLUME could be what i need and ive had a go at putting something together but it doesnt work. Can any...

Urgent ....Multithreading for Windows Object

806 byte By mce at 2007-11-20 11:39:34
I need to get this to work urgently. Yes, Windows object should best be accessed within the same thread that created it.But for good reason, i need to do the following. And according to MSDN, This should work too! Since CMSHFlexGrid is a CWnd object too, why am i getting assertion then?UINT ThreadFu...

str

183 byte By ikcha at 2007-11-20 11:39:36
in vc2005(mfc), need to convert cstring to string.<br/>string a;<br/>CString b;<br/>how about?.<br/>a = b;<br/>in vc2005, what is best and safest method to convert CString to string?.

Access Violation After Transfer of Project Files

710 byte By iron59 at 2007-11-20 11:39:39
Good Day Guys. I need some advice regarding my C++ Project.Here's the problem:I have a C++ Project that I developed in an old PC. The Program works properly but then when I transferred the project files to another PC, it threw an unhandled exception specifically "access violation". the exceptio...

STL problem

485 byte By yaniv_av at 2007-11-20 11:39:41
Hi, What's wrong with this code?typedef std::map<DWORD, std::vector<std::wstring>> IntervalsMap;I get lots of compiler's errors...When I'm spliting it, like that:typedef std::vector<std::wstring> strvec;typedef std::map<DWORD, strvec> IntervalsMap;it's ok....

base and derived classes

1642 byte By grahamlabdon at 2007-11-20 11:39:42
Hi EveryoneCan someone please clear a point of confusion for meMy current design has a base class that has several classes derived from itThe base class has a virtual method for which it provides an implementationto do some work that is required for all classes in this hierarchy.So dervived classes...

Template Function

512 byte By Sumit.Dua at 2007-11-20 11:39:46
Hi alli m having a problem in implementing a template function for additionthat funtion looks like thistemplate< class T >T add( T a , T b ){ return ( a + b ) ;};But for a case when i will give it string to add then it is giving error because it is passing const pointer.......and addition of p...

PlaySound problem

229 byte By lpn_com at 2007-11-20 11:39:47
I play the wave from resource:<br/>PlaySound("MY_WAVE",0,SND_SYNC|SND_RESOURCE); // first<br/>PlaySound("MY_WAVE",0,SND_SYNC|SND_RESOURCE); // second<br/>work only first function, the second return false and no sound =(

How to populate a non MFC ComboBox on run??

1396 byte By umeshp at 2007-11-20 11:39:48
Hai all, I am new to windows programing. I have used a Combobox and listbox in my sample program which i want to populate... I undestood how to do it in MFC.. But I want to know how to do it in non MFC windows program.. wat I did wascase WM_INITDIALOG:{HWND hComboBox = ::GetDlgItem(hDlg, IDC_TITLE)...

HTTPOpenRequest always give error code 87

630 byte By manishraj at 2007-11-20 11:39:49
Hi all,I am stuck with one so called irritating problem, I have written one HTTP client to upload one text file to my local server. And the upload works without fail if I run my application in Debug Mode.. i.e. HTTPOpenRequest always passes, but for some reason HTTPSendRequest always fails in Re...

float / double ?? what!?

676 byte By Salvadoravi at 2007-11-20 11:39:50
Hi guys,I have this simple overload function:void FindID(double num){ cout<<"I'm Double!"<<endl;}void FindID(float num){ cout<<"I'm Float!"<<endl;}int main(){ FindID(0.4); return 0;}It seems like any value I pass to it will "trigger" the double function,0.4, 1....

How to create Bitmap Buttons ona Dialog Bar Like tool bar

285 byte By rutu at 2007-11-20 11:39:51
Hi,<br/> I am having Bitmap Buttons on the Dialog Bar. But the buttons are having borders which are visible. I want buttons like tool bar when ever i ll take curser over the button then only it will show the button border otherwise it will show only the Bitmap. How to do this?

Help reading bitmap byte array!

2671 byte By flynny1st at 2007-11-20 11:39:52
Hi i want to wrtie a method for reading in a bitmap and looking at each pixel.i have the following but it doesnt seem to be working can anyone tell me what i'm doing wrong.basically, it compiles and gives me output but whn i compare thergb values its outputting against the pixels in the file th...

[OLEDB/ATL] Multiple-step operation generated errors.

6684 byte By kasru at 2007-11-20 11:39:54
Hi,This code works on SQL Server, Oracle, but does not work on DB2.What's problem?/*create table EventTable(TimeStamp char(100),AppName char(100));*/#include <stdio.h>#include <tchar.h>#include <atlstr.h>#include <atldbcli.h>#define LOG_TRACE printftypedef CStringT&l...

[RESOLVED] Access Violation During String Formatting

977 byte By SkoobieDu at 2007-11-20 11:39:55
I get the following message when debugging my app:Unhandled exception at 0x0043907e in Temporal.exe: 0xC0000005:Access violation reading location 0xcccccccc.This is the function causing the problem:string GetString(uint resId, ...) { string str = new Char[255]; int len = (int)wcslen(str); LoadStr...

undeclared identifier

369 byte By Ajami at 2007-11-20 11:39:57
Hello,I declared a structure in one class.public:typedef struct{ unsigned int texID;}Textureimages;Textureimages texture[2];When ever I try to access texture[0].texID from another class derived from the first class I get an undeclared identifier error message.What am I doing wrong.Thanks,...

Having trouble with free()

1151 byte By adityaaytida at 2007-11-20 11:39:59
I am getting an error "debug assertion failed" when i run my code.I suspect that the error is in the following code segment. The code is the basic implementation of a tree. struct treeNode{ struct treeNode* parent; struct treeNode* left; struct treeNode* right; int data; char a;};struct treeNode *ro...

Wnt to set the combobox to be non-editable

421 byte By poshyradha at 2007-11-20 11:40:00
Hi everyone,I am using a combo box with a dropdown list. In the drop down list i am listing few options for the users to select.After the user selects an option from the list box , i want want the combobox to be static, that is the user should only be able to select the options listed in the drop do...

Need help with radio button

309 byte By poshyradha at 2007-11-20 11:40:02
I 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 appliaction starts up.Please help me RK :-)...

Problem with getstylename()

151 byte By kranti at 2007-11-20 11:40:03
Hi,<br/> I am trying to get font style name from Cfontdialog but unable to get it.<br/>How can i get font style name? can anybody plz help me out...

Problem with converting CString to const char* while using _putenv_s funtion

437 byte By poshyradha at 2007-11-20 11:40:04
I = _putenv_s("DEFAULT_REGION",cStrSelectedRegion);I am using the function _putenv_s to write a new environment variable, as the signature of the function it accepts the name of the evn variable and the value to be written inside which is a const char *now i have the value as CString variable , i ne...

Problem with checking if another process is still running.

2616 byte By DeepT at 2007-11-20 11:40:05
I have had this long standing issue with finding out if another process is still running. It seems simple, but there are special conditions that cause things to work improperly. I have set up a tester to help me deal with this and something interesting happened.Let me first explain the setup I a...

Window event handling in X and Win32

899 byte By Lindley at 2007-11-20 11:40:07
I'm trying to create a window to draw to using OpenGL. For various reasons I don't want to use GLUT, and none of the other windowing systems I've seen so far appear sufficiently lightweight to be useful in my context.I'm primarily working in XP64, but I'm looking to port to...

Saving section of a HBitmap

1179 byte By flynny1st at 2007-11-20 11:40:08
Hi guys,hope you can help here. I basically want to save a subsection of a HBITMAP. so i have a bitmap say 100 x 100 pixels and i want to pull out and save say 10 by 10 from coord (5,5,)i have written the following code which compiles however, the bmp it outputs is of the right size but is just blac...

MFC COM Books?

862 byte By GeoffH at 2007-11-20 11:40:09
Hi,I need to learn MFC COM for work. Are there any de facto books on learning it/them?I'm working on a solution involving native C++, CLI, and C# (CLI of course is the wrapper for the native libraries). It was suggested to me that we include COM in the mix for increased ease of interoperability...

reading an image of a device?! help needed!

413 byte By tootypegs at 2007-11-20 11:40:10
Hi, my plan is to develope a small program that reads a device. For example, If i had a thumb drive, i would like to develope a program that can read the thumb drive showing me the file structure and all files on the thumb drive its self. Can anyone give me any advice on where to start? any pointers...

WSAEWOULDBLOCK forever

2318 byte By GyroTech at 2007-11-20 11:40:12
Hi all,I'm writing a simple client\server messaging app. The client is an ActiveX control that connects to the server, and then waits on the socket with WSAAsyncSelect(). When it receives an FD_READ message, it reads in the packet and does what it's meant to do with the contents.LRESULT CE...

Allocate memory using malloc() and release it using delete

232 byte By Salvadoravi at 2007-11-20 11:40:20
Hi guys,<br/>Is it possible to allocate memory using malloc() (C) and release it using delete (C++)<br/>or even the opposite<br/>Alocate with new (C++) and release with free() (C)<br/>If not Why?<br/>Many thanks.....

Another exercise i am stuck with

2196 byte By BoSCHoW at 2007-11-20 11:40:24
Hello friends,i have a new problem with another exercise. It states like this:Imagine that we have a program that requires the informations of the user. for this purpose write a function Insert, that will look after the users informations. Because the function has to be general, its parameter should...

Having Problems With Linux Sever C++ Code

824 byte By pokemasterflex at 2007-11-20 11:40:28
Alright hey guys and gals. I have a question for all of you. I am a newbie programmer and I am trying to finish out this code so it will pop up with the message I have in the stars however I have no idea how to go about this. Its on my college professor's linux server (Red Hat core 7) which we...

ifstream does not read the file properly if I dont code ofstream statment befor

3071 byte By kpatel at 2007-11-20 11:40:30
I really need help on this one. I can put the ambiguious code in my code and out product can not ship due to the ambiguious code. I am trying to make our application work on vista, it was working till now but in vista the drag and drop functionality does not work. Upon investigation we found out tha...

Randomizer for words

1382 byte By khenzel at 2007-11-20 11:40:31
Hello everyone.I'm working on a typing tutor project... what i want is to have a bit of code pull a random word from a list i have stored in a function to display on the screen for the student to try to replicate.i'm having great difficulty trying to figure out how to do this. can anyone...

string comparisons

1176 byte By khenzel at 2007-11-20 11:40:32
whats wrong with my code?i'm trying to compare 2 strings... and come back with a value for the number of characters in that word that dont match up.i know with the string.compare(x,n,str) comparison it returns a 0 for each letter that comes back correct... but somehow it doesnt seem to work......

How do I locate decimal numbers.

502 byte By frasifrasi at 2007-11-20 11:40:33
Say I have a list of numbers and that my program is only supposed to deal with integer values... Does anyone know a simple way to determine if one of the values is a decimal (like 5.6) , output a message and skip it?I already know a way to locate letter and output an error message, but the if statem...