|
Mark Salsbery wrote: What version of Visual Studio?
Visual Studio 2005
Mark Salsbery wrote: What SDK version are you using?
Microsoft Platform SDK for Windows Server 2003 R2
For your information, everything works fine with VC++ MFC and the problem now facing is with VC++ Windows application forms.
|
|
|
|
|
bhanu_8509 wrote: Windows application forms
As in .NET Forms (C++/CLR)?
In your VS settings (Tools/Options/Projects and Solutions/VC++ Directories)
are the header and lib folders for the PSDK searched BEFORE the default VS SDK
folders?
Do you use a stdafx.h file? If so, what's in there exactly?
|
|
|
|
|
Mark Salsbery wrote: As in .NET Forms (C++/CLR)?
I cant understand it. Please kindly explain me.
Mark Salsbery wrote: Do you use a stdafx.h file? If so, what's in there exactly?
#include <initguid.h>
#include <Strmif.h>
#include <Dshow.h>
Mark Salsbery wrote: In your VS settings (Tools/Options/Projects and Solutions/VC++ Directories)
are the header and lib folders for the PSDK searched BEFORE the default VS SDK
folders?
In the directory settings PSDK directories and libraries are included at the last ( I mean after the default VS SDK ).
Thanks for your prompt reply. I need some assistance very much to solve this issue.
|
|
|
|
|
That's all that's in your stdafx.h file?
bhanu_8509 wrote: In the directory settings PSDK directories and libraries are included at the last ( I mean after the default VS SDK ).
They need to be at the top! You want the headers and libraries from the PSDK Server 2003R2,
not the ones included with VS2005.
Note that in VS2008, the SDK is up to date with the addition of DirectShow, so the secondary
PSDK isn't necessary.
|
|
|
|
|
Mark Salsbery wrote: They need to be at the top! You want the headers and libraries from the PSDK Server 2003R2,
not the ones included with VS2005.
I got 88 errors after specifying PSDK above all. One of the error is
1>C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\strsafe.h(431) : error C3641: 'StringCchCopyA' : invalid calling convention '__stdcall ' for function compiled with /clr:pure or /clr:safe
Please advice.
|
|
|
|
|
bhanu_8509 wrote: Please advice.
The PSDK is native code right? You can't compile native code in a Pure managed project. The project has to be set up for mixed mode to use native code.
led mike
|
|
|
|
|
Can you please explain how to do this.
|
|
|
|
|
Can you please tell me how to do this. Please...
|
|
|
|
|
bhanu_8509 wrote: Please advice
See led mike's reply.
|
|
|
|
|
By the way, I just realized you're asking in the Managed C++/CLR forum,
so my Windows Forms question was silly
Mark
|
|
|
|
|
I didn't understand your above reply. Please tell me is it possible to include Directshow in VC++ windows application forms.
|
|
|
|
|
Yes it's possible - I mix native and managed C++ and use DirectShow and other
Windows Media SDKs.
Your build environment MUST be configured properly!
|
|
|
|
|
Please tell me how to configure it
|
|
|
|
|
1) First you need to change your project settings to use /clr WITHOUT the :pure or :safe.
Right click the project in solution explorer, choose properties -
General/Common Language Runtime Support
If your assembly MUST be pure, then you'll need to use interop or the managed wrappers
for DirectShow, and none of the following applies.
2) Try starting with a stdafx file with the following:
#pragma once
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <dshow.h>
Set the version macros to target the operating system version you want to target.
3) Make sure you've set your VC++ directories to use the PSDK 2003 R2 files BEFORE using
the VS Windows SDK files, as we discussed already.
4) Make sure you include the following library in your project: Strmiids.lib
|
|
|
|
|
Dearest Mark,
Thank you for your valuable guidance. The code is working now and I have to migrate my code from MFC to windows forms. Thank you so much and very kind of you.
Thanks and Kind regards.
|
|
|
|
|
I have a wsdl generated by axis2. My project is developed in VC++ using Visual Studio2008. Now, when I add a web reference to the project I get a lot of syntax errors and schema warnings.
Following is a snippet of the generated error
1>------ Build started: Project: TrumpotConsole, Configuration: Debug Win32 ------
1>Creating web service proxy file for HermesCoreService ...
1>Schema validation warning: Schema item 'element' named 'getContactResponse' from namespace 'http://quickstart.samples/xsd' is invalid. Namespace 'http://pojo.webservice.hermes.com/xsd' is not available to be referenced in this schema.
1>Schema validation warning: Schema item 'element' named 'getNotificationResponse' from namespace 'http://quickstart.samples/xsd' is invalid. Namespace 'http://pojo.webservice.hermes.com/xsd' is not available to be referenced in this schema.
1>Writing file 'HermesCoreService.h'.
1>HermesCoreService.h
1>HermesCoreService.h(49) : error C2059: syntax error : 'public'
1>HermesCoreService.h(49) : error C2027: use of undefined type 'HermesCoreService::HermesCoreService'
1> HermesCoreService.h(22) : see declaration of 'HermesCoreService::HermesCoreService'
1>HermesCoreService.h(53) : error C2059: syntax error : 'public'
1>HermesCoreService.h(53) : error C2027: use of undefined type 'HermesCoreService::HermesCoreService'
1> HermesCoreService.h(22) : see declaration of 'HermesCoreService::HermesCoreService'
1>HermesCoreService.h(151) : error C2146: syntax error : missing ';' before identifier 'getUpdatesCompletedEventHandler'
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>HermesCoreService.h(151) : error C2143: syntax error : missing ';' before '^'
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>HermesCoreService.h(151) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
The first few lines of the HemesCoreservice.h are as follows
#pragma once
#using <mscorlib.dll>
#using <system.dll>
#using <system.xml.dll>
#using <system.web.services.dll>
#using <system.enterpriseservices.dll>
using namespace System::Security::Permissions;
[assembly:SecurityPermissionAttribute(SecurityAction::RequestMinimum, SkipVerification=false)];
//
// This source code was auto-generated by wsdl, Version=2.0.50727.1432.
//
namespace HermesCoreService {
using namespace System::Diagnostics;
using namespace System::Web::Services;
using namespace System::ComponentModel;
using namespace System::Web::Services::Protocols;
using namespace System;
using namespace System::Xml::Serialization;
using namespace System;
ref class HermesCoreService; // this is line no 22
ref class Updates;
and the HemesCorService.wsdl
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ns1="http://quickstart.samples/xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://pojo.webservice.hermes.com/xsd" targetnamespace="http://quickstart.samples/xsd" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:documentation>HermesCoreService</wsdl:documentation>
<wsdl:types>
<xs:schema xmlns:ax21="http://pojo.webservice.hermes.com/xsd" attributeformdefault="qualified" elementformdefault="qualified" targetnamespace="http://pojo.webservice.hermes.com/xsd">
<xs:complextype name="Contact">
<xs:sequence>
<xs:element minoccurs="0" name="contactGroup" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="firstName" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="gender" type="xs:int" />
<xs:element minoccurs="0" name="lastIp" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="lastName" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="status" type="xs:int" />
<xs:element minoccurs="0" name="userAvatarLink" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="userId" type="xs:int" />
<xs:element minoccurs="0" name="userNick" nillable="true" type="xs:string" />
<xs:element minoccurs="0" name="userSessionId" nillable="true" type="xs:string" />
</xs:sequence>
</xs:complextype> </xs:schema></wsdl:types></wsdl:definitions></system.enterpriseservices.dll></system.web.services.dll></system.xml.dll></system.dll></mscorlib.dll>
modified on Monday, June 23, 2008 10:16 PM
|
|
|
|
|
Look at your post. You need to check the box for ignoring HTML tags otherwise the '<' and '>' don't post.
led mike
|
|
|
|
|
Hello guys,
does anyone here have experience with Dark GDK?
I'm just trying it out but I have a lot of problems with it.
Thanks for your help.
|
|
|
|
|
Dark GDK does not appear to use the .NET Platform so what does it have to do with managed or mixed-mode C++?
Austrian_Programmer wrote: does anyone here have experience with Dark GDK?
I do not, never heard of it until I read your post.
Austrian_Programmer wrote: I'm just trying it out but I have a lot of problems with it.
Does your system meet the minimum requirements for using it?
led mike
|
|
|
|
|
Well, it needs this managed stuff as far as I know.
Yes, my system meets the minimum requirements.
|
|
|
|
|
Austrian_Programmer wrote: Well, it needs this managed stuff as far as I know.
Really? Post the link to their web page that says it requires the .NET platform.
Austrian_Programmer wrote: I'm just trying it out but I have a lot of problems with it.
What kind of problems? Does this sample compile and run?[^]
led mike
|
|
|
|
|
Hai
I am using richtextbox. I want to select some specific word, for that i used richtextbox select command. But i couldn,t select the word can you tell me what i was written is correct or wrong.
String ^ searchString = this->functionBox->Text;
String^ srcText = this->srcTextBox->Text;
bool function = srcText->Contains(searchString);
if(function)
{
int lengthofsearchString = searchString->Length;
int index = srcTextBox->Find(searchString, 0, RichTextBoxFinds::MatchCase);
if(index >= 0)
{
index = srcTextBox->Find(searchString, index + lengthofsearchString, RichTextBoxFinds::MatchCase);
if(index>=0)
{
srcTextBox->Select(index,lengthofsearchString);
//srcTextBox->SelectionColor = Color::Red;
}
}
}
can you tell me
Thanks.
|
|
|
|
|
Your code works fine for me.
Mark
|
|
|
|
|
Hey, gang. I've run into a little problem that I'm hoping someone has tackled before. I'm also hoping this behavior isn't by design! I haven't been able to turn up any relevant information through Google.
When I place a DataGridView in a GroupBox, the font size and color that I am using for that GB's title text overrides that specified in the DGV's various cell/header/row font properties. Even when I change the DGV's font back to my desired settings in the designer, it still takes on those of the GB at runtime, and I get a rather unpleasant looking table.
Is there any way to prevent this behavior? Can anybody tell me why this only seems to happen with the DGV? Thanks for any help you can give me. I appreciate the assistance.
--
PS - I really hope this doesn't violate the spirit of the no cross posts rule. I asked this in the .Net Framework board quite awhile ago, but had no takers. That board doesn't seem nearly as active as this one, and I am using C++/CLI for this project, at least. .... Please don't hurt me, Mike.
|
|
|
|
|
Hi, I'm using Visual Studio 2005 C++/CLI. I have a Paint() function in my Form1 that has code to paint the screen in a block nested in an if statement.
System::Void Form1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e)
{
if(myObject)
{
code to display screen
}
}
This works fine when the constructor for myObject is called and an OpenFileDialog is used to read a file that can finish building the object. Since the Paint() function is called continuously, the code to display the screen is not executed when myObject is undefined, but when myObject is finished being instantiated then the display code executes. My problem is when I select "Cancel" in the OpenFileDialog I can stop building the myObject but the constructor completes (thus becoming NOT undefined) and the code to display the screen executes and tries to paint a bunch of undefined stuff and bombs the app. I've tried using a variable myObject->bValid in the above if statement but then the app bombs because the object reference was not set to an instance of an object. Is there a way to suspend the Paint() function so that I can do all of my preliminary stuff and then say "okay, start painting."?
Thanks
Buck
|
|
|
|