|
Have you tried cleaning everything and doing a complete rebuild?
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
I'm not sure what you mean by cleaning everything.
have "rebuilt all"
thanks.
|
|
|
|
|
I'm such a dolt. It didn't work because two of my modules weren't included in the project. duh. I feel so stupid.
|
|
|
|
|
Hey everyone!
I'm currently working on my C++ Win32 API wrapper class. There are certain things I have to take care of myself (even though in many cases I'm pretty unsure why after all), like proper sizing of the statusbar. I have a class for the statusbar, and it installs a hook into the WM_SIZE message so it resizes itself once the parent window receives a WM_SIZE message. I didn't get SetWindowPos to work in the sizing handler of the Statusbar, so I use ResizeWindow (Don't have it hand right now, but I think that was the function). Now, if I have another control in the window and parts of that control hide under the status bar, that works fine. But once I click on (or even move over) that control, it paints the hidden parts of itself over the statsbar - NOT good-looking! So, my question is, what do I need to do to prevent the status bar from being drawn over? Are there any flags I have to set during initialization? Or is there anything special I have to consider for the child controls? Any help would be greatly appreciated!
tilli
|
|
|
|
|
I would like to assign the context sensitive help ID for a given CWnd. My CWnd has a CScrollView as its parent. Any ideas would be appreciated.
Chad Scates
|
|
|
|
|
You should be able to adapt code from my article which does this for a CFormView which inherits from CScrollView.
http://www.codeproject.com/winhelp/ContextHelp.asp[^]
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Not exactly what I needed, but pretty close. Five minutes of tweaking with the use of that article and I was done. Thanks!
|
|
|
|
|
Hi, I'm using the following function to send an email from my VC++ 6 application:
_________________
BOOL CEasyUpdateDlg::SendMail(CHAR *lpszFrom, CHAR *lpszTo, CHAR *lpszSubject, CHAR *lpszMessage)<br />
{<br />
BOOL bSent = FALSE;<br />
HINSTANCE hMAPI = ::LoadLibrary(_T("mapi32.dll"));<br />
if(0==hMAPI) <br />
return bSent;<br />
typedef ULONG (FAR PASCAL *PFN_MAPILogon)(ULONG,LPTSTR,LPTSTR,FLAGS,ULONG,LPLHANDLE); <br />
typedef ULONG (FAR PASCAL *PFN_MAPISendMail)(LHANDLE,ULONG,lpMapiMessage,FLAGS,ULONG); <br />
typedef ULONG (FAR PASCAL *PFN_MAPILogoff)(LHANDLE,ULONG,FLAGS,ULONG); <br />
PFN_MAPILogon MAPILogon = (PFN_MAPILogon)::GetProcAddress(hMAPI,"MAPILogon");<br />
PFN_MAPISendMail MAPISendMail = (PFN_MAPISendMail)::GetProcAddress(hMAPI,"MAPISendMail"); <br />
PFN_MAPILogoff MAPILogoff = (PFN_MAPILogoff)::GetProcAddress(hMAPI,"MAPILogoff");<br />
if((0!=MAPILogon)&&(0!=MAPISendMail)&&(0!=MAPILogoff)) <br />
{ <br />
LHANDLE session = 0; <br />
VERIFY(SUCCESS_SUCCESS==MAPILogon(0,0,0,MAPI_NEW_SESSION,0,&session)); <br />
ASSERT(0!=session); <br />
MapiRecipDesc recipient; <br />
::ZeroMemory(&recipient,sizeof(recipient)); <br />
recipient.ulRecipClass = MAPI_TO; <br />
recipient.lpszName = lpszTo; <br />
MapiMessage message; <br />
::ZeroMemory(&message,sizeof(message)); <br />
message.lpszSubject = lpszSubject; <br />
message.lpszNoteText = lpszMessage; <br />
message.nRecipCount = 1; <br />
message.lpRecips = &recipient; <br />
bSent = SUCCESS_SUCCESS == MAPISendMail(session,0,&message,0,0);<br />
} <br />
::FreeLibrary(hMAPI); <br />
return bSent;<br />
<br />
}
_________________
I have found that when I try to send a mail using:
CHAR *lpszTo="whoever@whatever.com" it works great,
but if I do:
CHAR *lpszTo="person1@whatever.com; person2@whatever.com"
no emails are send.
How can I use it to send a mail to several people, not just one recipient?
Thanks so much!
F
|
|
|
|
|
You need to have one MapiRecipDesc for each address you are sending the email to. So in your SendMail function, break up the lpszTo into multiple strings, allocate a MapiRecipDesc array that can hold the required number of items, then have a loop that fills in each MapiRecipDesc in the array. Now, make message.nRecipCount have the correct number instead of 1, and make message.lpRecips point to the MapiRecipDesc array that you allocated. Don't forget to delete the MapiRecipDesc array when you're done.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Chris,
will this send one mail to each of the recipients, or just one mail with the three recipients in the 'to' field?
Thanks so much!
F
|
|
|
|
|
Something like this?
MapiRecipDesc *recipient=new MapiRecipDesc[2];<br />
::ZeroMemory(&recipient,sizeof(recipient)); <br />
recipient[0].ulRecipClass = MAPI_TO;<br />
recipient[0].lpszName = "thefirst@hotmail.com"; <br />
recipient[1].ulRecipClass = MAPI_TO; <br />
recipient[1].lpszName = "thesecond@hotmail.com"; <br />
MapiMessage message; <br />
::ZeroMemory(&message,sizeof(message)); <br />
message.lpszSubject = lpszSubject; <br />
message.lpszNoteText = lpszMessage; <br />
message.nRecipCount = 2; <br />
message.lpRecips = recipient; <br />
bSent = SUCCESS_SUCCESS == MAPISendMail(session,0,&message,0,0);<br />
delete recipient;
(I've simplified and instead of breaking the original lpszTo into various strings, I'm just setting the different recipients manually. When this works, I'll do the breaking thing... But this is not working!).
|
|
|
|
|
The problem here is that you aren't zeroing out the recipient array correctly. Here's the correct way to do it:
int nRecips = 2;
MapiRecipDesc *recipient=new MapiRecipDesc[nRecips];
::ZeroMemory(recipient,sizeof(*recipient) * nRecips);
This worked fine for me. One more note: Make SURE you call MAPILogoff after you are done sending the email:
MAPILogoff( session, 0, 0, 0 );
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Working great, Chris!
How could I thank you?
This has been a massive help for me!
F
|
|
|
|
|
I need to change the color and Font of Objects of CButton and CStatic . How can i do this ?
|
|
|
|
|
Objects derived from CWnd have a SetFont method to do just this (after the HWND is valid, i.e. created).
|
|
|
|
|
Thanks for the info .
The Font can now be effortlessly changed . I was still unable to change teh Forecolor and backcolor of the Static text window .
|
|
|
|
|
Either the parent window of the static text window needs to handle the WM_CTLCOLORSTATIC message, or if you're using MFC, your static window itself should handle the reflected message.
Hint: In either case, the HBRUSH that you use to control the back colour should persist longer than the lifetime of the handler function, or it will likely have no effect.
Steve S
[This signature space available for rent]
|
|
|
|
|
Does anyone know where keyboard macro information is stored? I don't mean where are the macros stored, but where the key/macro mapping is stored. I would like to be able to quickly configure someone else's computer to have the same key combination to macro mapping mine does.
Thanks,
Lee
|
|
|
|
|
Extra->customize->keyboard (or shortcuts -- I'm translating from the german ).
Then choose the category "Macro" and there you are
~RaGE();
|
|
|
|
|
For VC6, it's under the following keys:
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Keyboard
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Keyboard\Aut
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
I have VC++6 ,SP3 on WinNT.
When creating a right-aligned combo-box in WinNT it looks fine.
However, in Win98 the control is not right-aligned.
Do you have any idea how to solve this problem?
|
|
|
|
|
I have an application and it must support language choice and change at runtime.
Is there someone can help me?
Sorry for my English,
Margaria Ivano
|
|
|
|
|
|
Can anyone give me a good link for building a dynamic data exchange between a Matlab.exe and a VisualC++.exe?
Is this possible and where can I find some good information?
Thanx, kind regards,
Geert
|
|
|
|
|
I have find a function on codeguru, DDBToDIB and i get a HANDLE to DIB bitmap. and now how do this :
MAAK wrote:
<code>
HBITMAP hbmp1 = NULL, hbmp2 = NULL;
BITMAP bmp1, bmp2;
..
..
GetObject(hbmp1, sizeof(BITMAP), &bmp1);
GetObject(hbmp2, sizeof(BITMAP), &bmp2);
if(bmp1.bmBitsPixel != bmp2.bmBitsPixel || bmp1.bmHeight != bmp2.bmHeight || bmp1.bmWidth != bmp2.bmWidth)
return 0;
else
{
LPBYTE data1 = (LPBYTE)bmp1.bmBits,data2 = (LPBYTE)bmp2.bmBits;
DWORD bmWidth = bmp1.bmWidth * (bmp1.bmBitsPixel / 8);
DWORD bmWidthBytes = bmWidth + (4 - bmWidth % 4) * bool(bmWidth % 4);
DWORD bytesize = bmp1.bmHeight * bmWidthBytes;
if(memcmp(data1, data2, bytesize) == 0)
return 1;
}</code>
when i have two HANDLE on DIB ?
(sorry for stupid questions but i'm beginer)
|
|
|
|