15,904,023 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by the vacuum (Top 14 by date)
the vacuum
7-May-14 5:44am
View
Thanks for your reply?, Sorry, I'm new in MFC, I couldn't get what you explained?
Did you mean to use splitter window?
If so.. for example I have splitted the window to two part with two columns and one row ie Pan(0, 0) & Pan(0, 1).
Then if I need to display first opening image file(using CDocument::OnOpenDocument) in Splitter Pan(0, 1), how can I do this? where I specify to display it in second splitter pan(0,1)?
I'm using CView::OnDraw to display the image. The image have been copy to a memory dc before writing to the window. Can I use this handle to do..?
What I understanding that each splitter pan in splitter window has a handle & I can map the image file or memory dc to that handle. Is it right? If so how can I get the handle of a particular splitter pan?
Also, I have implemented facility for zooming and panning image. For its calculations I'm using size of frame that displaying particular image file. So I have to get size of the window(splitter) pan where a particular image is displayed for zooming and panning it individually?
the vacuum
29-Apr-14 3:45am
View
how can extend the application window to second monitor?
the vacuum
27-Mar-14 1:07am
View
Thank you very much for the solution...
Sorry for the inconvenience I couldn't understand what you mean by the statement
"If you want to shift the origin, than you have also to change the x and y by the difference divided by zoom factor."
Do you mean x & y of the source(xSrc & ySrc parameters in StretchBlt) or the destination window (x & y parameters)?
another doubt is
what you mean by "difference" difference between which values?
Currently my program working properly except this requirement. I had analyzed image processing libraries like CxImage on the starting, but as i application is simple one I don't need them.
My doubt about StretchBlt is about the mapping of image to destination window while it varies. For example my image size is 100 x 100 and my destination window size is 50 x 70 then In to which pixel of the destination rectangle the image pixel(50, 50) will be displayed?
Also if the destination rectangle size changes to (500 x 600) then to where the image pixel(50, 50)will be mapped to?.
I expect, if find a solution to calculate the mapping between the image pixels to the destination pixel, the image pixels can be relocated to any pixel in window coordinates.
My understanding is that the CSrollView::GetScrollPosition method gives the documents width & height point in left top position of scroll window. Like that have any function available in CView?
the vacuum
26-Mar-14 2:08am
View
Anyway I avoided CSrollView and used CView ...
Thanks for helps..........
the vacuum
20-Mar-14 5:00am
View
I tried that, but the mouse click event in toolbar is not forwarding to my view class..
the vacuum
17-Mar-14 0:18am
View
thank you for your support............
the vacuum
14-Mar-14 6:33am
View
I got two solutions from the link
http://stackoverflow.com/questions/6691292/create-cimage-from-byte-array
I have checked both of them and are working...
the vacuum
14-Mar-14 2:59am
View
Unfortunately above code not working, it only creating a black Image in CImage object. Can I use memory DC in CreateDIBSection function?.
Or
if use CImage::Create method how can set the image byte array values?
the vacuum
14-Mar-14 0:41am
View
Deleted
Unfortunately above code not working, it only creating a black Image in CImage object. Can I use memory DC in CreateDIBSection function?.
Or
if I use CImage::Create method hoe I can set the image bite?
the vacuum
13-Mar-14 12:32pm
View
Deleted
Unfortunately above code not working, it only creating a black Image in CImage object. Can I use memory DC in CreateDIBSection function?.
the vacuum
13-Mar-14 12:29pm
View
Deleted
can I use memory dc in CreateDIBSection?
the vacuum
13-Mar-14 12:26pm
View
Deleted
unfortunately, this not working, it creating a black document only
the vacuum
12-Mar-14 1:44am
View
BOOL CDCMImage::LoadFromFile(LPCTSTR pszFileName)
{
m_oeImgType = IMG_NONE;
if(TRUE != m_CImage.IsNull())
m_CImage.Destroy();
CDicomImage oCDicomImage;
CString cstrfilename= pszFileName;
cstrfilename.Replace(_T('\\'), _T('//'));
char achfilename [200]= "";
USES_CONVERSION;
strcpy(achfilename,T2A(cstrfilename));
if(TRUE == oCDicomImage.OpenDCMFile((const char*)achfilename))
{
m_oeImgType = IMG_DCM;
void *pvDibData = NULL;
CSize ImgSize(0, 0);
ImgSize = oCDicomImage.DCMImageDIBData(pvDibData);
if((ImgSize != CSize(-1, -1)) && (pvDibData != NULL))
{
BITMAPINFO oBMI;
oBMI.bmiHeader.biSize = sizeof(oBMI);
oBMI.bmiHeader.biWidth = ImgSize.cx;
oBMI.bmiHeader.biHeight = -ImgSize.cy;
oBMI.bmiHeader.biPlanes = 1;
oBMI.bmiHeader.biBitCount = 24;
oBMI.bmiHeader.biCompression = BI_RGB;
oBMI.bmiHeader.biSizeImage = 0;
// hbmp Should destroy after use
m_hbmpDCM = CreateDIBSection(NULL, &oBMI, DIB_RGB_COLORS, (void**)&pvDibData, NULL, NULL);
if(m_hbmpDCM)
{
m_CImage.Attach(m_hbmpDCM);
}
if(pvDibData)
{
delete pvDibData;
pvDibData = NULL;
return true;
}
}
}
else
return false;
}
Given code is part of my program for reading a DICOM file from directory and to attach the dicom image data as a CImage type member of my class "CDCMImage". The pixel data of the reading DICOM image will get at "pvDibData" by call to function "oCDicomImage.DCMImageDIBData(pvDibData)" and . Upto that part part is correct I have already verified it. My problem is in remaining part which create CImage using the pixel data. Issue is how to create a CImage from the pixel data and other image details(image size, bit count etc.)which I already have?.
As you can view in code, I used "CreateDIBSection" windows function with HDC parameter (first parameter )as creating CImage. I'm not sure whether it is correct. Can I use it like that?
the vacuum
10-Oct-13 2:02am
View
Only need low frequency signals, so 11KHZ sampling frequency & 16 bit resolution is enough.My plan is to do it as part by part so I first implemented part to capture the sound from mic and to record it with required quality as .wav file, it's working. Now my main issue is to transfer it to the destination system through serial COM port within my transmission limits(100 Kbps) without any loss of data. I gone through serial comm related articles, my understanding is that.. have to do comm buffer management & flow control mechanisms for the effective transfer(and for playing it real time at the destination PC).
Show More