|
Well, according to microsoft you should not iterate through each element by calling MoveNext() because with large tables it drains the resources. I never ran into this problem because my databases don't have 0.6 million records, but one of the suggestions that I have heard is to use multiple record fetching, or use embedded SQL procedures.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Hi Everybody,
I have written a simple dialog based application that displays the image stored in a BMP file. The program works well for all images with uncompressed RGB images having bit depth 24 bpp and horizontal and vertical resolution as some positive value. However, with the files where horizontal and vertical resolution in BITMAPINFOHEADER is 0, the image is not displayed.
In my code, I am doing the following ---
1. Creating a DIB section using CreateDIBSection
2. Creating memory DC from DC of dialog window using CreateCompatibleDC
3. Associating the DIB section with memory DC using SelectObject
4. Copying DIB data into the buffer created by CreateDIBSection
5. Rendering the data using BitBlt/ StretchBlt
What else am I missing?
Any pointers on the same shall be highly appreciated
Regards
|
|
|
|
|
I may be missing something but an image with 0 rows and 0 colums has 0 pixels to display....
John
|
|
|
|
|
John M. Drescher wrote:
I may be missing something but an image with 0 rows and 0 colums has 0 pixels to display....
I think he's talking about the DPI resolution, not the width/height
[edit]I just read it again, and now I'm not so sure... [/edit]
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan Binns wrote:
I just read it again, and now I'm not so sure...
I felt that way when read the question. A coworker thought that he had an corrupt bitmap and wanted to know how to display it in that case..
John
|
|
|
|
|
John M. Drescher wrote:
I felt that way when read the question. A coworker thought that he had an corrupt bitmap and wanted to know how to display it in that case..
Sorry for the confusion I had created. Here are the values of interest from BITMAPINFOHEADER
biWidth = 256
biHeight = 256
biXPelsPerMeter = 0
biYPelsPerMeter = 0
I think that the last two values are the cause of the problem. For images in which these values are non zero, they are displayed properly.
Just wondering how Windows Paint is able to display the file with which I am facing the problem!!
Can somebody now say what is happening
Regards
Satyaki
|
|
|
|
|
|
Hello all, I am trying to develop an application using the window media format 9, I have the sdk, but i am really struggling with it, Does any one know a good site that has sample nice simple or clear example that i could look over???
Thanks for any help that you might have..
|
|
|
|
|
Don't hit me please, but just in case :
have you checked if the Microsoft site has any samples on the subject..?
It would probably help if you'd explain what you want to do..!
|
|
|
|
|
Hello all, I am trying to develop an application using the window media format 9, I have the sdk, but i am really struggling with it, Does any one know a good site that has sample nice simple or clear example that i could look over???
Thanks for any help that you might have..
|
|
|
|
|
Have you tried www.wotsit.org?
|
|
|
|
|
I am receiving an RGB color in a method.
1) I want to strip the color into it's fundamental components.
2) I want to store these values as integers within the method.
Ex. the method gets the color RGB (55, 155, 255)
I want to extract the numbers into variables.
int red = 55;
int green = 155;
int blue = 255;
======================================================
Any suggestions on how to strip the color into it's seperate RGB values????
I've done this before but I can't remember.
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
what's the format of the RGB variable? 3 bytes long or what?
|
|
|
|
|
GetBValue, GetGValue and GetRValue
Magnus
|
|
|
|
|
That's it!!!!
Thanks for your help.
George W
Software Developer
www.zsystems.ca
|
|
|
|
|
Ok... I didn't have any luck yesterday but I have a feeling someone can save me here today... Well, I am looking for free shareware, library to handle LZW data. I am writing a software that import and export graphics and hoping to avoide Unisys patent. Any suggestions anybody???
|
|
|
|
|
The LZW patent is no longer relevant in the U.S. (it expired last month). Take a look at CxImage[^] for importing/exporting graphics.
|
|
|
|
|
Well, I am hoping to use this software in Asia and Europe as well as here and unfortunately the patant has not expired in those places. I was hoping to find an algorithm or free shareware to get by with Unisys but may be I just have to bite the bullet here.. hmmmm.. Thanks for the link. This may be something I can use later.
|
|
|
|
|
Just use PNG instead... it was created specifically to avoid LZW patent issues. CxImage includes support.
|
|
|
|
|
Larry Antram wrote:
Just use PNG instead...
This is what I tell everyone. Do not use TIFF or GIF and all will be fine.
John
|
|
|
|
|
Unisys doesn't license to shareware or freeware authors.
That is, Unisys doesn't license to library developers anymore at all. The final application is the one that is allowed to pay royalties.
Meaning: Whatever you do, it's illegal in Europe and Asia, until the patent(s) expire.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
If you're using GIFs *AT ALL* you cannot avoid the Unisys patent. As far as a library to handle it, look at GDI+ (namespace System.Drawing.Imaging). It handles many different image formats including GIF with the "Image" and "Bitmap" objects. Someone correct me if I'm wrong, but I think you just have to license the GIF "technology" from Unisys if you distribute it.
Good luck.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
HI.
I am trying to use CryptoAPI.
But the problem is that even after including wincrypt.h i get undeclared identifier for any cryptoapi related data type or function.
I see this #if in wincrypt.h
#if(_WIN32_WINNT >= 0x0400)
I tried to define _WIN32_WINNT = 0x5000 as i am using win2k.
But after that i get error on this line in wincrypt.h
typedef LONG HRESULT;
missing identifier before HRESULT.
What the hell am i missing?
-----------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
I found the solution. SO I thought to post it over here so that others can take advantage of that.
I found the solution in this article.
I had to define 2 preprocessor macros.
_WIN32_WINNT=0x0400,_CRYPT32_ (NT4)
The article i found this was
http://www.codeproject.com/cpp/plaintextsessionkey.asp[^]
;);););)
-----------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
In my MFC app, I am able to insert text via StreamIn, but this replaces all the text in the view with the new text. What I want is to insert text at the current cursor position and not have it erase the contents of my document. There has got to be a way to do this, eh?
Thanks!
|
|
|
|