|
I don't want to display, or flash the page. I want to be able to use the controls before it's selected for the first time.
|
|
|
|
|
Is it possible to add a bitmap as a "top-level" menu item in a window's menu bar? I understand you can use bitmaps in submenus as owner-draw type menus, but I'm having trouble adding a bitmap to the toplevel menu. Any help would be much appreciated
Thanks,
Ben
|
|
|
|
|
You could just make the top section of your application have the bitmap menu bar displayed and when a user clicks on one of the sections pop up a context menu.
|
|
|
|
|
I recently upgraded my system from win98 to win2k (I know I'm a little behind on OS's) and I reinstalled VC++ 6.0 and when I compile a program that compiled perfectly under win98 it gives me these linker errors:
ShellTree.obj : error LNK2001: unresolved external symbol "public: struct _ITEMIDLIST * __thiscall CShellPidl::CopyITEMID(struct IMalloc *,struct _ITEMIDLIST *)" (?CopyITEMID@CShellPidl@@QAEPAU_ITEMIDLIST@@PAUIMalloc@@PAU2@@Z)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: struct _ITEMIDLIST * __thiscall CShellPidl::ConcatPidls(struct _ITEMIDLIST const *,struct _ITEMIDLIST const *)" (?ConcatPidls@CShellPidl@@QAEPAU_ITEMIDLIST@@PBU2@0@Z)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: int __thiscall CShellPidl::GetName(struct IShellFolder *,struct _ITEMIDLIST *,unsigned long,char *)" (?GetName@CShellPidl@@QAEHPAUIShellFolder@@PAU_ITEMIDLIST@@KPAD@Z)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: int __thiscall CShellPidl::GetItemIcon(struct _ITEMIDLIST *,unsigned int)" (?GetItemIcon@CShellPidl@@QAEHPAU_ITEMIDLIST@@I@Z)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: int __thiscall CShellPidl::DoTheMenuThing(struct HWND__ *,struct IShellFolder *,struct _ITEMIDLIST *,struct tagPOINT *)" (?DoTheMenuThing@CShellPidl@@QAEHPAUHWND__@@PAUIShellFolder@@<br />
PAU_ITEMIDLIST@@PAUtagPOINT@@@Z)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CFileName::~CFileName(void)" (??1CFileName@@UAE@XZ)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CFileName::Exist(void)" (?Exist@CFileName@@QAE_NXZ)<br />
ShellTree.obj : error LNK2001: unresolved external symbol "public: __thiscall CFileName::CFileName(class CString)" (??0CFileName@@QAE@VCString@@@Z)<br />
Release/autorun.exe : fatal error LNK1120: 8 unresolved externals<br />
Error executing link.exe.
Is there a quick fix to make thiese errors go away, or will I have to rewrite the program?
|
|
|
|
|
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?
|
|
|
|