|
Hi there,
I'm quite a newbe in MFC so i have a few questons handling the common controls :
1. is the a way to catch the Mouse Right click inside a CComboBox - the default is to show
a PopUp menu and i want to do somethig else, how can it be done ?
2. How to cancel the edit mode in a CCombo box (so i can not type in it ?
3. Whats the command to select a line in a CListCtrl ( i tried CListCtrl::SelectItem but
nothing happens)? - all i want to do is make a line selected at runtime ?!?
4. I', using CTreeCtrl and i want to make some nodes disabled in some conditions
and enabled in others, or when a user click a node that shouldn't be enabled to
return to the previous node after showing an error message - how can this be done ?
Thank you alot for your time,
Ariel.
|
|
|
|
|
I have a friend that needs to work in C Builder.
Anybody know, where he can find info, like helps, tutorials, etc.
Thanks a lot....
Carlos Antollini.
|
|
|
|
|
This is one of the best C++ Builder sites, enjoy..
http://www.bcbdev.com/
M.Verlinden
http://www.fictoor.nl/irbot
Let there be C++ Builder...
|
|
|
|
|
Can someone tell me, why in Win98 CDC::SelectObject(/* Some font */) selects the proper font, e.g. Times New Roman, while in NT no selection is made
|
|
|
|
|
|
It looks like this:
void CFormulaEditorView::OnDraw(CDC* pDC)
{
CFormulaEditorDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CFont font;
LOGFONT lf;
memset(&lf, 0, sizeof(LOGFONT));
lf.lfHeight = 20;
lf.lfCharSet = SYMBOL_CHARSET;
strcpy(lf.lfFaceName, "Times New Roman");
VERIFY(font.CreateFontIndirect(&lf));
CFont* def_font = pDC->SelectObject(&font);
|
|
|
|
|
If you want Times New Roman on the screen, don't use SYMBOL_CHARSET. Use other charset ID appropriate for your locale.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks, Tomasz, but you see, I'm working on a kind of formula editor, so it's crucial for me to use SYMBOL_CHARSET.
Could you tell me, what is wrong with Times New Roman in NT. And then, it changes charset but doesn't change font, so that I see on the screen the same text but in Arial with its selected symbol charset (which is btw Windings font, while for Times New Roman its the analog of Symbol font)
|
|
|
|
|
So what's exactly happens on Win9x - are you getting 'normal' Times New Roman letters, not symbols?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
No, under Win9x I can get whatever I want. If i select SYMBOL_CHARSET i get symbols (of Times New Roman, certainly). Under NT i also get symbols, but the font isn't set to Times New Roman. It remains Arial (as it is by default)
|
|
|
|
|
OK, one more question about ActiveX starting :
I have my own IDocHostUIHandler, and inside is TranslateURL and ShowUI
.
On some page is link, something like blabla/news/av/newstv.asx.
after click on link, in TranslateUrl, i try to stop my WebBrowser
control,because I want to start media player, something like
STDMETHOD(TranslateUrl)(DWORD dwTranslate, OLECHAR* pchURLIn,
OLECHAR** ppchURLOut)
{
CString LinkName( pchURLIn);
if (LinkName.Right(3) == "asx")
myBrowser.Stop();
*ppchURLOut = NULL;
return S_OK;
but player is still start and i have video stream after exit.
How to prevent this ? Obviusly, this is not right place for try to stop
execution ( probably for all executables types) .
I'm trying lot of other interfaces, but can't find what's happend. Have
somebody some idea (or , better, expeience) about this proccess ? Where is
connection point between in page embeded file and shell routine for
execution ?
Duke
|
|
|
|
|
Can a console app create a thread that has a window? More specifically, if I create an ActiveX control from a console app, and that control has a method that creates a user-interface thread, will it work?
|
|
|
|
|
yes, no problem for a win32 based window.
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
I need info about the file formats for DiskJuggler, Nero, Easy CD Creator, CDRWin etc. and so far I have found...none! Anyone who has an idea of where I can find this info?
|
|
|
|
|
Try to find sth on http://www.cdfreaks.com/
|
|
|
|
|
Hello,
I would like to know how to be sure if my programm is producing good printing on every kind of printers. (Laser, Ink jet, .., Epson or HP).
Thank you
|
|
|
|
|
My suggestion is to implement print preview, and test it out with your desired set of printer drivers. This is about as close as you can get if you don't want to buy all the printers.
|
|
|
|
|
Hi, I would like to know how to close, or at least hide a window based app with vc++...
As im a newbie in vc++, it would be appreciated if you could be as specific as possible with the code...
Thank you heaps in advance!
|
|
|
|
|
To close an application just write
PostQuitMessage(0);
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I have written my own strlen() function called my_strlen(). I works quite well.
int my_strlen(const char *source)
{
int len = 0;
while(*source)
{
len++;
*source++;
}
return len;
}
Now my question is:
Which function ist faster, my version, or the asm-version of the original strlen?
thanks
modified 12-Sep-18 21:01pm.
|
|
|
|
|
The original one is faster...
You could also make your own faster like this:
int my_strlen(const char *source)
{
char *old = source;
while(*(source++) != '\0');
return source - old;
}
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
What is the proper way for my VC++ app to read entries from the outlook address book, if there is one on the system?
Do I have to use office-type COM objects or is there a better way to do it?
Thanks
|
|
|
|
|
Which version of Outlook? Outlook Express? Outlook 97/98/2000 or XP. Are the entries stored on Exchange or in a .PST.
With Outlook 97/98/2000 you can use extended MAPI. I think with 2000 you can use CDO but have not tried it yet. As for XP, don't know - not got it yet.
I'm not sure if the office COM objects will be much use in XP or 2000, I think the security patches stop external apps from reading the address book. Or at least it will pop up a message asking for a users authorisation to access the address book.
Michael
|
|
|
|
|
I'm not even sure quite what i want to do. I'm writing a app to talk to a mobile phone, and would like to add the ability to sync with a users phonebook, in outlook. so i guess by outlook i mean all versions, express and normal.
microsoft dont make it easy.
|
|
|
|
|
Hi,
I am using the CHtmlView->InsertAdjacentHTML to add DHTML to the body of the document im displaying and I have three problems
1) Im adding anchors with OnMouseOver events attached to the links, these are not being displayed on the inserted HTML.
(I need to make the IE engine re-parse the document)
2) Although new HTML has been added to the page it is not displayed unless I move the mouse over the window.
(but the first insert displays immediately, subsequent ones need mouse event)
3) Often when I scroll the window whilst HTML is being added by a background thread, the text/gfx seem become lost and a page refresh produces a blank screen but input-boxs are still visible?.
(i am using GetBusy() to wait before inserts)
Hope someone can help
John
|
|
|
|