|
Rafael Fernández López wrote:
...how to create a visual control for visual c++ from 0
What does this mean?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
sorry my english is not very good, i'm from spain. from the beggining, with no parent class, is more or less what i want to say. but with owner draw and so on... thanks !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Just a guess, but do any of the articles here explain how to create the control you are interested in?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Anyone have any idea why:
RECT rect = {0, 0, 0, 0};<br />
<br />
if (GetThemeRect(hTheme, WP_MINBUTTON, MINBS_NORMAL, TMT_RECT, &rect) == S_OK)<br />
{<br />
}
would return S_OK but not change the value of rect ?
hTheme is good and other Theme functions work.
Thanks.
Rail
|
|
|
|
|
|
I have read and looked over all the samples in this forum related to email and Outlook. I'm trying to find a way to actually programmatically retrieve all the Emails currently in the user's Inbox in Outlook, and to even delete them if needed. Most of the programs deal with getting the mail every time a new message is received, but I'm trying to write an app that can get all the actual emails that are actually in the user's inbox when the app starts, to then forward them to another email address (still using the original sender's emailaddress as the ReplyTo field) and deleting them if the user wants after they're forwarded. Any help would be greatly appreciated. TIA (thanks in advance);)
If it's broken, I probably did it
bdiamond
|
|
|
|
|
bdiamond wrote:
I'm trying to find a way to actually programmatically retrieve all the Emails currently in the user's Inbox in Outlook...
Using Outlook automation:
if (app.CreateDispatch("Outlook.Application") == TRUE)
{
ns = app.GetNamespace("MAPI");
ns.Logon(vtOptional, vtOptional, vtTrue, vtTrue);
folderInbox = ns.GetDefaultFolder(olFolderInbox);
itemsMessages = folderInbox.GetItems();
for (int x = 0; x < itemsMessages.GetCount(); x++)
{
mi = itemsMessages.Item(COleVariant((long) x + 1L));
TRACE("Message %d, subject = %s\n", x, mi.GetSubject());
}
ns.Logoff();
}
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
WoW!!! thanks!! that helps a whole hell of a lot. Do I have to include any certain files to use this? Where can I find any more documentation on this? Like so I can also delete those messages from the inbox? Hope I'm not asking too much But I really appreciate all the help you've given me in the past (through others' posts also). Keep up the good work. Oh, also I value your opinion, I was wondering if you looked at the article I posted a few weeks ago entitled 'Modeler'? It's a directX application that i posted a few weeks ago. About 3,400 people have viewed it, but only 12 have rated it, and only 1 person has commented on it. I kinda wish there was a download counter instead of just a view counter so you could see how many people have downloaded your files.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
bdiamond wrote:
Do I have to include any certain files to use this? Where can I find any more documentation on this?
Read MSDN article Q178749.
bdiamond wrote:
I was wondering if you looked at the article I posted a few weeks ago entitled 'Modeler'? It's a directX application that i posted a few weeks ago.
Doubtful, as I no nothing of DirectX.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
also, what type of declarations should I be using for 'ns', 'folderInbox', and 'itemsMessages'? Sorry if I sound dumber than I am, or if you thought I was smarter than I am
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Hi. I'm porting an application from Macintosh to Windows, and at some point the function StillDown() is used. I can't seem to find a way to figure out whether the mouse button is pressed on Windows... Is there a function for that?
|
|
|
|
|
Check out the WM_LBUTTONDOWN and WM_LBUTTONUP messages.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yea, that's what I do now. I set up a boolean at mouse down, and mouse up the boolean is set to false. The problem is, however, when the mouse is down some sort of a drag operation is started. The StillDown function on the mac is used in a while loop, I tried to do the same for windows, but of course that ends up being an endless loop...
|
|
|
|
|
Capture the mouse on the first WM_LBUTTONDOWN , then handle WM_MOUSEMOVE , checking the wParam . Be sure to release capture on WM_LBUTTONUP or when your app loses focus!
WM_MOUSEMOVE
fwKeys = wParam; // key flags
xPos = LOWORD(lParam); // horizontal position of cursor
yPos = HIWORD(lParam); // vertical position of cursor
Parameters
fwKeys
Value of wParam . Indicates whether various virtual keys are down. This parameter can be any combination of the following values:
MK_CONTROL Set if the ctrl key is down.
MK_LBUTTON Set if the left mouse button is down.
MK_MBUTTON Set if the middle mouse button is down.
MK_RBUTTON Set if the right mouse button is down.
MK_SHIFT Set if the shift key is down.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I found what I was looking for. Apparently, GetAsyncKeyState (found in the keyboard section of MSDN) can also query whether the mouse button is down, which was exactly what I was looking for. Thanks anyway
|
|
|
|
|
|
Under several circumstances that will fail. The only reliable way of tracking when the mouse button is released is by capturing in on the down message.
One failure point is if you have an overlapping window or the user very quickly drags the mouse to another application.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Not quite sure what ya mean. It seems to work fine here when I drag the mouse out of the window? And I don't see how overlapping windows could occur?
|
|
|
|
|
Windows is message driven so using a loop to monitor where the mouse is is self-defeating. You incur a performance penalty for no reason.
If you simply need to know when a mouse leaves a window, use TrackMouseEvent with the TME_LEAVE option.
If you are monitoring the mouse with the button down, the prescribed method is to use mouse capture so that the mouse message will be sent to that window.
As for overlapping windows; this is windows. Unless you have taken over the screen, there are all sorts of overlapping windows present. Your app is guaranteed to receive mouse messages only if you are capturing the mouse with the button down. (What if an other app pops up over the window which you are monitoring?)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi!
I've started to write an Activex, in the Appwizard I have unchecked the option "visible at runtime". Now, (I few days later), I have realized that I need the activex visible at runtime.
How could I go back an change this option without starting a new Activex project?.
Thank you.
Demian.
|
|
|
|
|
Go ahead and create a new, temporary project with that option checked. Now compare the settings between the two projects.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hey,
I'm trying to read Integers from a binary data file. I've been using the CArchive Read(char[],int) function, then converting the byte using CString Format("%X",char[i]).
I'm testing all the values against a HEXeditor, and things work well, but when the byte i read has a 1 in the lefternmost position, the value that my char array holds is the 2's complement for that value.
EX. when it reads "B3"(1011 0011) from the file, my value at char[i] == "4D" (0100 1101)
A. why is this happening?
and ...
B. is there someway i can zap it back to the original number?
Thanks a lot,
Mike
"I bet Einstein turned himself all sorts of colors before he invented the light bulb." -- Homer J.
|
|
|
|
|
just a guess, but could it be a signed/unsigned conflict.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
If the values were written to disk as char , they need to be read as char . If they were written to disk as int , they need to be read as int .
Consider the following:
CFile file(..., CFile::modeCreate | CFile::modeWrite);
int nAge = 42;
file.Write(&nAge, sizeof(int));
file.Close(); The file contains 4 bytes that look like 0x2a000000. To read that same value back in, I'd use:
file.Open(..., CFile::modeRead);
file.Read(&nAge, sizeof(int));
file.Close(); The variable nAge contains the value 42. Had I used this instead:
file.Open(..., CFile::modeRead);
char str[4];
file.Read(str, sizeof(char) * 4);
file.Close(); The variable str contains the value 0x0000002a. I think the big/little endian concept might be messing you up. PJ's suggestion is plausible, too.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
is there a way to make them fullscreen when you open them?
|
|
|
|