|
I am trying to access shared memory on an ISA bus card, under Windows XP. Is there any simple way to do this in C? I would be working in VS6 since I have it installed on a spare machine, I have not done any real software work for years.
I had a similar problem years ago, where I wanted to access I/O ports on an ISA bus card, and found InpOut32.dll which provides direct port access under Windows XP. Wonderful stuff. But is there anything similar that allows physical memory access?
From what I remember, there should be no problem if I run under Windows 95 or 98, right? Just set a pointer to the address I want and read or write freely, or does Win95 / Win98 protect some memory areas?
I'd hate to have to dig up MSVC 1.52C, to compile the program for DOS!
|
|
|
|
|
I try to make an CComboBoxExt derived from CCOmboBox . In
void CComboBoxExt::OnEditchange()
{
CString sText;
GetDlgItemText(this?,sText);
ShowDropDown();
}
I try to retrive the text that user entered in combobox , and if text is not empty show drop down list , if is empty then hide drop down list .. but I stuck on GetDlgItemText method : how can I retrieve the text that user entered ? Can you help me please ? Thank you !
|
|
|
|
|
To retrieve text from the edit box of the CComboBox, use GetWindowText() . To retrieve text from the listbox, use GetLBText() .
|
|
|
|
|
|
I have Visual Studio 2008 at work but I must admit I've only used it for C# applications so far. I ported a reasonably large MFC app (from Visual C++ 2003) to it a few months back as a proof of concept and realized some important features of ATL were removed for webservices and regular expressions. I hacked around to get it to compile and the experience was somewhat painless (except for the regular expressions omissions off course).
However, I've not really toyed with in C++ beyond that and I'm looking to purchase a personal copy of Visual Studio 2008 (or 2010 but the reviews for 2010 seem pretty bad and I like to stay a step behind the leading edge for IDE's) and I wanted to ask those of you who have beat Visual C++ 2008 up a bit to see if you feel like Visual Studio 2008 was a good investment.
Specifically looking for opinions from those who still prefer to utilize MFC/ATL shared libraries for collection classes, CString, etc... as opposed to the C++ standard library equivalents.
thanks in advance.
|
|
|
|
|
I have ported many apps from VS6 to VS2008 for my clients. No major gotchas, and using VS2008 for x64 development presents no problems either.
VS2010 is an entirely different story. Extremely slow startup times, several crashes during the day, and, of course, a help system that is near totally useless (I use google instead). VS2010 is not worth it, unless there are features you really need.
To be honest, I have found that MS has fixed numerous bugs in the MFC Feature Pack stuff in VS2010. But most of my clients hate the ribbon interface, so I'm not sure if that is a major benefit.
|
|
|
|
|
I agree about the ribbon interface since the 16:9 aspect ratios of contemporary monitors tend to make vertical screen real estate ever more precious.
Thanks for taking the time to share your thoughts. It is much appreciated.
|
|
|
|
|
I would probably wait for VS2010 Service Pack 1 to arrive, and see if it fixes the things for VS2010. I think over time you will be developing more .NET applications, and the improved WPF designer and .NET 4.0 will be good to have.
VS2008 without Service Pack also had a lot of bugs.
|
|
|
|
|
I agree, SP1 will help VS2010 a lot. I've been using the SP1 Beta with no problems and it's help viewer is waaaay better.
If you use STL, VS2010 is much nicer with the elements of C++0x they've included so that's definitely better than VS2008.
I've not experienced the slow startup times others mention so I think some of that's tied to your h/w such as RAM.
John
|
|
|
|
|
I've used VS2008 for C++ with MFC extensively and really like it. Probably one of the best C++ IDEs to work with. It does have SP1 out so watch for that specially if you're using it within Win Vista or 7 (there are frequent compilation errors that get fixed with SP1). I've used Studio 6, 2003, 2005, and 2008. This is the best one yet. With that said, haven't used VS2010.
|
|
|
|
|
I'm using XP Professional at home and at work but I'm guessing we can't hold out much longer. I've only tested our compiled products (before releasing to production) on Vista and Windows 7 and had not had a chance to test any versions of Visual Studio on either OS yet so your comments are helpful and encouraging.
I did some searching before I posted and have been watching any comments made on 2008 and 2010 over time but I couldn't quite get a good handle on the C++ experience as so many are using C# to pay the bills these days.
Thanks for taking time out to share your thoughts.
|
|
|
|
|
Another thing to keep in mind: VS2008 and VS2010 work fine on Win7; I have them both installed on my Win7x64 system.
However, VS6 and VS2005 will not install on Win7. To use these, you have to set up a VM (like VMWare).
|
|
|
|
|
ouch! I'm glad you passed that on as I was debating a new home workstation to go along with Visual Studio 2008 and I couldn't make up my mind if I wanted the Windows 7 Professional with option to revert to XP that some stores offer. I might choose to downgrade Windows 7 to XP Professional since I have a ton of VC++ 2003 code that I honestly don't want to migrate as those programs will just die a natural slow death over time. However, in the meantime, I need to support them and will need Visual Studio 2003 installed.
I have finally got myself free of needing VC++ 6.0 but I must admit to still using it's MSDN more when looking up topics that didn't change much over the years.
thanks again.
|
|
|
|
|
I've been using Win7 for a little over a year and never want to go back to XP. Get yourself a nice VM like VMWare and map the hard drive with your dev sources. This has worked perfectly for me. I think there's a nice free VM (VirtualBox?) but I haven't tried it.
It's funny what you said about MSDN. I couldn't install VS6 on Win7, but I could install MSDN 2003, and I usually have it open on my second monitor.
I also have a macro that I use from within VS2008 that opens the Microsoft MSDN site inside a window in VS2008. Much, much faster than the builtin help.
I have converted 100's of projects from VS2005 to VS2008 with no problems. Just make a backup, and let VS2008 convert them.
|
|
|
|
|
Sure, just don't forget to install SP1, otherwise you'll be cursing the day you read my review of the product.
I use C++ extensively and I compile the same code (huge multi-project applications) on both XP Pro on my work computer and my home Win7 computer. One of my Junior Engineers uses Win Vista to work on the same code. So it does work and Win7 is WAYYYYY better than Vista! ...I do keep multiple OS's around in case I need it and for testing.
|
|
|
|
|
If you are a native code developer, the last "well packaged" version for C++ was VS2005 + SDK2003R2.
You get all what you need for native apps, plus all the native API documentation.
2008 version miss the most of the native documentation, and introduces the WPF (but with an interface that is very low performant, respect to 2005).
2010 has a pretty C++0x standard compiler, but the product around it tends to be a huge bloat.
If you are looking for a standard compiler and a IDE far less "bloated" consider MinGW as a compiler and Codeblock, Codelite or Qt-creator as an IDE.
If you need MFC, ATL etc. or all the .Net stuff, consider SharpDevelop (for C#).
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
I need a ListCtrl like this:
1. similar to CListCtrl with report style.
2. first column (label) is similar to tree item (+button line), parent item has sub-items, when user clicks first column, its sub-items will be expanded to be shown in following lines.
3. sub-items always follow parent item when sorting by any column.
Do you know an existing control like this for downloading and using?
Source code is prefered.
|
|
|
|
|
I haven't seen one exactly like that, but there are some articles here on CP about hybrid CListCtrl+CTreeCtrl. Maybe you can use that as basis for what you need.
|
|
|
|
|
|
I'm starting a mpeg4 video player project. The concept could be easy so as use winmm.dll library in a VB project or VC++, however I need to develop a player more specific and that is the meaning of the my question.
Mpeg defines streams of 188bytes within file, each stream has diferent purpose depending on its ID, e.g. video, audio language1, adio lang 2, subtitle.... I use this mechanism to store information obtained after processing the video. The process add an specific stream with the results (they are x-y coordinates of the position of some objects). Is the easiest way to have synchronized data with the video.
What I want to do now is to develop a video player able to reproduce the modified mpeg adding a layer with the marks defined by x-y coordinates. A similar mechanism as the subtitles.
Which could be the best way to start this project? The APIs that I found open directly the file and reproduce the video as winmm.dll and VLC dlls. The solution seems to be open source like VLC code or OpenCV libraries
Any recomendation for this challenge?
|
|
|
|
|
If your platform is windows, how about DirectShow[^], and DirectShow filters[^] particularry?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
I google that but not get answer, Can anyone help me ?
|
|
|
|
|
Google for gdi+ or gdiplus and its Image or Bitmap class and handle WM_PAINT (OnPaint) in your view. I hope this is enough to get you started.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
You could try CImage[^] with CImage::Load(), and CImage::Draw().
|
|
|
|
|
Here is what i am trying to do: create kind of a "supervisor class". Lets say, we got a class named "Parent", and, a class named "Child". Before initializing a "Child", we need to init "Parent" first. Parent has a boolean variable, which is going to be set to TRUE while initializing Parent class. Parent also has a function and a structure, which (function) should collect integers (into a structure), passed from Child class and then do some manipulations on these ints. So first, we initialize Parent, which sets boolean var to true. Next we initialize Child, which checks if Parent's boolean var is true. If it is, Child calls Parent's "collect" function and passes some random ints to it.. So my first approach was a creation of nested classes (here is some offtopic example):
class xxx
{
protected:
int x;
int y;
private:
public:
int ddd;
class ccc
{
protected:
private:
public:
int sad()
{
printf("%d\r\n", ddd);
}
ccc(){}
~ccc(){}
};
xxx()
{
ddd = 0;
x = 10;
y = 11;
}
~xxx()
{
x = 0;
y = 0;
}
};
In ccc::sad i cannot access var ddd from class xxx. Okay, so i have made it static. Now compiler is not pleased at all:
error LNK2001: unresolved external symbol "public: static int xxx::ddd" (?ddd@xxx@@2HA)
Alright, trying something different (this example is pretty much close to that, what i am about to achieve) :
namespace Some
{
class q
{
public:
typedef struct _H
{
int l[];
}
H;
H *h;
int e;
BOOL g;
int inc_e(int i)
{
e++;
h->l[e] = i;
printf("i = %d\r\n", i);
return 1;
}
int o()
{
printf("%d\r\n", e); return e;
}
q(){ e = 0; g = TRUE; }
~q(){ e = 0; g = FALSE; }
};
class w : q
{
public:
int i;
int inc()
{
if(g)
{
i++;
inc_e(i);
}
return 0;
}
int some()
{
printf("%d\r\n", e); return 0;
}
w(){ i = 0; }
~w(){}
};
}
But that is all wrong again and i dont know again
How to create such relation between two classes, so one can watch over another? I have tried some other ways, some simple things, like:
declare a variable in 1 class, then inherit another class from 1 class, then increment that val in child class. For example we got
int a = 1; in Parent class.
Incrementing this same "a" in a child, which inherits from parent (a++) class and then print out - fine, it increments in child class.
But it stays the same in Parent class (a = 1).
Thanks
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|