|
Hi,
I created one Dialog based Application .When ever I am pressing the enter key the Dialog Box is being closed.How could I remove this?
Then How can I track the enter key is pressed?
SSN
|
|
|
|
|
Hi
You have the OK button default, therefore when ENTER pressed, than your Dialog is being closed!
1. You can override the OnOk() function, and if you don't want close the Dialog, you don't must call the CDialog::OnOk() metod.
2. You can override PreTranslateMessage() function, and catching WM_KEYDOWN message.
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
|
http://www.codeproject.com/dialog/pretransdialog01.asp
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Anyone care to clear this up for me?
"To wonder is to begin to understand"
|
|
|
|
|
Ever1234 wrote:
Anyone care to clear this up for me?
An OR returns 1 if either of two binary values is 1, an XOR returns 1 if one and only one value is 1. What else did you want to know ?
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Exclusive or is the binary equivalent of the old "chinese addition" used by the spies of old, which involves adding digits but ignoring any "carry" numbers.
So you'd get (with the decimal version)
29232 +
56299 =
75421
the binary version would go like:
1011110 xor
0111010 =
1100101
It allows your data to be combined with a random stream of numbers so that it can be easilly retrieved by someone who has the same random stream of numbers. The convenience is that if you xor twice with the same data you get back to the original.
This, of course, is the easy bit. The hard part is to ensure that the sender and the intended recipient have the same encoding stream and the bad guys don't. In the old days the spies had "one time pads", basically pages of random numbers which they had to smuggle physically and which they were supposed to destroy after use. These days we tend to generate pseudo-random sequences from seed codes like pass phrases.
|
|
|
|
|
Okay, I wrote some code and it is bug free, exept that the danged compiler generated code has some many bugs it wont compile. Its a 5 line proggy, none of the errors come from the code that I wrote. WHAT IS UP WITH THAT? How can I get it to accept my code. Where can I get a compiler that works?
"To wonder is to begin to understand"
|
|
|
|
|
Hmm....
Ever1234 wrote:
How can I get it to accept my code.
If you want some advice, I suggest you post your code.
Ever1234 wrote:
Where can I get a compiler that works?
I've got five bucks here that says the problem is with your five lines of code, unless they exploit a known bug like the \t\t thing.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
How can I read data from Excel file?
|
|
|
|
|
Hi,
Any idea on “How to paste clipboard data to DOS/CONSOLE window” would be appreciated.
Thanks
|
|
|
|
|
I've been reading (again) Jeff Prosise's Programming Windows 95 with MFC. In it he says that MDI is not recommended for Win95. The book is really dated, as we've had many new Win versions since then, but I'm curious. Is that still valid advice for the WIndows platform in general?
Of all the things I've lost in life, I miss my mind the most
|
|
|
|
|
MDI is not recommended *by Microsoft*. Witness Excel/Word, they start another instance when you open a new document. MDI is perfectly valid, and I think it's often a *good* idea.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
A good point - why do they tell their developers not to use this capability, then release products that depend upon it? We may never know...
|
|
|
|
|
MS is moving away from MDI, as Christian noted. Word/Excel 2K and later use multiple top-level windows by default, instead of one MDI app. This is for usability reasons - novice users have a hard time with window management, and get confused really easily by how MDI windows behave.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Darn! I'd like to stick to the current paradigm, but I've been playing with this idea for a long time. I've been trying to build a simple (at least, it should be simple) terminal program to emulate dumb text terminals using Wyse50 control sequences. It seemed to me that using two documents might offer a solution - one document would contain the settings info (port selection, modem settings - if applicable, font preferences and such), the other would contain the actual screen output, and handle the user responses. But if the trend is toward an SDI architecture, I don't want to get started on a new path. I'm finding this language, and MFC, to be far more difficult than it should be... I miss assembly language - that made sense!
Thanks for the benefit of your thoughts... I'm still struggling, but at least I have some wisdom to call upon...
|
|
|
|
|
Well, you don't have to take MS's word as law. On the other hand, while I vehemently disagree with MS's usability results in some areas, their goal of making window management simpler is one I agree with. Think about the old Program Manager (an MDI app), and imagine trying to explain to a newbie why some of the windows move around with the PM window, and why you can't move "Startup" anywhere you want on the screen.
--Mike--
My really out-of-date homepage
He who laughs last, didn't get the punchline and is just laughing so he won't look silly.
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
Hi,
I'm wondering why there seem not be possible to select more than one item in a CTreeCtrl. Or am I wrong?
My problem is simple: I have a collection of 3D objects that I render in an OpenGL window. In a separate window I want to show the hierarchical view of these objects and at the same time to be able to select one or more of them to set their properties (like visible/invisible, solid/wireframe, ...)
What is the best method to solve my problem
Thanks for your help
Marc
|
|
|
|
|
Mr.Freeze wrote:
I'm wondering why there seem not be possible to select more than one item in a CTreeCtrl. Or am I wrong?
You are correct: The native TreeView Control does not support multiple selection. There is code available on this site, and also on code*uru, that implements multiple selection. The "quick-n-dirty" way of doing it is to use the TVIS_DROPHILITED state to simulate selection.
Peace!
-=- James.
|
|
|
|
|
i used the ANSI_FIXED_FONT font, but it looks somewhat small
how can i change its size?
one is the other who absorbs the thoughts of others
|
|
|
|
|
If you are using MFC objects, this is as easy as creating a font using the CFont class, and having the control use the new font; for example:
<br />
m_fFont.CreatePointFont( 100, _T( "Courier New" ) );<br />
m_ecCodeEditControl.SetFont( &m_fFont );<br />
m_btCompileButton.SetFont( &m_fFont );<br />
Peace!
-=- James.
|
|
|
|
|
Well I got a problem with Shell_NotifyIcon (to put an icon in the systray). The prog compile well, and my icon appears on the systray but when I move my mouse over it, it disappears (maybe it comes from Windows Me) !!!!!
Any Idea ???????
[MLV]Tito
|
|
|
|
|
Post some code here or try download Chris Maunders CSystemTray class and use it or see how he have done it!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
[MLV]Tito wrote:
my icon appears on the systray but when I move my mouse over it, it disappears
That happens when an icon is added, and then removed (like when your program shuts down): the actual icons are sometimes not actually removed until you mouse over them.
Might want to make sure that your code is not removing that icon.
Peace!
-=- James.
|
|
|
|
|
Here I am again!
Well, now I have to know how to encrypt a string into unknown chars, e.g:
d45R#! = sw.5v.n7.sd.4r.h5 // sw = d and 5v = 4 and n7 = 5 etc.
I know this is difficult (it should be!?), but how to do it? Is there a code somewhere?
It would be more safe to make it by your own but I don't know HOW!
When I tried to write a binary to the registry I could get the string anyway!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|