|
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
|
|
|
|
|
CWinApp::m_lpCmdLine
Corresponds to the lpCmdLine parameter passed by Windows to WinMain. Points to a null-terminated string that specifies the command line for the application. Use m_lpCmdLine to access any command-line arguments the user entered when the application was started. m_lpCmdLine is a public variable of type LPSTR.
You could use any number of the 'command line option parsers' available eitehr here or at codeguru.com to break up the command line string.
|
|
|
|
|
Is it possible to intercept and parse the HTML that IE requests before IE does?
|
|
|
|
|
Yes , it's posible . Search at msdn.microsoft for "Browser helper objects" .The parsing , that's another story ...
|
|
|
|
|
can one do the same with replacing and deletion of files within explorer too???
|
|
|
|
|
Try with the interface ICopyHook . For more details look at windows shell programming.
|
|
|
|
|
hi,
i added to my consol application (supporting MFC) the microsoft winsock 6.0 control.
my problem is : i don't know how to work with it.
i know the Create() , Bind() , Connect() function in CSocket class, but i can't do the same with CMSWinsockControl class........
can any1 write sample code or refer me to one that shows how to handle this class???
tnx again.....
uzeb
|
|
|
|
|
I make an editor with a CRichEditView, I want to add a page break function.
How can I add a page break in this control ?
I found a page break effect in PARAFORMAT2 but it's disable.
Is someone have an idea ?
Than you
|
|
|
|
|
This Microsoft article http://support.microsoft.com/support/kb/articles/Q99/8/00.ASP
says that by just calling ShowWindow(SW_HIDE) will hide the app from
both the task bar and task list. I tried in Win98 and it just hides from task bar but
NOT the task list. Any help is appreciated.
Thanks.
|
|
|
|