|
You're not checking the event that happened over your tray icon. You should display your menu only if the mouse event was WM_RBUTTONUP, ie:
case WM_TRAYICONCALLBACK:
{
if ( MY_TRAY_ICON_ID == wParam &&
<font color=red>WM_RBUTTONUP == lParam</font> )
{
}
}
break;
|
|
|
|
|
How to get the domain name.
I think there must be somthing like ::GetComputerName but I cant find it.
Thank you
|
|
|
|
|
|
HI
Can someone tell me how to add an sub-item to the main-menu runtime. Some short samples would be excellent.
regards, KNEI
|
|
|
|
|
Hello,
I am using InfoZip library to one of my application(zipdll.dll and unzdll.dll). I want to list out all the files in a zipped file without unzipping. Please let me know how to get this.
Thanks in advance.
Regards,
Murugesh.S
|
|
|
|
|
Focus on reading the file headers from the ZIP file.
They contain the information you would want to know about the files and folders without unzipping.
There should be a function to read or enumerate through the headers.
|
|
|
|
|
Hello!
I got a strange linker error
(EFDBListCtrl.obj : error LNK2001: Unresolved external Symbol "public: static struct CRuntimeClass const CEFListCtrl::classCEFListCtrl" (?classCEFListCtrl@CEFListCtrl@@2UCRuntimeClass@@B)
and
EFDBListCtrl.obj : error LNK2001: Unresolved external Symbol "protected: static struct AFX_MSGMAP const CEFListCtrl::messageMap" (?messageMap@CEFListCtrl@@1UAFX_MSGMAP@@B))
The error only occur on following circumstances:
CEFListCtrl exists in MFC_Extension-DLL_A
CEFDBListCtrl exists in MFC_Extension-DLL_B
(CEFDBListCtrl inherits from CEFListCtrl)
When putting CEFDBListCtrl out from DDL_B into the EXE-Module everthing works fine.
I think the project settings are OK (linking with lib's..)
there are no unresolved externals for other functions of
CEFListCtrl.
|
|
|
|
|
Well, First check if you are exporting and importing OK.
http://support.microsoft.com/support/kb/articles/Q128/1/99.asp
Concerning a possible MFC bug take a look at
http://support.microsoft.com/support/kb/articles/Q152/2/54.asp
|
|
|
|
|
Hello, I'm trying to create a control that's derived from CWnd, has a scroll bar, and dynamically adds several CStatic's that are displayed in the initial view and when the user scrolls downward (this is also in a dialog). My problem is that when I create a control and set its' position so that it can't be seen until you scroll down, it never appears. Only the CStatic's I create that are within the initial view ever appear.
|
|
|
|
|
what is the bellow macro mean? (in icrsint.h)
"#define classoffset(base, derived) ((DWORD)(static_cast<base*>((derived*)8))-8)
"
I think it offset to the vtable of the base class. is it right?
|
|
|
|
|
Hi,
I have some codes developed using VC++6.0 on Windows 2000 Professional RC3:
...
SetCommBreak(commPort);//comPort is a handle to com1
sleep(certain_value);//
ClearCommBreak(commPort);
...
I have a sniffer program running on another pc B which has special cables connected to the pc A running above program, and A is connected to pc C.
B detects one and only one byte which is 0x00 when above codes are executed when certain_value is larger than 10, and sometimes none or 0xff when certain_value is less than 3. I am pretty confident the sniffer program is OK.
My question is: is data 0x00 supposed to appear on the line?
What I want is to send a break signal from A to C AND C won't think A sends some thing before the break signal.
By the way, I have tried PurgeComm(..) before setcommbreak, it doesn't work.
Is it a W2K thing or this is the way it works?
Thanks a lot
Barry
|
|
|
|
|
Hi,
I had the same situation a LONG time ago... When I was setting\clearing the break signal one character (0xFF) was transmitted. In my case it was not a problem, because as soon as I detect a Break signal I clear all my buffers. Probably you should change the way you exchange the data, so that an extra character will not destroy the information. Think about something old and simple as Kermit/XModem/YModem protocols.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Does anybody know how to change the selection color of a CRichEditView?
Thank you in advance...
|
|
|
|
|
CHARFORMAT cf;
CRichEditCtrl& r = GetRichEditCtrl().GetSelectionCharFormat(cf);
long iStart, iEnd;
r.GetSel(iStart, iEnd);
r.GetSelectionCharFormat(cf);
cf.dwEffects ^= CFE_AUTOCOLOR;
cf.crTextColor = RGB(163, 15, 200); //Choisi ta couleur
cf.dwMask |= CFM_COLOR;
r.SetSelectionCharFormat(cf);
|
|
|
|
|
I need to save a key and all it's subkeys.
The key is: HKEY_CURRENT_USER/Software/{company name}/{app name}
I then need to restore all those keys to a new {app name}
How do I do that ?
I know the functions: RegSaveKey and RegRestoreKey, but I need to do that under win95/98 also and RegRestoreKey is not available under these OS.
thanks,
Louis.
|
|
|
|
|
Try with RegSaveKey - RegReplaceKey pair
|
|
|
|
|
Yes I'm ready to 'try' but the doc says that the change will be effective only after reboot!! Not very elegant
to ask your users to reboot their machine after starting up
the program.
Have you tried this function ? Is that really the case ?
thanks,
Louis.
|
|
|
|
|
Enumerate all the keys and values in the tree.
Then write out a file in the REG format that RegEdit or RegEdt32 uses.
You can then run the RegEdit passing it command line arguments to reload the REG file.
The REG files are text files.
No reboot would be required.
|
|
|
|
|
Hi,
How can print a source file in color with Visual C++ IDE ?
Thanks
Claude
|
|
|
|
|
Hello,
The the add-in located here
http://codeguru.earthweb.com/devstudio_macros/HtmlOut.shtml
Regards,
Paul.
|
|
|
|
|
I'm using a CPropertyPage derived class in wizard mode. To change the caption of the wizard dialog after a DoModal() call I use the following code in one of the propertypages:
CEvaluatorWzd *pEvaluatorWzd = (CEvaluatorWzd*)GetParent();
int nPage = pEvaluatorWzd->GetActiveIndex();
CTabCtrl* pTab = pEvaluatorWzd->GetTabControl();
TC_ITEM ti;
ti.mask = TCIF_TEXT;
ti.pszText = pszText;
ti.cchTextMax = 100;
pTab->SetItem(nPage, &ti);
CEvaluatorWzd is the derived from CPropertySheet
This works fine for the first most pages, except for those pages where I return -1 from a CPropertyPage::OnWizardNext or ::OnWizardNext to prevent the wizard from changing pages
HELP!!!
|
|
|
|
|
I've created CView-derived class thats contains Stingray's objective grid. I need to arrange it as MFC extention DLL. But gxinit() function bring up assertion fault when calls AfxGetInstanceHandle(). Have any suggestions how to avoid this problem?
|
|
|
|
|
What do I need to write add-ins to explorer? Is there a special sdk to use or what?
Any Urls with tutorials / descriptions on this subject would be apreciated.
|
|
|
|
|
What type of add-ins are you referring to? DeskBands, Explorer Bars, ToolBars, Browser Helper Objects? Other?
The "Creating DeskBands with an ATL Object Wizard" in the ATL section, has links to MSDN Online resources for creating deskbands and toolbars, there are old MSJ/MIND articles that explain how to do browser helper objects and explorer bars. The links I made reference to are in the comments section of the article, in one of the postings from me.
Hope this helps,
-Erik
|
|
|
|
|
How do I retrieve the parameters that are given when the user executes the .exe file?
/XTSea
|
|
|
|