all groups > visual c > september 2007
Filter by week: 1 2 3 4 5
com or not com
Posted by xCal at 9/30/2007 10:02:07 PM
Hi group
what can i do to know if a given .exe or .dll file, is com or not?
thanks very much in advance, Carlos.
... more >>
VS2005 Data and Connection Wizzard?
Posted by newscorrespondent NO[at]SPAM charter.net at 9/30/2007 12:12:18 PM
The data and connection wizzards of VS2005 result in the connection string
being put in the application config file. I have an application where I
would like to provide connection string information from a class that I
write. I cannot find a way to replace the work done by the settings class
... more >>
need a link!!
Posted by -|e|=5F| at 9/30/2007 4:26:58 AM
hi all!
I m a new user of VC++.NET. Can you please give me some good ebooks
link for this? I want to learn it much sooner.
... more >>
About error C2248
Posted by Frank at 9/29/2007 10:53:36 PM
Hello!
I defined a class(CMyView1) based on CView from class wizard in VC2005, and
there're following code in .h file:
....
....
protected:
CMyView1(); // protected constructor used by dynamic creation
virtual ~CMyView1();
....
....
and then in MainFrm.cpp , there'... more >>
How to remove a class from project
Posted by Frank at 9/29/2007 12:00:00 AM
Hello! I'm using VC2005, I wonder to know how to remove a class from my
current project.
... more >>
convert LPWSTR to LPTSTR
Posted by Abhishek at 9/28/2007 7:22:05 PM
how do i convert LPWSTR to LPTSTR
thanks in advance for helping
regards
Abhishek
... more >>
How do I create a Generic.List?
Posted by Arcadefreaque at 9/28/2007 6:32:47 PM
I'm realizing how little I know about C++ today as I try to convert
some functionality from VB.Net to C++.
I have a procedure that I need to pass a List of objects to, and
cannot see how to do this using C++. It's easy in VB.Net, so I'm
hoping it is just my silly misunderstanding of c++ that ... more >>
Converting a mini C# program to a standalone (C++) binary
Posted by Ted Lyngmo at 9/28/2007 6:15:38 PM
Hi!
I'm new (but please do continue reading) to C++ in the VS environment
and wanted to create a standalone program (or preferably, a static
library, compatible with other Windows compilers) that;
1. Takes an URI as an argument.
2. Prints the proxy for that URI to stdout (or in the static... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Maximum number of Hyperlinks?
Posted by Ridgeway at 9/28/2007 12:03:02 PM
I am using PowerPoint 2000 with a very large presentation with many
Hyperlinks, mostly to other slides but many also to Internet links.
Recently, some of them are not working. I correct them on the live
presentation and get them to work then, when saved and re-loaded the same
ones do not w... more >>
Images from files shrink?
Posted by Peter Oliphant at 9/28/2007 9:21:24 AM
I created a BMP file called 'map.bmp' that is 50x50 pixels in size. I then
execute the following code:
Image_List = gcnew ImageList() ;
Image_List->Images->Add( Image::FromFile( "map.bmp" ) ) ;
button = gcnew Button() ;
button->ImageList = Image_List ;
button->ImageIndex = 0 ;
I al... more >>
Help with WriteFile and ReadFile
Posted by Robe at 9/28/2007 6:04:01 AM
Hi,
I need to send and receive data through RS-232 port in a synchronous way.
The problem is that the data packet I need to send and receive is huge so I
need to send and receive it in two or more segments.
But I need to do that with two functions one to read and one to send in such
a wa... more >>
Button missing BorderColor and BorderStyle?
Posted by Peter Oliphant at 9/27/2007 10:25:11 AM
I'm writing a program using MS VC++ 2005 Express [managed (CLI)], and I use
the Button class.
For the most part, this is working fine. I can set BackColor, ForeColor,
Width, Height, etc. But if I try to us either 'BorderColor' or 'BorderStyle'
it says they aren't properties of Button!
H... more >>
Set selected item in combo box
Posted by Tim Kelley at 9/27/2007 10:14:26 AM
How do I programmatically select an time in a combo box? I can set the text
but it does not automatically set the selected property. There is a
SetCurSel() method but I don't know what the index of the item I want to
select(or how to find it).
Thanks
... more >>
Unlock the drive
Posted by Sony Kalkan at 9/27/2007 12:07:59 AM
Hi,
I want to unlock the drive programmatically ? is there an api
function
related to it. For instance, when i run chkdsk with /F parameter, i
get "drive in use" error . I want to unlock drive programmatically
and
execute chkdsk
Thank you in advance,
Sony.
... more >>
extern "C" is ignored
Posted by Toto at 9/26/2007 2:06:11 PM
Hello,
My DLL (VC 2005, unmanaged) contains an exported function AutoOpen, whose name
should be undecorated. I've used this declaration:
extern "C" __declspec(dllexport) int WINAPI AutoOpen(void)
In spite of extern "C", the name of this function is still decorated in the DLL
(_AutoOpe... more >>
VC++2003.NET to Visual Studio EXPRESS
Posted by pmbcan at 9/26/2007 12:28:19 PM
I have a project written in VC++ 2003.NET which uses MFC classes.
I have ONLY VC++Express2005. I can open the VCProject file sucessfully. The
conversion takes place without any error. BUT the project is not Building
using VC++Express2005. The error is as follows:
1>Compiling...
1>StdAfx.c... more >>
Set text of an edit control (newbie)
Posted by Tim Kelley at 9/26/2007 10:38:56 AM
How do I programmatically set the text of an edit control?
Thanks.
... more >>
C++/CLI DateTime method argument
Posted by soren.enemaerke NO[at]SPAM gmail.com at 9/25/2007 8:49:20 PM
Hi everybody.
I'm writing a .NET wrapper class for a native C++ library and decided
to do it in C++/CLI. One of the problems I ran in to is the following.
In C++ I have the following
public ref class MyClass
{
....
bool DoIt(DateTime^% date);
bool DoIt2([OutAttribute] DateTime^% date)
... more >>
Getting Beta Software on a DVD
Posted by King Coffee at 9/24/2007 7:38:17 PM
Hi,
I wanted to get the Visual Studio 2008 Pro (Beta 2) software, at lease the
C++ subsystem. The Microsoft web site has it as a free download. The problem
I'm having is that it is to large to download by dial-up. Its over 3 GBs. I
was wondering, due Microsoft have supporters that mail soft... more >>
restoring a minimized window
Posted by ray well at 9/24/2007 6:51:31 PM
i need to restore an external app's minimized window whose handle i know,
from within a different running app.
how would i do that?
thanks for any help
ray
... more >>
Exposing bool to non-MS, non-C++ callers
Posted by Bob Altman at 9/24/2007 6:23:47 PM
Hi all,
Suppose I export a function or a structure from a standard DLL that uses the
C++ "bool" data type. The documentation states that, as of C++ 5.0 and
later, Visual C++ implements bool as a 1 byte data type. If someone puts a
value other than 1 or 0 into the byte and calls into my co... more >>
Looking for a good reference book
Posted by Bob Altman at 9/24/2007 6:17:27 PM
Hi all,
A friend of mine is an experienced MFC programmer. He as recently gotten
".Net Religion", but he can't find a good reference book that presents basic
Windows Forms programming techniques that he can relate to his MFC skills.
He is currently programming in both C++/CLI and VB.Net. ... more >>
How to find closing brace?
Posted by Bob Altman at 9/24/2007 5:08:01 PM
Hi all,
In the VS 2005 IDE, is there an easy way to navigate to the closing brace
for a given openeing brace in the source code?
TIA - Bob
... more >>
MSVCR80.DLL version conflict
Posted by Mike Blake-Knox at 9/24/2007 12:39:24 PM
I have a C++ ActiveX control that is used by JavaScript code in
Internet Explorer. Recently, a customer installed Acrobat Reader 8.1
and reported that the ActiveX control wasn't working. In the event
viewer, there's a error from SideBySide: "Generate Activation Context
failed for ... . Refer... more >>
Problems #include'ing a file
Posted by Todd Dobmeyer at 9/24/2007 10:44:02 AM
I am working on developing a program using Visual Studio 2003 but am having
problems getting my program to find my GL.h and GLU.h, and I am guessing it
will have the same problems trying to link to the .lib and .dll files. What
do I all need to do to get this to properly compile and link. Here... more >>
Photoshop, JPG, and transparent color
Posted by Peter Oliphant at 9/24/2007 9:15:54 AM
I'm trying to create 'sprites', which are graphic objects with shapes other
than just rectangles. As such, I need to be able to establish a transparent
color.
So, I create images using Photoshop, make the area I want transparent black.
But when I store them as jpg files, it seems to store i... more >>
C++/CLI protected delegate
Posted by wpcmame at 9/23/2007 11:30:02 PM
The following code
public ref class X
{
protected:
delegate void D();
void F(D^ a) { }
};
gives warning C4677: 'F': signature of non-private member contains assembly
private type 'X:D'
In another assembly the following code (C#) works fine:
public class Y : X {
public void Ca... more >>
Release version crashes on the Multi-CPU system
Posted by David Yang at 9/23/2007 5:38:02 PM
I have a C++/C++.net application. Release version crashes on the Multi-CPU
box but Debug version works well. And release version works well on
single-cpu box.
Any idea? ... more >>
C++/CLI static class and literal
Posted by wpcmame at 9/23/2007 12:58:00 PM
Why does the following code
public ref struct X abstract sealed {
literal int Y = 1;
};
give the error C4693: 'X' a sealed abstract class cannot have any instance
members 'Y'?
In the help it says that literal implies static.
... more >>
Resgen.exe error (error PRJ0002 : Error result -532459699 returned from 'C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\resgen.exe')
Posted by SQACPP at 9/23/2007 12:12:59 AM
I have an error when compiling a simple form project...
I just start a new Form project and add a new PictureBox in a form(or
anything that generate the .resx file)
After that when compiling I always get the following error (in VS
2005):
Compiling...
blablabla.cpp
Compiling managed re... more >>
VS2008 b2: "error C2813: #import is not supported with /MP"
Posted by Nikolay Belyh at 9/22/2007 3:57:19 AM
Why?
I mean, why #import is not supported with /MP?
Or how do I get round this? Beside from removing /MP, of course =)
Kind regards, Nikolay
... more >>
How to get DialogBox BkColor? Thanks!(Win32 SDK)
Posted by duwei at 9/22/2007 12:00:00 AM
I got a example, it GetBkColor from a HDC(the dc get from a DialogBox), but
it BkColor always color white, dialogbox default BkColor is color like gray,
how can I do to get the correct color for dialogbox? Thanks!
... more >>
C2440 on COM_INTERFACE_ENTRY
Posted by Mash at 9/20/2007 12:21:29 PM
For the following
BEGIN_COM_MAP(I_Command)
COM_INTERFACE_ENTRY(ICommand)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
END_COM_MAP()
I get the error
error C2440: 'static_cast' : cannot convert from
'... more >>
Problems returning an int Array pointer
Posted by Peter Oliphant at 9/20/2007 10:13:39 AM
Below are the definitions of two classes. VList creates two static integer
arrays (v_0, v_1), creates an array of pointers to these arrays (vlist), and
has a public method to return a pointer to the corresponding integer array
based on its index into vlist (Element( index )) .
MyClass conta... more >>
Help - Missing manifest file
Posted by RD at 9/19/2007 3:24:03 PM
I'm working on migrating my VC++ 6.0 project to VS C++ 2005 and I'm bulding
the project using NMAKE from the command line. The code is not GUI, all
console utilities and services. I've managed to compile/build the code but
couple of places in my build tree I don't see manifest file along with ... more >>
"union" syntax
Posted by Bob Altman at 9/19/2007 11:52:08 AM
Hi all,
I'm struggling to do something really basic. How do I declare a structure
that has a union that maps an array of 3 chars with 3 distinct char
variables. In other words, I want the following two statements to put the
same value into the same byte in the structure:
myStruct.Var... more >>
Initializing Arrays
Posted by Peter Oliphant at 9/19/2007 11:14:18 AM
I'm using VC++ 2005 Express in /cli mode, and I'm trying to initialize an
array of integers. Something like:
array<int> int_array ;
int_array = gcnew array<int>(3) ;
int_array = { 0x3, 0x9, 0x7 } ; // error here
How is this done? Thanx in advance...
... more >>
Breakpoints and Visual Studio 2005
Posted by Norman Diamond at 9/19/2007 12:00:00 AM
One Visual Studio 2005 solution contains a C# project and C++ ATL DLL
project. The DLL compiles fine, gets registered automatically, gets
referenced correctly when the C# program compiles, and gets called correctly
during execution. So far, so good.
During execution of the DLL, a call to ... more >>
String^
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/18/2007 9:47:51 PM
I need to expose a String property, so I have:
property String^ Filename;
in my ref class. Now, in a member function, I need to call a native
function that takes a std::wstring parameter. Of course, the compiler
is complaining of me trying to convert String^ to std::wstring.
What is the... more >>
MouseButtons
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/18/2007 6:14:47 PM
Petzolds C# book has code like this:
(mea.Button & MouseButtons.Right != 0)
I try the C++/CLI analog:
if( (e->Button & ::MouseButtons::Left) != 0 )
but get errors:
error C2678: binary '!=' : no operator found which takes a left-hand
operand of type 'System::Windows::Forms::MouseButto... more >>
intellisense
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/18/2007 5:56:26 PM
I made a control library project using Visual Studio 2005 with C++/
CLI. I now have my code working and running, but none of the
intellisense works. Is there a setting I need to turn on, or is the
intellisense for C++/CLI not good?
... more >>
library and pure
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/17/2007 8:14:12 PM
I am building a control library in C++/CLI. My project links with a
native library and am getting an error that the library cannot work
with pure:
dxerr.lib(dxerr.obj) : fatal error LNK1313: ijw/native module
detected; cannot link with pure modules
I am fine switching to CLR mode, but I ha... more >>
Expression evaluation using __int64
Posted by Jeff Bean at 9/17/2007 5:40:01 PM
I need to compute a 64 bit file offset which will get passed to the _lseeki64 function.
The inputs to the offset calculation are all unsigned shorts or unsigned longs. For example:
unsigned short page_size;
unsigned long page_index;
unsigned long page_offset;
__int64 file_offset;
file_offs... more >>
Linking a .Net Dll that uses .net framework in VS6
Posted by EvanK at 9/17/2007 1:28:32 PM
Is there a problem linking a .net C++ dll that relies on .net framework with
an application that is developed and compiled in VS6 C?... more >>
C++/CLI control null exceptions
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/17/2007 12:32:07 PM
Hello group,
I'm making a custom control in C++/CLI. The control builds fine. To
test the control, I made a C# Forms application. On the Toolbox, I
right clicked and chose "Choose Items". I then browsed for my control
DLL and added it. The custom control now shows up in the toolbox. I
t... more >>
Win32 API functions?
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/17/2007 9:54:49 AM
I moved some unmanaged C++ code into a C++/CLI project. The unmanaged
code makes some Win32 API calls. I thought as long as I kept the API
calls in a native class, it would integrate seamlessly. However, I am
getting a whole bunch of linker errors with regards to the API calls:
Example:
... more >>
native/managed
Posted by dragonslayer008 NO[at]SPAM hotmail.com at 9/17/2007 9:37:09 AM
I recently added some new code files to a C++/CLI project. The added
code is all native. I simply added the code to the project and built
it. It compiled fine but I am getting the linker error:
LNK2022: metadata operation failed (8013118D) : Inconsistent layout
information in duplicated typ... more >>
Does this mean .dll is "loaded"?
Posted by Mr. Magoo at 9/17/2007 9:26:19 AM
If I see a certain .dll path as shown in the example below:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls\C:\WINDOWS\system32\mydll.dll
Does it mean that the presence of hte registry key above makes such
mydll.dll is "loaded", registered or running?
I am evaluating an appication... more >>
Newbie looking for Knowledge Base Example
Posted by Im Going Mad at 9/17/2007 12:00:00 AM
Hi There,
Hope your all well? I just wonder if anybody knows where I can find a
downloadable Knowledge Base or Helpdesk using Winforms with Code for either
C++, C#, or even VB? Needs to either have a Access Database or use XML. I`ve
search on Google but to no avail.
Hope somebody can hel... more >>
tracking down random memory clobbering, any tools/tips?
Posted by Jonathan Wilson at 9/17/2007 12:00:00 AM
I have a closed source app. I have a .dll plugin for this app (which I am
writing). This plugin contains a bug somewhere which seems to clobber
memory in a "random" fashion (as in, its not clobbering any specific
identifiable piece of memory that I can breakpoint on or anything). Are
there a... more >>
|