all groups > visual c > december 2003 > threads for december 8 - 14, 2003
Filter by week: 1 2 3 4 5
Exception Handling
Posted by Rick at 12/14/2003 9:10:42 PM
Hi,
I have a VC++ application I have been assigned to modify. The app is getting
exceptions from time to time. The current code uses Try / Catch(...) for
exception handling. When the catch is processed it simply sets the Hresult
to e_fail. I'd like to put in some code that would give me the ex... more >>
My vc++ is insane, please help me.....
Posted by RocketDodger at 12/14/2003 8:31:05 PM
VC++ refuses to recognize stream classes (such as ofstream and ifstream) when I compile. I wrote the simplest program possible to diagnose the problem and I still have no idea what is going on. I include <iostream> and <fstream> and still get unrecognized identifiers in response to ofstream decla... more >>
program creash on Japanese IME 2000
Posted by haibo NO[at]SPAM haibo.com at 12/14/2003 4:36:14 PM
Hi, Gary, I recompile my code under UICODE setting and it
seems that it still crashes under Janpanese Language
input. It is strange, it can run on that machine, but as
long as Japanese IME is up, it will creash my program
right away..
Any one know what else I am missing or something else ... more >>
upgrade my VC++ .net 2002 to 2003
Posted by gif at 12/14/2003 6:51:59 AM
Questions on C++ .NET, and .NET in general
Posted by OneSolution at 12/14/2003 3:43:19 AM
Hi all,
I'm writing because I haven't been able to find enough information at the
book stores and at the MS web site on some of my questions. Perhaps I'm
asking the wrong questions, but if you could help me out here, I'd really
appreciate it.
One of my clients uses Visual C++ 6.0 extensive... more >>
Compiler template bug in VC++ 7.1 with pointer to members
Posted by Gianni Mariani at 12/14/2003 12:22:52 AM
I believe the code below is compliant with the C++ standard. GCC and
Comeau compiles this code without complaint however VC++ 7.1 has a
number of silly complaints.
Are there any known work arounds ?
template <typename T>
class foo
{
public:
typedef typename T::foo_inner foo_i... more >>
print source from within IDE print not correct
Posted by Baudewijn Vermeire at 12/13/2003 9:33:00 PM
I just subscribed to this forum.
When we print source code in VS.NET to a laser printer, all characters are
wrong.
Kind of control characters. We experience this on all our VS.NET
installations.
Printing from within VS 6.0 and Outlook works well.
Regards
Baudewijn Vermeire.
... more >>
bug with Visual Studio.NET pro - building on network share broken
Posted by Gianni Mariani at 12/13/2003 7:27:23 PM
I cracked open my vstudio .NET pro and tried to build some old sources.
I created a new project and to my amazement I could edit the files but
the compiler could not find them.
OK, so I created a virtual drive (net use x: \\share\blah) and opened
the exact same vcproj file and viola, a... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
VC++ .NET mostly unmanaged (machine language)?
Posted by Reshat Sabiq at 12/13/2003 1:11:00 PM
Hi,
I'm currently doing most of my development in Java. The
only reason i'm considering alternatives is because Java
is decompilable, and thus one's source code is
unprotected for the most part when shipped as a desktop
app (obfuscation is good, but i'd like it to be more
secure).
Do i... more >>
ScrollBar bugs in XP?
Posted by Dr. Kato at 12/12/2003 4:12:46 PM
I believe I have found a bug in XP, but it seems so bad
that it isn't even possible, so I am hoping some folks
here can help me verify or dispute it, which in the end
will benefit us all. Here is the deal.
I have created a simple MFC test app as such. Using the
new project wizard, create ... more >>
WinMain ???
Posted by Lloyd Dupont at 12/12/2003 3:14:41 PM
I don't understand !!!!!!
Sometimes VS.NET seems to compile fine with a "int main(int, char*)"
function
sometimes not...
worst recently I had a project which (for some reasons) didn't like "main()"
startup function and, copying from a similar project, I use the following
entry point:
in... more >>
Japanese IME is MS-IME2000
Posted by haibo NO[at]SPAM haibo.com at 12/12/2003 1:53:36 PM
additional info, the Japanese IME is MS-IME2000... more >>
bug report - error in default parameter resolution
Posted by Bronek Kozicki at 12/12/2003 12:51:38 PM
Visual Studio .NET 2003 is refusing to compile following code:
#include <cstdio>
namespace
{
struct Functor
{
template <typename X>
void operator() (X* px)
{
delete px;
}
};
Functor f;
}
template <typename T, T* pf>
struct del_functor_adaptor
{... more >>
Why the VC's MVPs Not heared this problem
Posted by Bill Sun at 12/12/2003 10:54:29 AM
Hi, all:
Following question have been submitted to new group by times, I did'nt
understand why there are any one can help me, even though say "Yes, you can
do ..." or "No, you can not to do..."
Bill
----- Original Message -----
From: "Bill Sun" <sunshang@hotpop.com>
Newsgroups:
mic... more >>
How do I pass a reference to a value type multi-dimensional array?
Posted by Ken Varn at 12/12/2003 10:47:18 AM
I have a function that I would like to pass a reference to a
multi-dimensional managed array so that the function can allocate the array
size. I am not sure how to do this. See below:
{
__value strict ST {int a; int b;}
ST MySt __gc[,];
MyFunc(MySt);
// At this point, I want MySt to... more >>
include files question
Posted by Sandrik at 12/12/2003 3:53:56 AM
Hi, I have question which might be more style question, as
I've never seen any discussion about this in any C/C++
books.
Is there a rules where to include files in .h or .cpp ?
What I usually do is if I have some xxx module, then all
the includes I do in xxx.h and xxx.cpp has only one
i... more >>
Problem with IDL imports
Posted by Babak Asadi at 12/11/2003 9:40:03 PM
Hi everyone,
I have an ATL Attributed project in VC++.NET 2002 and I'm having the
following idl import problem.
I have the following scenario:
__interface IMyInterface : IUnknown
{
[import("file.idl")];
.....
}
I set the path for file.idl in Project Properties->MIDL->Genera... more >>
Problem with String::Format
Posted by MT at 12/11/2003 7:34:03 PM
Does anybody know if String::Format is messed up in C++. Here's a line of
code:
Console::WriteLine(String::Format(new
System::Globalization::CultureInfo("en-US"), "{0} : {1} %", S"Haha",
__box(12.00)));
Here's the error I get:
error C2665: 'System::String::Format' : none of the 5 overloads... more >>
How to create systemwide hooks for keyboard (for keys like WIN, ALT+TAB)
Posted by Jigar mehta at 12/11/2003 7:17:12 PM
Hye,
How to create systemwide hooks for keyboard for keys like WIN, ALT+TAB,
CTRL+ALT+DEL even when the application does not have the focus on it...
Thanks,
... more >>
Need help with fatal C1509
Posted by Hendrik Schober at 12/11/2003 3:40:35 PM
Hi,
I have some header files that contain macros in a special
syntax. These files are used with various tools that
extract information from these macros. One of these tools
is cl.exe.
Basically, these files contain this:
MYMACRO( ID4711, 4711, "str4711_1", "str4711_2" )
MYMACRO( ID471... more >>
SetWindowPos
Posted by Ron at 12/11/2003 1:03:42 PM
I have a MFC COM Server that runs in the background.
There is no UI or dialogs other than an occasional
AfxMessageBox that might pop up with messages.
My problem is if the user is running any other app, the
MessageBox pops up behind other loaded windows.
So, I need to be able to set the... more >>
Images on VC.Net Forms
Posted by David Battams at 12/11/2003 10:37:31 AM
Hi there,
Quick question about VC.Net forms.
The second I add a picture pox with associated image to my form, my app goes
off into the weeds in the form designer code at the line where it tries to
read the image resource from the resource manager.
It's a mixed mode app, and I quickly work... more >>
Confused about configuring help system
Posted by Brian at 12/11/2003 12:01:08 AM
Hi,
I just installed the Visual Studio Pro .net trial and have been trying to
tailor the context sensitive help to how it behaves in VC6. I've set the
help system to external, but when I press F1 on say "CloseHandle," I no
longer am presented with a dialog that contains the various CloseHa... more >>
Editing resource in managed c++ - Question 2
Posted by Kaixin at 12/10/2003 6:26:13 PM
Hello,
In a managed c++ project, one can specify general information in the file
AssemblyInfo.cpp. For example, AssemblyCompanyAttribute and
AssemblyProductAttribute.
Can I see this information in the assembly's windows properties page, other
than viewing it as part of the assembly manifest... more >>
Editing resource in managed c++ - Question 1
Posted by Kaixin at 12/10/2003 6:23:23 PM
Hello,
Could someone please help me out?
How to add a version tab to an assembly's windows properties page for a
managed c++ project, without manaully creating a rc file and a user defined
rc2 file?
Thanks.
... more >>
PtrToStringChars in Vc7/include/vcclr.h
Posted by Eric Twietmeyer at 12/10/2003 4:27:28 PM
In the header file vcclr.h (in the .../Vc7/include directory of your
installation) there is an inlined function PtrToStringChars defined. This
is a utility function to get quick access to the internal chars of a
System::String object. I came across it by reading Peter Grimes's "Managed
Extensi... more >>
floating point calculation inaccurate?
Posted by Klaus Bonadt at 12/10/2003 4:11:56 PM
I have found strange behaviour in casting floating point values in C++ 6.0
to int:
If I enter in the watch window while debugging in version 6.0 the following
term:
(1.4 - 1.0) * 10.0
the result will be 4.0 - as expected.
But if I cast the same to int:
(int)((1.4 - 1.0) * 10.0)
the resul... more >>
Wrapping Unmanaged c++ classes in Managed C++
Posted by Paul Kenny at 12/10/2003 1:24:30 PM
Hi,
I am trying to expose the functionality of an unmanaged
C++ class to the other languages available in the .NET
Framework. I have decided to do this by wrapping the
unmanaged C++ class in a managed one. I have taken a look
at following sample code on how to do this.
http://longhorn.ms... more >>
Troubleshooting "Object reference not set to an instance of an object." Managed Exception. How?
Posted by Robert A Riedel at 12/10/2003 12:01:26 PM
I am completely baffled when the following managed exception is thrown:
"Object reference not set to an instance of an object" from a nested
subroutine when referencing a variable allocated on the program stack.
Given the following simple example:
void T( System::String * S )
{
const w... more >>
Urgent help needed! Raising events!
Posted by Catherine Jones at 12/10/2003 10:29:36 AM
Dear All
Please help me in the following issue:
how to raise an event from an unmanaged class to a
managed class.
Both classes are in C++ and there should not be any static methods involved
in this implementation.
ie. the event source is an unmanaged class and event receiver should be a
manag... more >>
dynamic array of pointers vs dynamic array of objects
Posted by lemonade at 12/10/2003 10:18:52 AM
Hello!
Can someone explain to me the difference between dynamic
array of pointers vs dynamic array of objects by giving a
real life example. Following is the code that I am using
for dynamic array of objects. I am skipping initialization
and other member functions.
class Inventory {
Ite... more >>
Mixed mode DLL and Loader Lock issue - revisited
Posted by Roy Chastain at 12/10/2003 8:42:01 AM
I have read and re-read KB 814472. There appears to be a little 1984
New Speak in it.
I am referring to option 3.
DLL that contains consumers that use managed code and dll exports or
managed entry points
The minitialize and mterminate functions are straight forward and make
sense. The pr... more >>
VC++ .NET Question
Posted by OneSolution at 12/9/2003 11:03:43 PM
Hi all,
Where do I go for questions and info on Visual C++ .NET?
Specifically, I'm trying to figure out how to use a DLL that's been made in
VB .NET. I want to import it into my C++ application and can't find
definitive documentation.
Thanks,
Santosh
... more >>
Populating a Combo box using a SqlDataReader
Posted by Neil Guyette at 12/9/2003 4:08:31 PM
Hello, Everyone,
I'm trying to find information on how to populate a combo
box using a SqlDataReader. I want to be able to set the
value of the combo's value property different then the
combo's text property (what the user will see). Is this
possible with a SqlDataReader?
Thanks
-... more >>
How to include an embedded (i18n) Resource.resx in MCPP Project?
Posted by Leon Gorbaty [Bentley] at 12/9/2003 3:41:19 PM
I'm surprised not to find this option under Add>New item, etc. It gives you
an option for a *.rc Resource file, but not a typical .NET resource. If I
add one manually, I don't see any way of specifying it to be an embedded
resource.
Anyone know?
Kind thanks in advance,
Leon
... more >>
How to access the HttpContext.Current.Request in C++ .NET Class library
Posted by Phil Ten at 12/9/2003 3:38:04 PM
Hello,
I am working on a .NET C++ project based on the
"Class Library (.NET)" wizard of Visual Studio .NET 2003.
I would like to know if my .NET component is running
in a ASP.NET page (.apsx file), and if it is the case I would
like to execute a specific task based on the current
HTTP requ... more >>
How to using ADO in the VC7 of .Net 2003
Posted by Bill Sun at 12/9/2003 2:56:20 PM
Hi,
I want to compile the MS's program: ADOXCreateDatabaseX.cpp on VC7
of .Net 2003. The compiler always told me:
c:\project\console\console\Debug\msado15.tlh(2374) : error C2059: syntax
error : '-'
c:\project\console\console\Debug\msado15.tlh(2374) : error C2238: unexpected
token(s) ... more >>
How do I REset a managed array????
Posted by 0to60 at 12/9/2003 2:45:25 PM
I can declare and initialize a managed array of managed types like this:
System::Object* array __gc[] = {...}
Now, what do I do if I wanna reset that array to something else without
redeclaring it? I can't seem to just say something like
array = new __gc[] = {...}
or
array = {..... more >>
Visual C++ 2.0
Posted by bkohan at 12/9/2003 12:16:11 PM
I have the disks for Visual C++ 2.0 but no product key. Where can I get this??... more >>
Overlapped I/O on XP
Posted by donna rigas at 12/9/2003 11:16:11 AM
Hi -
I'm using overlapped i/o on Windows 98 and on XP
and am getting different results.
Here's the code snippet:
// read the command id and the message length
BOOL rc;
ResetEvent(m_SerialRecvOL.hEvent);
rc = ReadFile(m_hSerialPort, &buf[1], 6, pBytesRead,
(LPOVERLAPPED) &m_Ser... more >>
How to get rid of the fatal error about iostream
Posted by Bill Sun at 12/9/2003 11:10:27 AM
Hi,
I just want to using a console application in the .net enviroment.
Before the main(), I using the
#include "iostream.h"
but the .net tell me:
c:\project\console\console\console.cpp(11): fatal error C1083: Cannot open
include file: 'iostream.h': No such file or directory
By the way... more >>
Profiler for C++ in 7.1
Posted by Bailey at 12/9/2003 11:09:19 AM
Anybody know how to profile a c++ program compiled in 7.1?
(unmanaged)
Seems the old tools are gone!!!!... more >>
CString.FormatMessage and CString.Format difference
Posted by Hai Ly Hoang [MT00KSTN] at 12/8/2003 8:22:36 PM
CString.FormatMessage and CString.Format has the same parameters and they
seems to have to outcome. However, they coexist !. There must be some subtle
different between they.
Can you tell me the difference ?
Thank a lot
... more >>
using CFileDialog to select a path?
Posted by viyi at 12/8/2003 7:21:07 PM
The normal CFileDialog can only be used to select a file, can i use it to select a path?... more >>
'Enable3dControls' : is not a member of 'CWinApp'
Posted by Dan Trowbridge at 12/8/2003 5:59:09 PM
Hi All,
I'm in the middle of porting code to VS.NET from VS6.0. My code compiles
fine under DEBUG mode but under RELEASE mode I get a compile-time error:
C:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\atlmfc\include\afxwin2.inl(1034) : error C2039: 'Enable3dControls'
: is not a mem... more >>
Encoding ISO-8859-1 will not work
Posted by Robert-Paul at 12/8/2003 1:23:02 PM
I have some big trouble getting special characters right when reading from a
mailbox. I have a class that reads e-mails from a mailboxusing pop3
(language C#). I have tried various approaches from suggestions that I have
received from newsgroups.
Here's a small sample from how the e-mail looks... more >>
Unable to find DLL
Posted by Nayan at 12/8/2003 1:09:36 PM
Hi,
I m building a project solution with correct output settings for executable
and supporting DLLs. But the debug executable asks for a DLL which is
*Release* DLL and not *Debug* DLL.
I opened up the EXE in dependency viewer and it showed that the app requires
Release DLL (which I didn't make ... more >>
Is there an option/setting to turn off the task list
Posted by patila NO[at]SPAM grex.org at 12/8/2003 12:01:55 PM
Hi,
After a compile, if there are errors, the task list window pops up
automatically. This is annoying. I'm happy with the error list in the
output window like VC++ 6. So is there an option or setting to turn
off this behaviour.
Thanks in advance.
- AP.... more >>
Sucessfull Compilation but Build Fails with FATAL Error Please help
Posted by Vishal Saxena at 12/8/2003 9:44:39 AM
Hi,
I am new to this news group, hope to get prompt solution from you, gurus of
VC.
Well i had a project developed in VC++ 6.0, it uses Adobe Plugin Development
SDK, I am trying to upgrade my project to VC++.NET,
below is the code snipplet from the project
#if WIN_PLATFORM // WIN ONLY
... more >>
Display GIF images
Posted by Gheorghe Arama at 12/8/2003 6:07:11 AM
I need to display a GIF image in a MS VC++ 6.0 developed
application. Is there a way to do that? Is there a
component/class I can use?... more >>
Installing version 6.0
Posted by Duncan at 12/8/2003 5:21:05 AM
Hi,
I have a development app that needs a registry hook created by installing VC++ 6.0 but I do not have a copy of this version. I have bought VC++ .NET Standard 2003 and this hasn't done the job but was wondering if it is possible to use the license key from the version I own to install version ... more >>
|