|
Supriya Tonape wrote: ...still why 234 error ?
It's not an error, but means that more data is available.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I just traced my code and found that for every character it's taking 2 bytes.. and I am allocatiing buffer as per length returned by 'RegQueryInfoKey' which returned length of longest value data... for example actual date string/data(REG_SZ) length is 20 but when 'RegEnumValue' gets the date string/data, the length returned is 40(in last param of 'RegEnumValue').... So I doubled my buffer's size but still it gives me same problem... any suggestions ? I am running my 'console' appln on 32 bit intel proc with 32-bit XP OS on it...
|
|
|
|
|
|
I resolved the prob, after each call we need to set the data buffer size back to max value length... sadly this is not quoted in MSDN! it's hard to understand whats going on wrong in code when MSDN says everytime 'RegEnumValue' iterates thru reg values,it returns the data length... I wasted my night for this silly problem...
|
|
|
|
|
...
I will try that. But I have alread wasted a whole weekend until I see your post
...
|
|
|
|
|
Hi all..
I have one file and i want to move it to the temporary path....
can anyone help me..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
manju#123 wrote: can anyone help me..
With moving the file or figuring out what your temporary folder is?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Use the GetTempPath() function to retrieve the path of the temporary files directory - see the documentation here.
Then to copy the file use the CopyFile() or CopyFileEx() function to copy the file to the temporary directory.
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Hi,
I'm in need of a conversion routine to convert a string into a integer(long). I'm relying on CRT function _tcstol to do this. Below shown is my approach:
main()
{
_TCHAR *q = 0;
char txt[] = "5x";
long l = _tcstol(txt, &q, 10);
if (q && _tcsclen(q))
{
cout<<"Invalid Integer";
}
}
I'm relying on parameter2 in _tcstol to validate a integer. (i.e)the endptr Pointer to character that stops scan.
Will this approach work fine in all cases?
Thanks in Advance
Rane
|
|
|
|
|
Hello,
yes, I would do the same as you did for converting a string to an integer. By the way, have you looked at this thread[^]?
Best regards,
Mihai Moga
|
|
|
|
|
Hi all,
i m using SDI type application.
If i m change Screen resolution thru display properties of computer than it takes effect on my application.
the all forms and control size are varies.
so please tell me how can i adjust size of all forms,dialog or controls even if i change screen resolution.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hello,
I do not know if there is an easy way to solve your problem. I think you need to call CWnd::SetFont[^] method for all your dialogs.
Best regards,
Mihai Moga
|
|
|
|
|
Please explain me with example how can i do this .
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
You can make your font with CreateFont and then use of SetFont for your controls.
|
|
|
|
|
i m try this but its take no effect.
presently i m using 1024by768 pixels screen resolution.
if i change this resolution to 800by600 pixels than all windows are looks bigger .
so i want if i change the resolution the application dilogs and controls are itself resize.
so please help me for this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Okay so I need to use the linked list class provided in the standard template library but when I do I get the error message "fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory.
C:\Program Files (x86)\STL\include\stl_algobase.h Line 57"
For some reason this file wasn't provided with my copy of Visual Studio 2008 (Express Edition) I did however get the file "iostream" distributed with visual studio but renaming this is futile as the two files are fundamentally different.
What to do?
|
|
|
|
|
The headers whose names end in .h are from the (very very) old standard library. In fact, it sounds like 2008 doesn't even ship them anymore. Use the files without an extension.
|
|
|
|
|
the problem is that the file is #include d in stl_algobase.h. I can manually change it but it breaks the STL. Am I missing something here? Am I meant to be using a list class that is already included with visual studio or is the STL list the one I should be using?
|
|
|
|
|
Sounds like a bug in the Express edition. Are you running SP1?
If you don't get an answer here you could try posting on the MSDN forums. I can't believe something this basic doesn't have a fix.
Kevin
|
|
|
|
|
I don't recall downloading a service pack for visual studio but according to the "About" entry in the help menu I am running version 9.0.21022.8 RTM.
I managed to locate the standard template library in my visual studio folder (Previously I was just looking in the microsoft windows sdk folder) so I deleted the copy of STL that I downloaded and made sure it was using the default one provided with my compiler. This seems to have fixed that problem but now when I compile I get the following error message
Error 1 fatal error C1189: #error : STL/CLR can be used only in code compiled /clr, clr:pure, or /clr:safe C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 6
I have tried all three command line parameters but with each one I get one of the errors;
Error 1 Command line error D8016 : '/EHs' and '/clr' command-line options are incompatible cl<br />
Error 1 Command line error D8016 : '/EHs' and '/clr:pure' command-line options are incompatible cl<br />
Error 1 Command line error D8016 : '/EHs' and '/clr:safe' command-line options are incompatible cl<br />
/EHs appears to be embedded into the win32 build options and there seems to be no way for me to remove it (and I also have no clue what it is!)
|
|
|
|
|
Are you really trying to do a C++/CLI (managed) app or a native app?
For C++/CLI, you should be using /EHa
If you're using the IDE, it should be at
project settings/Configuration Properties/C++/Code Generation/Enable C++ Exceptions
For STL:
According to the Standard C++ Library Overview[^], <list>
may be the header file you want.
For STL/CLR:
STL/CLR Library Reference[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I've never been sure of what managed c++ refers to but I'm under the impression it means working with the .net framework? If so, then no I am not writing a managed c++ app.
The header file you mentioned is the one I am now using as I posted earlier but that's what is giving me the new error "STL/CLR can be used only in code compiled /clr, clr:pure, or /clr:safe", and subsequently the other three errors when compiling with those switches.
So am I meant to be using the standard template library in a native c++ project or not? It doesn't appear to be compatible judging from the errors its spitting out.
Perhaps I should just write my own linked list template class.
|
|
|
|
|
Sauce! wrote: I'm under the impression it means working with the .net framework?
Correct.
Sauce! wrote: So am I meant to be using the standard template library in a native c++ project or not?
Yes. What I can't figure out is why you're getting an error that mentions
STL/CLR (which is for managed .NET code) if you're not compiling code managed.
Can you post some sample code using an STL list class that
fails?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
"can you post some sample code using an stl list class that fails?"
#include list
NOTE: I left out the <> tags around list on purpose as the forums were interpreting it as a html list tag.
lol seriously I just opened up a new project in visual studio, chose the "empty project" option, added an empty "main.cpp" and typed that one line and voila! I get the same bloody error!
So something is very wrong. :S happens in both release and debug mode.
Just to check, I created a second empty project, but chose "CLR empty project" instead, pasted the same code into the empty "main.cpp" file, and compiled. I got the following errors:
Error 1 error C2039: 'input_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 295
Error 2 error C2039: 'output_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 302
Error 3 error C2039: 'forward_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 309
Error 4 error C2039: 'bidirectional_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 316
Error 5 error C2039: 'random_access_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 323
Error 6 error C2039: '_Int_iterator_tag' : is not a member of 'std' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cliext\xutility 330
This is quite strange...
|
|
|
|
|
Is the STL even included with the express edition of VS?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|