|
No, I think you understand what I asked now. I will give it a try later, and if I run into any problems I will post back. I don't want to make it confusing as I'm a newb .
Thanks
|
|
|
|
|
Hi everyone,
Not sure if it's a right place for my question, although it's about C++;
Does anyone experienced any troubles with running code that uses CInternetSession on a computer with ZoneAlarm installed? I can't even run examples like Tear and FteTree from VC! It simply gives timeout.
Looks like ZoneAlarm blocks inet access for those apps without even asking permission.
All other apps (commercial or freeware) work as intended. When they try to connect, ZoneAlarm asks if I want to block access or not. But when I build code with CInternetSession in it, including examples from some articles here, on CodeProject, it blocks access without asking.
Is there a solution known for that problem?
|
|
|
|
|
Is Multiple version of a sinlge dll for each language possible?
Jim456
|
|
|
|
|
You can either put multiple resource languages in a signle DLL or make a separate DLL for each language. Usually the language code will be appended to name of DLL and you explicitly load appropriate language DLL at runtime. If you use all special resource loading functions that accept the language identifier, then it might be easier to combine all the languages into a single DLL. You can not have multiple copies of the 'same' DLL on the system, they have to differ at least by name.
|
|
|
|
|
This sounds very basic but, why cant the dll have like multiples copies on the system?
Jim456
|
|
|
|
|
Hello,
I need to write a program that receives video data sent by a camera (custom made, not an internet camera) using udp or tcp (which is prefered ?)
btw, the camera is connected directly to the computer without network sharing (no switches or hubs or firewalls).
The camera send the data with 50 frames per second and the image size is 480*384 16 bits per pixel. I need help with the implementation of a program that will receive all the frames display and save them to a binary file.
It has to be deterministic (50 frames per sec) (all the data should be saved, no data loss)
I have to display the data at the same rate.
I rather use win32 or mfc.
The hardware i am using is:
1. custom made camera sending video data using udp
2. Gbit Ethernet card
3. pentium 4 (3ghz, 1gb ram)
Thanks.
|
|
|
|
|
The samples that come with the download are for VB and C#; nothing for VC7.
Don't even bother asking the company for answers, you'll get none (if you're ever lucky to get a reply). And if you're lucky to get a reply, you'll learn that there are no VC++ API's to interface with the database. IOW, you're on your own. The product does not even come with ODBC drivers.
I've pretty much had to do and create everything myself when it comes to having the product interface with VC++ for ".net'.
Whatever you learn from their website about technical support, it's for VB and C#.
William
Fortes in fide et opere!
|
|
|
|
|
Hello!
I can't understand why this TransparentBlt function doesn't work...
"CClientDC dc1( this );
CBitmap bmp,bmp_all;
CDC memdc2,memdc3;
bmp.CreateCompatibleBitmap( &dc1, 600,600 );
memdc2.CreateCompatibleDC( &dc1 );
memdc3.CreateCompatibleDC( &memdc2 );
memdc2.SelectObject( &bmp );
bmp_all.LoadBitmap(IDB_BITMAP_1);
memdc3.SelectObject(&bmp_all);
TransparentBlt(memdc2,0,0,97,93,memdc3,0,0,97,93, RGB( 255,255,255)); "
Help me please to correct this error.
Thanks All!
|
|
|
|
|
what happens when you try???
sergbox2 wrote:
memdc2.CreateCompatibleDC( &dc1 );
memdc3.CreateCompatibleDC( &memdc2 );
have you tried memdc3.CreateCompatibleDC( &dc1 ); ?
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
TransparentBlt(memdc2,0,0,97,93,memdc3,0,0,97,93, RGB( 255,255,255)) returns 0 ..
but if I change memdc2 and memdc3,
TransparentBlt(memdc3,0,0,97,93,memdc2,0,0,97,93, RGB( 255,255,255)) returns 1
|
|
|
|
|
|
TransparentBlt(memdc3,0,0,97,93,memdc2,0,0,97,93, RGB( 255,255,255)) works correct
can you give me any another way to copy memdc3 to memdc2 ( RGB(*,*,*) - transparent)????
|
|
|
|
|
Perhaps this will help?
<code>
void FooButton::TransparentBlt
(HDC hdcDest, <code>
int nXDest, <code>
int nYDest, <code>
int nWidth, <code>
int nHeight, <code>
HBITMAP hBitmap, <code>
int nXSrc, <code>
int nYSrc, <code>
COLORREF colorTransparent, <code>
HPALETTE hPal) <code>
{
CDC dc, memDC, maskDC, tempDC;
dc.Attach( hdcDest );
maskDC.CreateCompatibleDC(&dc);
CBitmap maskBitmap;
<code>
CBitmap* pOldMemBmp = NULL;
CBitmap* pOldMaskBmp = NULL;
HBITMAP hOldTempBmp = NULL;
memDC.CreateCompatibleDC (&dc);
tempDC.CreateCompatibleDC (&dc);
CBitmap bmpImage;
bmpImage.CreateCompatibleBitmap (&dc, nWidth, nHeight);
pOldMemBmp = memDC.SelectObject (&bmpImage);
<code>
if (dc.GetDeviceCaps (RASTERCAPS) & RC_PALETTE && hPal) {
::SelectPalette( dc, hPal, FALSE );
dc.RealizePalette();
::SelectPalette( memDC, hPal, FALSE );
}
hOldTempBmp = (HBITMAP) ::SelectObject (tempDC.m_hDC, hBitmap);
memDC.BitBlt (0, 0, nWidth, nHeight, &tempDC, nXSrc, nYSrc, SRCCOPY);
<code>
maskBitmap.CreateBitmap (nWidth, nHeight, 1, 1, NULL);
pOldMaskBmp = maskDC.SelectObject (&maskBitmap);
memDC.SetBkColor (colorTransparent);
<code>
maskDC.BitBlt (0, 0, nWidth, nHeight, &memDC, 0, 0, SRCCOPY);
<code>
memDC.SetBkColor (RGB (0,0,0));
memDC.SetTextColor (RGB (255,255,255));
memDC.BitBlt (0, 0, nWidth, nHeight, &maskDC, 0, 0, SRCAND);
<code>
dc.SetBkColor (RGB (255,255,255));
dc.SetTextColor (RGB (0,0,0));
dc.BitBlt (nXDest, nYDest, nWidth, nHeight, &maskDC, 0, 0, SRCAND);
<code>
dc.BitBlt (nXDest, nYDest, nWidth, nHeight, &memDC, 0, 0, SRCPAINT);
if (hOldTempBmp)
::SelectObject (tempDC.m_hDC, hOldTempBmp);
if (pOldMaskBmp)
maskDC.SelectObject (pOldMaskBmp);
if (pOldMemBmp)
memDC.SelectObject (pOldMemBmp);
dc.Detach();
} /ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Very pretty!
But I do not think that is the problem.
INTP
Every thing is relative...
|
|
|
|
|
It would help if you knew what you were trying to do. All we can see is you declaring some empty bitmaps and comatatible DCs. Selecting an empty bitmap into memdc2, loading a bitmap into bmp_all and selecting it into memdc3, and then doing a transparent blit to the bitmap in memdc2 (which contains an empty monochrome bitmap [black]).
INTP
Every thing is relative...
|
|
|
|
|
Yes, you are right. I want to do TransparentBlt at least to black bitmap (in memdc2), i.e. to copy picture from memdc3 to memdc2 missing white color.
|
|
|
|
|
Hi,
Is there a way in Visual Studio .NET 2003 to see the count for total line of code for a solution or a project ?
Any other way to get this data ?
Thanks,
Shay
-- modified at 15:59 Friday 7th October, 2005
|
|
|
|
|
That functionality is not built into .NET 2003. You can get add-ins and separate exe's to do that though. There are a couple of solutions on CodeProject if you search for them.
If a wizard fails to cast an enchantment correctly, is that a mis-spelling?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
found the articel, thanks !
|
|
|
|
|
Historical note. At one time some companys (or some idiot in the company) thought that the number of lines of code was related to the productivity of the people writting the code.
I some times wonder how may useless lines of code where written, just because of that idiocy.
INTP
Every thing is relative...
|
|
|
|
|
Don't worry, it's just for risk assesment calculations.
I also think it's not the quantity but quality that counts
|
|
|
|
|
I have been having a long debate with the developers in my company about porting our MFC software to C++.Net. The main concern is performance really. The software's primary goal is to track the flight of a ball in three dimensions using vision processing techniques. The software is, however, notoriously unreliable, with pointer errors and other software problems causing crashes quite frequently. Many of you may find this laughable but we are still using the VC6 compiler in Visual Studio 6. Aside from that, having had brief interludes with the .Net framework *and* MFC, I feel the .Net framework is far easier to use than MFC and seems to be a lot more stable too. From what I've seen and heard, .Net seems to be the answer in terms of development and productivity.
The other developers argue that the main issue is real-time performance. They feel that trying to get as low-level as we are would be difficult in .Net (but it's not like we're coding in assembly or even C for that matter; just standard C++). I believe they simply have a misguided understanding of how it all works. They seem to believe that the CLR is functionally the same as the Java Virtual Machine and that the intermediate language requires an extra layer of processing. My understanding is that the main purpose of the MSIL is for cross-platform compatibility and that it is possible to compile to the native machine language thus resulting in performance comparable to a Win32 compiled version.
Firsty, is this the correct analysis, and secondly can anyone give me URL where I could find information on benchtests comparing MFC v .Net compiled C++ programs?
|
|
|
|
|
Klempie wrote:
Many of you may find this laughable but we are still using the VC6 compiler in Visual Studio 6.
IMO, anything after VC6 is too full of clutter and wizards and flying property pages to do C++ development.
i do a lot of image processing, and without question, straight C++ kills managed code of any flavor, for doing the kind of iterative pointer arithmetic i.p. requires. for apps that spend a lot of time waiting for I/O or user input, managed code is fine. but for those time-critical, processor intensive loops that make up most image processing functions, C/C++/MMX is the way to go.
have you tried tools like BoundsChecker or Purify to help find stray pointers ? a couple of hundred bucks and a day with BC might be money and time better spent, instead of a rewrite.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Switching to managed C++ won't magically fix the code. (A lot of people would be making the switch if that were true!) By the GIGO principle (garbage in, garbage out) you'd just end up with lots of NullReferenceException s instead of lots of access violations. Fixing the current code base would be my first suggestion. Get the code stable before you even think of moving it to another platform.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
#include "witty-quote.h"
|
|
|
|
|
I have an application that produces images that are sent to a plotter (E size sheet). The images are huge, and when sent to the printer cause the spool files to become extremely large (sometimes killing the process). To reduce the spool size I thought that I would be able to band/tile the images to the printer and to force it to print and discard what I sent to reduce the spool file size. After looking at what was available in GDI and GDI+, I could not see a way to do this. I did see some information on BandInfo and NextBand, but neither one is well documented and NextBand states that it is no longer used. Does anyone have ideas as to how I can to this? Second, are there ways that I can compress the image to reduce the spool file size?
|
|
|
|
|