|
I had already seen a few of these utilities, but I just wanted to see if there was something in an existing API that would suit my needs (something I wouldn't have to pay for to distribute w/ my other software). Looks like that isn't possible, Thanks.
|
|
|
|
|
|
Keith Brown is working on a GINA sample.
You can read about the beginning of project here:
http://msdn.microsoft.com/msdnmag/issues/05/05/SecurityBriefs/default.aspx
He says he has a 'wiki' about it here, under Keith Brown:
http://pluralsight.com/wiki
|
|
|
|
|
I'm building some code with the following function calls
AcquireCredentialsHandle()
FreeCredentialsHandle() I've included the header
#include <sspi.h> which the documentation indicates, however it also says that the "Secur32.lib" library is needed to link with? While the header file is resolved okay, I can not even locate such a library file on my machine. Any thoughts on what could be not setup correctly? I'm using version 6 on Windows 2000, incidentally. Thanks.
Chris Meech
I am Canadian. [heard in a local bar]
Gently arching his fishing rod back he moves the tip forward in a gentle arch releasing the line.... kersplunk [Doug Goulden]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
you must install microsoft SDK and it will be located under ..\sdk\lib
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I am carrying out an ActiveX. I have a variable COLORREF in one of the page of Properties...and I want to use it in the .cpp that controls the ActiveX...how can i send this variable?
Thanks
|
|
|
|
|
I write a simple application for grabbing data from an special scanner. The data is RAW grayscale and I want to convert it to bitmap.
The width and height of image is known.
Is there any body can help me do this? Any suggestion, hint?
Best regards,
A. Riazi
|
|
|
|
|
|
RAW means I have pixel values. The fact is I have a grayscale image in RAW.
But I have no idea of how to create a simple image that can be viewed easily with some graphics application like ACDSee.
Every pixel is represented by 8 bits and the width and height of image is known.
Any idea?
Best regards,
A. Riazi
|
|
|
|
|
A. Riazi wrote:
Every pixel is represented by 8 bits and the width and height of image is known.
so, you have 8-bit grayscale.
"RAW" has a pretty specific meaning - it usually refers to the unprocessed/uncompressed data that comes directly from the scanner/digicam . it's generally in an exotic colorspace, and often the pixels are scaled logarithmically. and all of this depends on the manufacturer and model of scanner/camera - every one does it differently.
if you have 8-bit grayscale, you can create a BMP file pretty easily:
1. open a file
2. write a BITMAPFILEINFO struct
3. write a BITMAPINFOHEADER struct
4. write a 256 color grayscale palette
5. write the pixel rows - in bottom-up order, with padding on the ends to ensure that each row is a multiple of 4 bytes wide
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
CreateBitmap()
Read the MSDN writeup before you mess with it. Pay special attention to the alignment notes - you may have to massage your data a bit first.
Medication for us all
You think you know me, well you're wrong
|
|
|
|
|
It depends on format of the raw data.
The simpilest solution would be to write a function that reads the RAW data, one pixel at a time converting the return value to RGB. Then create a bitmap of the same size, select it into a memory DC, and copy the data to it.
COLORREF CRawData::GetPixel(int x, int y)
{
.....
}
BOOL CRawData::ConvertToBitmap()
{
if( !m_pData )
return FALSE;
if( m_Bitmap.GetSafeHandle() )
m_Bitmap.DeleteObject().
....
....
....
if( something went wrong )
....
for( int y=0; y < m_nHeight; ++y )
{
for( int x=0; x < m_nWidth )
dcMem.Set(x,y,GetPixel(x,y));
}
....
return TRUE;
}
The above would be slow, but it is the simpilist way to do it.
Now if you want to save it to a disk file, you should look at using GDI+ or one of the articles at codeproject on working with DIBs (bitmaps).
Gool luck!
Signed John R. Shaw
|
|
|
|
|
Hi,
Sorry that I asked you again. I have not much experience in graphics programming.
The fact is I have a grayscale image in RAW.
But I have no idea of how to create a simple image that can be viewed easily with some graphics application like ACDSee.
Every pixel is represented by 8 bits and the width and height of image is known.
This is not important for me the image file is BMP or Tiff.
Any idea?
Best regards,
A. Riazi
|
|
|
|
|
I am using following Code to Copy to Clip board.
This code is written under a button Copy ,
As i click on Copy button first time it Works fine , and i can paste it in MS word.
As I clik 2nd time on Copy Botton . the Application Crashes down.
It crashes on statment pData->SetClipboard();
and show the the message that Windows XP usualy show on crash to Send and Dont send the Reoprt of Error.
void CopyButton()
{
// Get DC
CDC* dcRef = GetDC();
tagSTGMEDIUM * data;
data = new tagSTGMEDIUM;
CMetaFileDC * dcMeta;
dcMeta = new CMetaFileDC();
if(!dcMeta)
{
AfxMessageBox("Unable to Load data on Clipboard");
return;
}
COleDataSource* pData = new COleDataSource;
//replace "ImageName" with a description of this image
dcMeta->CreateEnhanced(dcRef, NULL, NULL,"Cca-Graph" );
dcMeta->SetMapMode(MM_TEXT);
dcMeta->SetAttribDC(dcRef->m_hAttribDC);
//actually draw to the device context
CRect rcWnd;
GetClientRect(&rcWnd);
//draw meta file :: do what ever you want to do: bitmaps, lines, text...
DrawChart(dcMeta, rcWnd, false);
//done drawing
data->tymed = TYMED_ENHMF;
data->hEnhMetaFile = dcMeta->CloseEnhanced();
pData->CacheData( CF_ENHMETAFILE, data );
// Crashes
pData->SetClipboard();
// Release the meta file attributes
dcMeta->ReleaseAttribDC();
delete dcMeta;
delete data;
}
Regards.
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
That was hte my link , but i not got the proper solution thats why i posted the question ,
Why the Application crashes 2nd time.
Please reply me thanx.
Regards.
|
|
|
|
|
Hi,
I have written a program to add an icon in the system tray.
But i want the icon to remain in the systray even after i exit the application and the application should start on clicking the icon.
how can i do that?
Thanks
U get wht u Give
|
|
|
|
|
Write a handler for WM_SYSCOMMAND and in it check nID. if it is SC_CLOSE, dont shut down the application, just hide it or minimize it to system tray, whatever you want to do.
"I would luv to change the world, but they wont give me the source code"
My Articles
|
|
|
|
|
Just don't exit the application. Hide the main window when user wants to exit. Show it when user clicks on icon.
--OR--
Write another app, which also has the same icon in the tray. Just a small app which never shows its interface, it is hidden. When user exits main app, it starts this small app before exiting. When user clicks on icon, this small app starts the main app, and exits itself.
Good code for life.
|
|
|
|
|
charu123 wrote:
But i want the icon to remain in the systray even after i exit the application
You can't do that. Tray icons work by sending window messages, so if your app exits there is no longer a window to send messages to.
You'll need two apps, your main app, and one that's responsible for the tray icon.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
plz tell me how to concatenate 2 values in vc++?
suppose i display in the editbox value 123..
and the next time i display 34.
i want that to come as combined like "123 34"
plz help me with this!!!!!!!
|
|
|
|
|
Let the str is DDX variable of your Edit Box.
Now Let you have updated your edit box with 123.
i.e. this way
str="123";
this->UpdateData(FALSE);
now you want to concatenate the 34 in that box
call
UpdateData(TRUE);
str+="34";
//again update the values
UpdateData(FALSE);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
but my values r in double....
i want the double values to b concatenated
|
|
|
|
|
With double is just impossible ! What happens in this case:
Value1 = 2.1234
Value2 = 5.5678
??? What will you do with your floating points ??
|
|
|
|
|
double d1 = 123.0;
double d2 = 34.0;
char s[16];
sprintf(s, "%.0f %.0f", d1, d2); // 123 34
or with MFC:
CString str;
str.Format(%.0f %.0f", d1, d2); // 123 34
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|