1,174 Posted Topics

Member Avatar for sciwizeh

[QUOTE=sciwizeh;679920]but it isn't working, no errors, just not showing up. [/QUOTE] You are not checking the return value of Create(...), so you are unaware of the error. Override the view's OnInitialUpdate() method and create the button there. At that point the view is readily constructed, hence 'this' can be passed …

Member Avatar for sciwizeh
0
2K
Member Avatar for kneiel

[QUOTE=kneiel;681524]why is the size of an empty class 1 byte ? does the compiler add some null byte ?[/QUOTE] Stroustrup's [URL="http://www.research.att.com/~bs/bs_faq2.html#sizeof-empty"]C++ Style and Technique FAQ[/URL]

Member Avatar for mitrmkar
0
74
Member Avatar for LiquidScorpio81

[QUOTE=LiquidScorpio81;681300]how do i indent ? i press tab and it just tabs over to the reply button[/QUOTE] Indent using the space bar. And the simplest form of using [I]code tags[/I] is [noparse] [code] your code here ... [/code] [/noparse]

Member Avatar for VernonDozier
0
1K
Member Avatar for sciwizeh

[QUOTE=sciwizeh;680828]it's not doing anything, i am probably missing something, here's the relevant parts of the code: [code]void CALLBACK EXPORT TimerProc( HWND hWnd, UINT nMsg, UINT_PTR nIDEvent, DWORD dwTime ); BEGIN_MESSAGE_MAP(CGDI1View, CView) // Standard printing commands ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview) ON_BN_CLICKED(1,&OnButton1Clicked) END_MESSAGE_MAP() void CGDI1View::OnInitialUpdate(){ button1Rect.SetRect(250,50,400,100); button1.Create(_T("HI"),WS_CHILD | WS_VISIBLE | …

Member Avatar for sciwizeh
0
213
Member Avatar for DigitalPackrat

[QUOTE=DigitalPackrat;680806]We, want a simple source control system, as we are working in a collaborative mode.[/QUOTE] You might do well with e.g. Subversion or CVS.

Member Avatar for DigitalPackrat
0
202
Member Avatar for need_Direction

[QUOTE=kolhal;681147]I am a PHP guy and present my view only for php Professionals not for C++[/QUOTE] But please note that this is [I]strictly[/I] a C++ forum.

Member Avatar for mitrmkar
0
146
Member Avatar for tootypegs

You need to apply the LVS_EX_FULLROWSELECT style to the listview control, see [URL="http://msdn.microsoft.com/en-us/library/bb774732(VS.85).aspx"]Extended List-View Styles[/URL]

Member Avatar for mitrmkar
0
215
Member Avatar for Ancient Dragon

[QUOTE][URL="http://searchsecurity.techtarget.com.au/articles/26194-Black-Hat-roundup-Vista-security-defeated-IOS-rootkit-DNS-flaw-worse-than-thought-#Vista"]Vista security rendered 'uselsess'[/URL] [/QUOTE] hmm, smells like hype, but let's see.

Member Avatar for R0bb0b
0
138
Member Avatar for gispe

[QUOTE=gispe;678365] [code=cplusplus] int _tmain(int argc, char* argv[]) [/code] and the errors are: [code=cplusplus] Linking... LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main [/code] [/QUOTE] You have to [ICODE]#include <tchar.h>[/ICODE]

Member Avatar for Salem
0
171
Member Avatar for toolmanx

Maybe your window is missing a [URL="http://msdn.microsoft.com/en-us/library/ms632600(VS.85).aspx"]style[/URL] that enables its sizing.

Member Avatar for toolmanx
0
301
Member Avatar for ehsan_op

[QUOTE=ehsan_op;674592] I am trying to write a multi threaded program in C++ , but it suddenly exits and i can not understand what happens , it actually do not get any error message or exceptions error , just get out of the program. [/QUOTE] Could it be so simple that …

Member Avatar for ehsan_op
0
146
Member Avatar for zawpai

Just out of curiosity, could you post the complete error message, i.e. including also the line number which causes this. I think your code should compile as such, so there is actually a problem with your compiler in this case (I suppose it is VC 6.0 or earlier?). In that …

Member Avatar for anilopo
0
395
Member Avatar for utmibnca2004

[QUOTE=findsyntax;675519] You should encourage the people to post their answers either it is [COLOR="Red"]useful or not[/COLOR][COLOR="Red"] is[/COLOR] the [COLOR="Red"]secondary [/COLOR]thing....[/QUOTE] I would rather emphasize that any answer [I]primarily[/I] ought to be useful and that should be considered before posting.

Member Avatar for mahlerfive
0
145
Member Avatar for waldchr

[QUOTE=waldchr;674981]Hi I was wondering how to create a window to run my programs in. It talks about it in many posts but I couldn't find anything on how to actually make one. I have no idea where to start so you will need to tell me pretty much everything (e.g. …

Member Avatar for Duoas
0
90
Member Avatar for T&T

Maybe [URL="http://www.cplusplus.com/reference/clibrary/cstdio/sprintf.html"]sprintf()[/URL] would be of use ... [code=c] char filename[20]; for(int ii = 0; ii < 10000; ii ++) { sprintf(filename, "passenger %04d", ii); // display the file name puts(filename); // try opening and processing the file here // ... } [/code]

Member Avatar for T&T
0
353
Member Avatar for Sukhbir

[QUOTE=Sukhbir;673818]I need to know Why there is need to operload () this.[/QUOTE] STL is one reason, some discussion/examples [URL="http://www.sgi.com/tech/stl/functors.html"]here[/URL]

Member Avatar for Narue
0
126
Member Avatar for murderotica

Since you are calling [ICODE]FreeLibrary(hLib);[/ICODE], maybe you've forgotten to (re)LoadLibrary(...)?

Member Avatar for murderotica
0
155
Member Avatar for murderotica

[QUOTE=murderotica;674455] [CODE] int _stdcall sampleFunc(int iVar, char cVar){ //Code here ... } [/CODE] [CODE] typedef int (*myFunc)(int, char); [/CODE][/QUOTE] Your myFunc typedef does not match the DLL function's signature because you've omitted the calling convention from the typedef (by default, VC++ uses the _cdecl calling convention). So you need to …

Member Avatar for murderotica
0
108
Member Avatar for nizam_khan
Re: Help

[QUOTE=nizam_khan;673752]Hi ! I m a new guy in software development. Recently i m assigned wit a job where i got to modify a C++ project built in Visual studio 6 to work in visual studio 2008! any one got any advise where should i start frm?[/QUOTE] MSDN has a number …

Member Avatar for nizam_khan
0
138
Member Avatar for Falkoner1

If you are on Windows, then you can use [URL="http://msdn.microsoft.com/en-us/library/ms686125(VS.85).aspx"]SetConsoleWindowInfo[/URL]

Member Avatar for Falkoner1
0
175
Member Avatar for FTProtocol

Don't [ICODE]#include "CServer.cpp"[/ICODE] in main.cpp. Instead [ICODE]#include "CServer.h"[/ICODE] and move the CServer:: stuff from main.cpp to CServer.cpp.

Member Avatar for mahlerfive
0
115
Member Avatar for conan19870619
Member Avatar for dmanw100

You can use also [URL="http://www.cplusplus.com/reference/iostream/stringstream/"]stringstream[/URL] to convert to int [CODE] int final; stringstream strm; char * value_a = "123456"; strm << value_a; strm >> final; [/CODE]

Member Avatar for ArkM
0
180
Member Avatar for BradenMurphy

You have to get there a [ICODE]const char *[/ICODE], which is what the [ICODE]c_str()[/ICODE] function gives you (i.e. hello.c_str()).

Member Avatar for BradenMurphy
0
268
Member Avatar for mancode1007

[QUOTE=ArkM;670386]About feof() in my snippet - it's absolutely safe and correct function call. [/QUOTE] What if the last line contains the id being searched for and that line does not end with a newline?

Member Avatar for jephthah
0
2K
Member Avatar for STUDENT#101

Please take the time you need to get familiar with [URL="http://www.daniweb.com/forums/misc-explaincode.html?TB_iframe=true&height=400&width=680"]code tags[/URL]

Member Avatar for mitrmkar
0
170
Member Avatar for The Buzzer

You are not trying to save anything to the file, i.e. there are no calls to any function that would write to the file. If you are familiar with printf(), try looking up [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fprintf.html"]fprintf()[/URL] and using it to write to the file. Last but not least, learn to use the …

Member Avatar for mitrmkar
0
142
Member Avatar for Narf!!!

The declaration only is not enough, so ... [code] // in ConjVector.cpp // initialize enMemoria to some value ... int ConjVector::enMemoria = 0; [/code]

Member Avatar for Narf!!!
0
94
Member Avatar for Wiki_Tiki

Would [URL="http://blogs.msdn.com/oldnewthing/archive/2007/01/12/1455972.aspx"]this[/URL] be of any help? You also need to convert the RichTextBox's Handle to a window handle (i.e. HWND).

Member Avatar for mitrmkar
0
270
Member Avatar for death_oclock
Member Avatar for pipisumthin

[QUOTE=pipisumthin;667653]I just learned how to copy a file, now the question is, how can you tell if a file has been copied or not? I think I need a command or a function that allows me to check whether if the copied file does exist in the destination folder. Can …

Member Avatar for WaltP
0
256
Member Avatar for nixon623

You might use the std::string class, see for example [URL="http://www.cplusplus.com/reference/string/string/operator+=.html"]string::operator+=[/URL]

Member Avatar for VernonDozier
0
145
Member Avatar for masterjiraya

[QUOTE=masterjiraya;668081]Hey thanks for that... :) I bumped my head on the wall for that... It only works single digit I dunno if there's a possible snippet or code that works also in more than 1 digit.... decimal value and exponents... do you have any tip for me?[/QUOTE] :icon_rolleyes: try to …

Member Avatar for mitrmkar
0
152
Member Avatar for vs49688

[QUOTE=vs49688;667878]The code is too big to paste here so if you want a copy of it email me at [email]vs49688@yahoo.com.au[/email] and ill email you a copy. [/QUOTE] An alternative is to zip the project and post it as an attachment.

Member Avatar for vs49688
0
80
Member Avatar for masterjiraya

[QUOTE=masterjiraya;667881]well here is the main code... [/QUOTE] :yawn: and [URL="http://www.daniweb.com/forums/thread96130.html"]here[/URL] is probably the original copy (without the copy/paste errors). Wouldn't it really be better for you to write the program from the ground up (in terms of really learning something) ?

Member Avatar for iamthwee
0
122
Member Avatar for soppyhankins

One obvious little error ... [ICODE]if( jump [COLOR="Red"]=[/COLOR] true )[/ICODE]

Member Avatar for soppyhankins
0
252
Member Avatar for Clockowl

Since you have [ICODE]printVector(vector<T> [COLOR="Red"]&[/COLOR] x)[/ICODE] pass by reference ... [ICODE]printVector( x );[/ICODE]

Member Avatar for Clockowl
0
109
Member Avatar for olagh

[QUOTE=olagh;666238] When I add default constructor to bigInt this problem is solved [/QUOTE] OK, that problem is presumably solved. [QUOTE] but object n is not created accurately and I got runtime exception while accessing n. What is my fault? [/QUOTE] I'm guessing that you are using the [I]pointer[/I] [ICODE]value[/ICODE] uninitialized/unallocated. …

Member Avatar for olagh
0
154
Member Avatar for anshulagarwal

When you post code, use code tags, i.e. [noparse][code=cpp][/noparse] < paste your code here in between the tags > [noparse][/code][/noparse] Below is a close-to-compilable version for e.g. VC 2005, the errors that are left, are about the usage of pow() and sqrt() functions. Your choice of argument types for these …

Member Avatar for jesseb07
0
147
Member Avatar for Clockowl

[QUOTE] I dereference them once to get access to LOD, but this doesn't seem to work. Why not? [/QUOTE] [I]Dereferencing[/I] was actually missing ... i.e. [code]if( [COLOR="Red"](*[/COLOR](visualEntity.begin() + i)[COLOR="Red"])[/COLOR]->LOD == wantLOD){[/code]

Member Avatar for Clockowl
0
99
Member Avatar for anshulagarwal
Member Avatar for the reaper

[QUOTE=Adak;663885]For Windows, you have to use Gotoxy(x,y), and include the right header file for it[/QUOTE] Just out of curiosity, in which header can one find [ICODE][B]G[/B]otoxy[/ICODE]?

Member Avatar for WaltP
0
260
Member Avatar for anshulagarwal
Member Avatar for krebstar

Your code probably should be doing what the comment there already says (without any iterator(s))... [CODE] else // it is a regular file, so [COLOR="Green"]push this onto our list[/COLOR] { fname = path + "\\" + ffd.cFileName; // assuming you have a FILENAME object ... aFILENAME.SetFullPath(fname); // now at to …

Member Avatar for krebstar
0
192
Member Avatar for chanda gul

If you are interested in what's on the floppy at certain location, you might use [URL="http://msdn.microsoft.com/en-us/library/aa365467.aspx"]ReadFile()[/URL].

Member Avatar for Salem
0
129
Member Avatar for jack1234

[QUOTE=Ancient Dragon;631866]It appears to be sort of like assert(), where you can add debugging comments which don't show up when the program is compiled for release mode.[/QUOTE] OutputDebugString works the same regardless of release/debug build.

Member Avatar for bugmenot
0
3K
Member Avatar for tootypegs

You need to pass in the [I]address of[/I] the DISK_GEOMETRY struct, not the struct itself.

Member Avatar for mitrmkar
0
108
Member Avatar for the reaper

[QUOTE=the reaper;661853]ive been trying to google it but i am not finding what i am looking for..also i am not the best when it comes to programming windows programs ..[/QUOTE] Unless you use modeless dialog boxes, as suggested by Ancient Dragon, you need to have multiple threads in order to …

Member Avatar for the reaper
0
115
Member Avatar for darkivader

You've gotten a bit confused about how to use the CreateWindowEx() function, the following should work ... [code] hList = CreateWindowEx( WS_EX_CLIENTEDGE, "ListBox", // the [COLOR="Green"]window class[/COLOR] here "Caption text ...", // needs WS_CAPTION style in order to be shown // .. see below [COLOR="Green"]WS_CAPTION[/COLOR] | WS_CHILD | WS_VISIBLE | …

Member Avatar for mitrmkar
0
168
Member Avatar for vedmack

[QUOTE=vedmack;660069] the problem is that after the ::SendMessage(hwnd, WM_GETTEXT, 256, (LPARAM)buf); line buf got a partial string of the window title (it cuts first characters) for example instead of "Continue" it hold "inue" and etc.... what could be the problem? [/QUOTE] You seem to be experiencing what MS has (vaguely) …

Member Avatar for Ancient Dragon
0
140

The End.