|
You probably cannot prevent them from deleting the files, but you can remove the links in the registry to the uninstall program. This would keep the application from appearing in the Control Panel 'Add/Remove Programs' applet.
On Windows 2000, the registry key to look under is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
Gary R. Wheeler
|
|
|
|
|
Hi all,
I am writing code on Pocket PC 2002 using EVC mfc. Can anyone tell me how to create a dialog that is not full screen?
Thanks in advance.
|
|
|
|
|
on the PocketPC platforms, CDialog has a member BOOL m_bFullScreen or something like that. In your CMyDialog::OnInitDialog, or constructor, set m_bFullScreen = FALSE;
hth,
Wes
CPUA - # 0xd00d
Sonork ID 100.14017 wtheronjones
|
|
|
|
|
I found out that when you put in a blob manually into Access as an ole object and it says its a bitmap object (in the database field), then an extra 78 bytes of ACcess header info are added at the start of the bmp. So to extract the bmp you chop off the first 78. But now, I have found out how to put in an image by code into Access. this way the field says its a .ong binary data -still an ole object though. However, its got a different header because chopping off 78 bytes doesnt retreive the original bmp. SO the question is, does anyone know the size of the header when its of type .ong binary data? Hopefully its the first n bytes and not embedded somewhere in the middle or after the bmp header info...
Any ideas on how I can get this info?
Thanks,
ns
|
|
|
|
|
Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger?
Ta
Dave.
|
|
|
|
|
If it's anything like a vector, you should be able to drop down the element and get the memory address of your data at least. Then if it's text you can use the memory viewer.
I'll add my obligatory comment on CArray - it's a pile of crap. Consider using std::vector instead.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
and I'll second that, usedthe std container classes vector/list/map etc. free of charge as well i might add.
Normski. - the next bit of code is self modifying ... jmp 0xCODE
|
|
|
|
|
David Carkeet wrote:
Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger?
Yes there is. In the "Watch" window(if you don't see it just right click in the debugger and it will bring up the option), type the name of the array and all the values will be listed. What I do is insert a breakpoint at the place after the array is filled and then start the debugger. Once you have reached the breakpoint type the array's name in the "Watch" window and then presto, your elements will be listed. Hope that helps.
|
|
|
|
|
Well, teach a mangy old dog new tricks. I didn't know the Watch window was that smart!
Thanks!
Gary R. Wheeler
|
|
|
|
|
I had an edit control and I didnt want it, so I replaced it with a richedit, called it the same thing, went into the gray afx areas and commented out the CEdit entry, the wizard had put in a CRichEdit entry. ANd went about my merry way> it devastated the project completely!!!
SO I took a fresh copy, made the old edit control invisible, put in a richedit, called it something else and it works okay.
I see that what I did was not safe.
Is this safe? -->
If i just wanted to get rid of a control and didnt want invisible control clutter in my design view. Could I just cut it out and hope the wizard takes care of it? Of course all references to it (not in the gray afx areas - I learned my lesson) have to be removed. I am extremely nervous about removing anything now and I have a graveyard of invisble controls in my formview...
Thanks,
ns
|
|
|
|
|
While removing app/class wizard generated code can cause problems, it's OK to do so if you know what you're doing (i.e. if you remove everything you need to remove, nothing more and nothing less).
In general, if you want to perform surgery on the code when removing a control, go ahead and remove *all* references to the control. Then (I suspect this is what caused unhappiness), do View | Resource Symbols and remove all unused resources from the list. The list will explicity identify these bad boys. Finally, do a Build | Rebuild All. This will allow the compiler to catch any references to the deleted controls.
A common error is to delete the control IDC_Foo, but forgetting to delete code, like this (which will compile, since you didn't clean out the resources):
CEdit* pEdit = (CEdit *) GetDlgItem (IDC_Foo);
pEdit->DoSomething();
Of course, if you'd used an ASSERT , a debug run would catch this.
CEdit* pEdit = (CEdit *) GetDlgItem (IDC_Foo);
ASSERT (pEdit != NULL);
pEdit->DoSomething();
PS: You mistakenly checked the "Display this message as-is (no-HTML) box (in your popup menu question).
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Make sure you add a call to AfxInitRichEdit, or else the Rich Edit control won't work.
|
|
|
|
|
Found that out! It gave me an empty document without that declaration!
Thanks,
ns
|
|
|
|
|
Hello!
Maybe this is a simple question, but the answer still eludes me. I have a simple SDI project with one view (call it CMyView) and I draw something on the view in the OnDraw() function. On top of the view are displayed a number of child windows of the view. If I call Invalidate() on the view, there is a noticeable flicker when the child controls are redrawn. Since both the controls and the view use CMemDC to prevent flicker when drawing, I am forced to conclude that this flicker is the result of the view becoming the topmost window while it is painting, then the child windows coming into the foreground again. Is this analysis correct? Is there any way to prevent this flicker?
Thanks in advance!
Sincerely,
Alexander Wiseman
Est melior esse quam videri
It is better to be than to seem
|
|
|
|
|
Windows are painted back to front. So the view redraws, then all the controls draw on top of it.
Try setting the WS_CLIPCHILDREN style on the view window.
[edit]
i'd originally put WSCLIPSIBLINGS instead... ugh... need coffee...
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
I have a context popup menu where i want certain items disabled at start. SO in the OnUpdate handler I put:
void CTrain1View::OnUpdateDeletekeyword(CCmdUI* pCmdUI)
{
pCmdUI->Enable(m_adminFlag);
}
which works fine on a regular menu, but doesnt disable my popupmenu items! At startup, the flag is false, so this same command in a regular menu is great , but doesnt gray out the items in the popup menu..?
What am I not doing right? The flag is false. I checked.
Thanks,
ns
|
|
|
|
|
See this article[^].
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Whats the pWnd in the article? So far I havent tangled with a pWnd:
<pre>CmdRouteMenu(pWnd,pSubMenu);</pre>
pSubMenu will be what I call pMenuTrackPopup below right?
<pre> CMenu menuPopup;
AfxMessageBox("in");
menuPopup.LoadMenu(IDR_MENU1);
CMenu* pMenuTrackPopup;
pMenuTrackPopup = menuPopup.GetSubMenu(0)</pre>
SO where and how do I get a pWnd?
Thanks.
|
|
|
|
|
nss wrote:
Whats the pWnd in the article?
The pWnd is a pointer to the window that controls the UI update code, i.e. the view. (A CView is nothing but a CWnd .) You can just pass this .
nss wrote:
pSubMenu will be what I call pMenuTrackPopup
Yep.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thank you. How come my code is not properly formatted? I see the pre stuff - its not supposed to do that right? How do you make your words red? Eh? Whats 'code' for? Whats 'pre' for?
|
|
|
|
|
<pre> and </pre> are meant to enclosed code fragments. Methinks you mistakenly checked the "Display this message as-is (no-HTML) box.
To make your words red, use Humbrol #60 Indian Red (low gloss), blush violently, or use the code tag.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I implemented the article but it didnt grey out my menu items. so I worked around it, but it makes me curious cos I'm sure I did all that was required - theres no crash. The menu items just look enabled as always....not greyed out, though i put in the false in the onupdate for the enable.
Oh well! I am overrunnning with Cds here- I got a deal at Office Depot for 3c per CD (the cases cost more) so I back up my stuff often and lavishly. Now I have to get some sort of organizer for the slim jewel cases. My paltry tower of 20 is long gone. Cant throw any out yet though....eventually will.
Night flows into day into night into day......
|
|
|
|
|
nss wrote:
I implemented the article but it didnt grey out my menu items.
I'll try it later today and will get back to you. Is the OnUpdateUI() handler in your view being called?
nss wrote:
3c per CD
Hmm, sounds pricey. You can get 100 CDs for between 5 and 10 bucks (after rebates) if you buy them at CompUSA or BestBuy.
nss wrote:
Night flows into day into night into day
Ouch. Take care of yourself, kiddo! A normal routine does wonders for the mind and body. I figured it out after 20 years of night mode.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi
does anyone have any sample code for firing up outlook 97 (and say sending an email)
from vc6.0 using #import msoutl8.olb and mso97.dll
rather than using the class wizard to add _all_ those classes ?
as i dont seem to be able to make it work
can someone suggest something? (other than updating to office 2000)
regards
Bryce
|
|
|
|
|
Can you use MAPI? There is some code here[^] that I have used to send email with OE, but I assume that if Outlook was set up as your MAPI client that it would use that instead.
"Quand tu sèmes ta haine
tu récoltes la Kalachnikov Love"
-Kalachnikov Love, Alpha Blondy
|
|
|
|