|
from mapidefs.h line 396
typedef union tagCY {
struct {
#ifdef _MAC
long Hi;
long Lo;
#else
unsigned long Lo;
long Hi;
#endif
};
LONGLONG int64;
} CY;
and from MSDN
IFont::get_Size
Retrieves the point size of the font expressed in a 64-bit CY variable. The upper 32-bits of this value contains the
integer point size and the lower 32-bits contains the fractional point size.
HRESULT get_Size(
CY* psize
);
Parameters
psize
[out] Pointer to the caller-allocated variable that receives the size.
Return Values
The method supports the standard return value E_UNEXPECTED, as well as the following:
S_OK
The size was retrieved successfully.
E_POINTER
The address in psize is not valid. For example, it may be NULL.
CY CYsize;
pIFont->get_Size(&CYsize);
int Height = CYSize.Hi;
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
If CFont has the capabilities to do the conversion, why not copy the code from there.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
If I have an .INI file stored on a server and several instances of an application (on different PCs) accessing it by means of GetPrivateProfileString() function. Is it possible for one user to lock the file by calling GetPrivateProfileString() and causing another user's GetPrivateProfileString() call to fail? In other words, what happens when two users attempt to access the same .INI file at the same time?
D Osborn
|
|
|
|
|
Are all of the machines that are trying to access this ini file running the same version of windows? If not, is it always the Win 9x/ME machines that are failing?
|
|
|
|
|
For those who came in late ...
The 1st Phantom swore an aoth on the skull of his father who had been killed by Pirates to fight evil. Ghost Who Walks .....
Whoops sorry wrong story. Anyway my All American Dream Database program continues. Previous help I received here recommended I set the width of the first column of my ListCtrl to zero to hide the Primary Key from the user. This worked a treat, I required the key to be in the row to make it easy for myself to update the selected database record when required.
Now I wish to allow my user on another screen to reorder the records independant of the key. By this I mean I have an Order column for use in reports that the user can reset the order.
I envisaged using the ListCtrl that has become my friend in this project. I would display the Customer (with hidden Primary Key), allow them to re-order the list and then I would cycle through the records updating them sequentially with the new order.
Problem is the SetItemPosition() function only works when in Icon or Small Icon mode and SetExtendedStyles only has drag and drop ability on rows not columns. Of course I am using Report mode and need to re-order the rows not columns. This stops me from using drag and drop or Up/Down command buttons to enable the re-ordering.
What have I missed? I'm sure it is obvious but not to me. How should I be doing this, preferably I would like to be able drag the row into it's new position.
Thanks in advance for the help.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Hi all,
I have a question. I am writing a program that scans the keyboard for keypresses and stores them in a file. This seems to work fine when I use it in the main app window but when I want to go to another external application and scan for keypresses there it won't let me do it. Has anybody got any suggestions on how I could do this or has anybody any example source code for this?
I would be very grateful if you could help me.
cheers,
Dave.
P.S. if you could mail me at david.higgins@compaq.com with any suggestions I would be grateful too.
|
|
|
|
|
Hi David!
See MSDN article "Win32 Hooks".
|
|
|
|
|
I overrided the OnCreateClient function for my MDI child window to add a splitter. Everything work just fine except when I type into one of the views I get an illegal error, and I beleive everyone knows what i'm talking about. I was just really hoping someone here could help me with this problem. Also I am compiling with a shared DLL for MFC and service pack 3.
|
|
|
|
|
Someone please help, also I am not using Doc/View architecture.
|
|
|
|
|
What kind of error are you getting? be a little more specific.
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
Well, when I press on the details it says it's an invalid page fault. Then when I debug it, it says unhandled exception in raIRC.exe(MFC42.dll) 0xC0000005: Access Violation. And in the dissasembly it shows me this line: 5F41A33D mov eax,dword ptr [ecx]
|
|
|
|
|
Please, someone help me with this.
|
|
|
|
|
I take it raIRC.exe is you application, the resto of the stuff does not help me much. Check you call stack, is there any of the functions you are overiding in it? If not, try setting a break point just before the code you just entered that is casing the problem, then just step throught till it bombs... do some tracing... make sure all the pointers your using are valid
-Ben
---------
On the topic of code with no error handling -- It's not poor coding, it's "optimistic"
|
|
|
|
|
I did that, and the code work perfect in Doc/View except the person that told me how to use splitters said it would work without the Doc/View.
|
|
|
|
|
I'm very confused about characters under Windows, I need some answers, if
you know any online books or
articles about international programming please tell me.
First of all what I don't understand is what kind of character do we receive
in wparam along with the WM_CHAR message. I read in a Win 95 book that it is
an ANSI character. Under 2000 it seems like it is not.Then what is the
installed language. What is the difference between setting a certain System
Locale and setting an input language or a keyboard layout. Then what is the
effect of installing some OEM code pages and not install others. What are
the steps that TranslateMessage() function takes to create a WM_CHAR
message from the virtual key, what kind of information in Regional options
does it use on each step and then how exactly does Windows display the
character (for example when typing in Run dialog). Probably I need this
information for both Win 95 (which I understood is not "fully Unicode
compliant" - I need this term explained too) and WinNT or 2000.
Thanks in advance for answer, if you ain't got time for all these, at
least please point me to some serious documentation please. I haven't been
able to figure all things out from MSDN.
Lucian
|
|
|
|
|
I need for my automation to catch value in excel, which have date format. I would like to create a dialog box where the user could give a date. So, I create a COleDateTime object : m_date, and I want to compare this value to others which are kept in my excel sheet. How could I do that?
Thanks
gerald
|
|
|
|
|
If you put the dates from your Excel sheet into a COleDateTime object then you can simply just do a m_date == m_excelDate.
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
OK, but what do you use to do that?
|
|
|
|
|
OK, but what do you use to do that?
|
|
|
|
|
Are you asking how to get the value from Excel through your addin or how do you put the time into a COleDateTime? As far as the automation part goes I don't have a clue, I've only written Outlook Add-ins. But, as far as the COleDateTime question, to copy a time into one you can just pass it in the constructor, assuming its a FILETIME or SYSTEMTIME, like so:
COleDateTime dt(myExcelDateTime);
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
I need for my automation to catch value in excel, which have date format. I would like to create a dialog box where the user could give a date. So, I create a COleDateTime object : m_date, and I want to compare this value to others which are kept in my excel sheet. How could I do that?
Thanks
gerald
|
|
|
|
|
if i was creating a control in a form i might do this:
ctrl->Create(WS_CHILD, r, this, ID_EXTENDED_EDIT);
ctrl->ShowWindow(1);
Which works fine, however I want my control to be a child of the desktop ie free floating modeless dialog box, so I thought:
ctrl->Create(WS_CHILD, r, this->GetParent(), ID_EXTENDED_EDIT);
ctrl->ShowWindow(1);
would work, but it crashes and I cant see why... any help?
|
|
|
|
|
I'm willing to bet that Microsoft doesn't want you to be able to do that, maybe they feel it would affect there OS in some way but at any rate I doubt you can do it.
|
|
|
|
|
Hi all,
In my application, I develop a class CDIB for displaying the image. And now, I'd like to add some method such as: Brightness, Contrast, Colorize. But I don't know. Can you help me?
Thanks in advance for your reading.
Ngo Khai Hoa
|
|
|
|
|
To do this you need direct pixel access, which I assume your class has, i.e. I assume your DIB is a CDIBSection.
Brightness is easy, just add an amount to each of the RGB values for each pixel. Contrast involves trending high values up and low values down. What does colorise mean ?
The pointer to the pixel data is passed into the call that creates the DIBSection. If you want more info on different filters, I'd be happy to dig up something. If you're remotely serious you should buy Windows Graphics Programming by Feng Yuan, which contains heaps of info on filters ( it's where I initially learned about them ). There are also some newsgroups worth reading.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|