1,174 Posted Topics
Re: [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 … | |
Re: [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] | |
Re: [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] | |
Re: [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 | … | |
![]() | Re: [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. ![]() |
Re: [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. | |
Re: 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] | |
Re: [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. | |
Re: [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] | |
Re: Maybe your window is missing a [URL="http://msdn.microsoft.com/en-us/library/ms632600(VS.85).aspx"]style[/URL] that enables its sizing. | |
Re: [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 … | |
Re: 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 … | |
Re: [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. | |
Re: [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. … | |
Re: 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] | |
Re: [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] | |
Re: Since you are calling [ICODE]FreeLibrary(hLib);[/ICODE], maybe you've forgotten to (re)LoadLibrary(...)? | |
Re: [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 … | |
Re: [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 … | |
Re: If you are on Windows, then you can use [URL="http://msdn.microsoft.com/en-us/library/ms686125(VS.85).aspx"]SetConsoleWindowInfo[/URL] | |
Re: 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. | |
Re: If the file happens to be empty, then Ed really rules here ;) | |
Re: 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] | |
Re: 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()). | |
Re: [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? | |
Re: 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] | |
Re: 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 … | |
Re: The declaration only is not enough, so ... [code] // in ConjVector.cpp // initialize enMemoria to some value ... int ConjVector::enMemoria = 0; [/code] | |
Re: 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). | |
Re: Have you tried doing the DxDiag.exe tests? | |
Re: [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 … | |
Re: You might use the std::string class, see for example [URL="http://www.cplusplus.com/reference/string/string/operator+=.html"]string::operator+=[/URL] | |
Re: [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 … | |
![]() | Re: [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. ![]() |
Re: [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) ? ![]() | |
Re: One obvious little error ... [ICODE]if( jump [COLOR="Red"]=[/COLOR] true )[/ICODE] | |
Re: Since you have [ICODE]printVector(vector<T> [COLOR="Red"]&[/COLOR] x)[/ICODE] pass by reference ... [ICODE]printVector( x );[/ICODE] | |
Re: [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. … | |
Re: 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 … | |
Re: [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] | |
Re: You need to [ICODE]#include <iomanip>[/ICODE] | |
Re: [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]? | |
Re: 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 … | |
Re: 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]. | |
Re: [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. | |
Re: You need to pass in the [I]address of[/I] the DISK_GEOMETRY struct, not the struct itself. | |
Re: [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 … | |
Re: 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 | … | |
Re: [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) … |
The End.