|
If you mean a ListView control, look up LVM_INSERTITEM on MSDN.
Michael
|
|
|
|
|
Hi all, I`ve managed to load a bitmap as a DIBSection and have kept the HBITMAP structure (I haven`t attached it to a CBitmap). However, now I want to serialize the bitmap in the widely used bitmap format. Currently I create a CFile object to the location I want to save, with the flags modeCreate | modeWrite, I then create a CArchive and set it to ::Store using this newly created file. I then attach my HBITMAP to a CBitmap object and call the serialize function. The "bitmap" is created in the location specified but its 0 bytes big, so I don`t think the CBitmap serialize is working, any ideas on how to solve this would be much appreciated,
Cheers Guys,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
Bitmaps do not support serialisation. Look at the bitmap section on Code Project for several classes to save bitmaps, also my GDI+ articles, and the FAQ lists several other options
Only a master of evil, Darth - Obi Wan Kenobi
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Thanks Christian, I thought this question would be right up your alley! I like the return quote too, it humoured me quite a bit.
Cheers again Christian,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
I`ve checked the codeproject web-site and found a CxImage wrapper, which does serialisation amongst many other stuff. However I find it incredibly difficult to read (as its a multi-project thing with passwords etc.), but its too complex. It uses a FILE structure (of which I know nothin about) and fwrite. I was wanting to use CArchive's << operators (I know a tincy wincy thing about them), but I need to know which order to iterate through each member variable, does anyone know this? or can someone advise on a better approach (I just need a little kick in the right direction, cos I`m not sure what I`m doing at the moment ) Is GDI+ the way to go Christian?
Thanks guys,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
is that u have a proper HBITMAP and u want to persist this bitmap, if so refer MSDN Platform for storing bitmaps and it has a sample code. copy and paste ( if u dont wnat to understand ) and u r done ( ofcourse u have rename the variables )
Ganesh Ramaswamy
|
|
|
|
|
Yes, GDI+ makes all of this incredibly easy. The only catch is it doesn't support W95.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi all, OK I`ve managed to get it going, and am just seeking a little reassurance. What I`ve done is created a (fully filled out) BITMAPINFO structure, and a (filled it out manually) BITMAPFILEHEADER structure. I`ve then used
ar.Write(theBITMAPFILEHEADER, sizeof(BITMAPFILEHEADER));
ar.Write(theBITMAPINFO, sizeof(BITMAPINFO));
ar.Write(pBits, theBITMAPINFO->bmiHeader.biSizeImage);
Now, I seek reassurance cos when I compare an image that exists on my HD, to an identical copy that I saved using my app, the newly saved image is 2 bytes shorter (in at least one case). I`ve tried re-loading the new image in paint, everything seems fine, do I just leave it? Or is this a problem that could potentially send my computer kaput?
Cheers all for your responses,
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
Think of an application like Explorer. It can easily drag & drop files to another application, if the application allows to do so. For example if you drag a text file to IE, the file is not copied to a location but shown in the explorer.
I am trying to implement such a functionality similar to Explorer. I want to list some files in a tree control and then I want to be able to drag them to another application. This application knows how to handle dragged files, like the explorer drags.
I've found several examples on d'n'd where both, drag source and drag target, remainded in the same app and in the same client window. But I have never found an example on how to drag something outside my application.
Does somebody have suggestions?
|
|
|
|
|
|
Hi!
There are many articles, but none of them describes how to do the interaction with another application.
Michael
Michael P Butler wrote:
There are some useful articles here,
http://www.codeproject.com/clipboard/
Michael
|
|
|
|
|
Hi,
I have an SDI 'windows explorer'-like application (generated by the AppWizard), with a left pane (CLeftView) and a right pane (CRightView).
Here are my questions :
- When the user opens a new file, a file selector is automatically openned. How can I choose the file type (*.xxx instead of *.*) ?
- I would like that when the user chooses to save the file, no matter which view is active, the same method is called. But, with the ClassWizard, the function to react to the 'OnCommand' for a menu is different for each view. How can I have a unique method for the 'File save', no matter which view is active ?
Thank you in advance for your help !
Jerome
|
|
|
|
|
there is a property "Right Alligned Text" of combo box, How I can change this property at run time.
Any CWnd function. or any other help.
Have a nice wishes for HELPER
|
|
|
|
|
How to send a HTML page with images as the body of a email?
|
|
|
|
|
i have to admit that i didn't try to send embedded pictures.. but at least this worked for me to send html mails in general.. i think it shouldn't be a real problem if you attach the pictures and link em into your html page..
the best class for sending html - mails has been this one:
http://www.codeproject.com/internet/csmtpconn.asp
if you still have got problems maybe the author of this class can help you (he has been very kind in answering my questions)
hope this helps
bernhard
"There are three roads to ruin: women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians." Georges Pompidou
|
|
|
|
|
Hello everybody!
I'm create CTime follow:
SYSTEMTIME tm;
tm.wSecond = m_second;
tm.wMinute = m_minute;
tm.wHour = m_hour;
tm.wDayOfWeek = m_day_week;
tm.wDay = m_day;
tm.wMonth = m_month;
tm.wYear = m_year;
CTime time(tm);
But in this cause, constructor CTime re-set the day_week as real calendar day.
I want set myself day_week, and not day_week of calendar!
It is possible?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Looking at the CTime constructor
CTime::CTime(const SYSTEMTIME& sysTime, int nDST)
{
if (sysTime.wYear < 1900)
{
time_t time0 = 0L;
CTime timeT(time0);
*this = timeT;
}
else
{
CTime timeT(
(int)sysTime.wYear, (int)sysTime.wMonth, (int)sysTime.wDay,
(int)sysTime.wHour, (int)sysTime.wMinute, (int)sysTime.wSecond,
nDST);
*this = timeT;
}
}
The Constructor ignores the DayOfWeek value passed in. You'll have to set it afterwards. I'm puzzled to why you would want to pass your own day of the week. Surely that is determined by the date?
Michael
|
|
|
|
|
Oups!
Has not turned attention!
Many thanks!
In my program of event vary on days of week, it is not dependent on calendar date!
Best regards,
Eugene Pustovoyt
|
|
|
|
|
|
Hi,
In my recent project, i need to capture the timecode of
Audio from the Sony Recorder DVR-28 (D2) and display it
in the VC++ dialogs. I really need some help about
which API functins can be used to do this. The timecode i used is like: hh, mm, ss, and frame. Assume that there are 30 frames in one second.
Hope get your help.
Best Regards,
chen
|
|
|
|
|
As has been stated previously ( when you posted to the main forum ), you need to override WM_MINMAXINFO, and set the max to 800.
I believe you'll have to do this manually.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
It worked beautifully. As always, I appreciate the help!!
Mark
|
|
|
|
|
Did you delete the thread-starting post?
It's missing
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
yes... when I first wrote it, I didn't realize that I posted it in the wrong spot.
Mark
I am not discouraged because every wrong attempt discarded is another step forward.
-- Thomas Edison --
|
|
|
|
|
Marcus2001 wrote:
I didn't realize that I posted it in the wrong spot.
You've deleted it from the wrong spot, this thread no longer has a header.
I'm glad it worked for you - I only found out about that message myself a month or so ago. It's pretty cool.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|