Click here to Skip to main content
15,921,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: 'WS_EX_LAYERED' : undeclared identifier Pin
Michael Dunn31-Jan-02 18:49
sitebuilderMichael Dunn31-Jan-02 18:49 
GeneralAnyone Help me? is office automation about.... Pin
Kind31-Jan-02 16:14
Kind31-Jan-02 16:14 
GeneralRe: Anyone Help me? is office automation about.... Pin
wangyiming31-Jan-02 19:40
wangyiming31-Jan-02 19:40 
Questionconvert string to int?? Pin
31-Jan-02 15:55
suss31-Jan-02 15:55 
AnswerRe: convert string to int?? Pin
Tim Smith31-Jan-02 16:03
Tim Smith31-Jan-02 16:03 
Generalthanks Tim Pin
marouane miftah el kheir31-Jan-02 16:52
marouane miftah el kheir31-Jan-02 16:52 
AnswerRe: convert string to int?? Pin
wabc31-Jan-02 19:31
wabc31-Jan-02 19:31 
GeneralA stupid question about "Unit" and "Unit conversion" for IPicture stuff.. Pin
31-Jan-02 14:06
suss31-Jan-02 14:06 
Hi, everybody,

This may be a stupid question, but I really hope somebody to help me...
I got some trouble about the "unit" and "unit conversion" for rendering an image.

I have read some people's share codes on this web site. Those codes are all for image rendering with the COM interface IPicture. Here are my questions.

1. IPicture::get_Width: Returns the current width of the picture in the picture object. (from MSDN), the API is as follows:

HRESULT get_Width( OLE_XSIZE_HIMETRIC* pwidth //Receives a pointer to width );

My question is, what kind of unit we get from pwidth ? I mean, is pwidth in inch ? or in mini-meter ? or anything else ? Does this IPicture use MM_HIMETRIC coordinate system ?

2. If there are some code segment related to calculate the dimension (in pixels) of an image,

HIMETRIC_INCH is 2540

long hmWidth;
long hmHeight;
m_pPicture->get_Width(&hmWidth); /// m_pPicture is of type pointer to ///IPicture

m_pPicture->get_Height(&hmHeight);

rcResult.cx = MulDiv(hmWidth, pDC->GetDeviceCaps(LOGPIXELSX), HIMETRIC_INCH);
rcResult.cy = MulDiv(hmHeight, pDC->GetDeviceCaps(LOGPIXELSY), HIMETRIC_INCH);

Could anybody explain why HIMETRIC_INCH (2540) is used above ? And explain more about the above formula ? Is hmWidth (or hmHeight) in mini-meter ?

Thanks in advance ! Any reponse will be appreciated !


GeneralRe: A stupid question about "Unit" and "Unit conversion" for IPicture stuff.. Pin
wangyiming1-Feb-02 15:31
wangyiming1-Feb-02 15:31 
GeneralA question regarding SQL server Pin
User 988531-Jan-02 13:43
User 988531-Jan-02 13:43 
GeneralRe: A question regarding SQL server Pin
Christopher Lord2-Feb-02 15:25
Christopher Lord2-Feb-02 15:25 
GeneralVisual Assist 5b Pin
Jon Sagara31-Jan-02 13:37
Jon Sagara31-Jan-02 13:37 
GeneralRegister class, but I can't find memory leak of 1 byte, please help! Pin
S van Leent31-Jan-02 12:28
S van Leent31-Jan-02 12:28 
GeneralRe: Register class, but I can't find memory leak of 1 byte, please help! Pin
Joaquín M López Muñoz1-Feb-02 9:19
Joaquín M López Muñoz1-Feb-02 9:19 
GeneralRe: Register class, but I can't find memory leak of 1 byte, please help! Pin
S van Leent1-Feb-02 10:43
S van Leent1-Feb-02 10:43 
GeneralLearning STL Pin
31-Jan-02 11:37
suss31-Jan-02 11:37 
GeneralRe: Learning STL Pin
Jon Sagara31-Jan-02 12:20
Jon Sagara31-Jan-02 12:20 
GeneralLost Macro/Add-in tab Pin
David Chamberlain31-Jan-02 11:31
David Chamberlain31-Jan-02 11:31 
QuestionMSDN Jan 2002 with Visual Studio 6? Pin
Ron Olson31-Jan-02 10:05
Ron Olson31-Jan-02 10:05 
AnswerRe: MSDN Jan 2002 with Visual Studio 6? Pin
Michael P Butler31-Jan-02 10:36
Michael P Butler31-Jan-02 10:36 
AnswerRe: MSDN Jan 2002 with Visual Studio 6? Pin
Michael Dunn31-Jan-02 11:34
sitebuilderMichael Dunn31-Jan-02 11:34 
AnswerRe: MSDN Jan 2002 with Visual Studio 6? Pin
Not Active31-Jan-02 13:06
mentorNot Active31-Jan-02 13:06 
AnswerRe: MSDN Jan 2002 with Visual Studio 6? Pin
Mazdak31-Jan-02 18:15
Mazdak31-Jan-02 18:15 
GeneralRe: MSDN Jan 2002 with Visual Studio 6? Pin
14-Feb-02 1:35
suss14-Feb-02 1:35 
GeneralRe: MSDN Jan 2002 with Visual Studio 6? Pin
14-Feb-02 5:22
suss14-Feb-02 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.