|
Could you help me how to do this ? : I need simple code to put a string(data) into WebControl(IE) without saveing it as file ? Or could you suggest some(-simple)link ?
Thanks you.
Libor Bares
Czech Republic,Central Europe
|
|
|
|
|
if some one chosses one radio button and clicks ok to move on to the next step, what code can i use to block them selecting the other two throught the use of that dialog.
Only once they reset the program can they change there selection.
|
|
|
|
|
Actually if you have three radio buttons and only one of them has the group option set, then the user can actually select only one of them at a time. They will be mutually exclusive.
Nish
One Nish is trouble enough.
Imagine 16 of me, dancing wild...
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
|
|
|
|
|
hi i was told to use "UpdateData(false)" to clear my dilog boxs but this seems to only clear one edit box and not reset the other 3 boxs plus radio buttons.
any hints?
|
|
|
|
|
that's not completly correct.
the objective of UpdateData is not to clear fields, actually, UpdateData(FALSE) will Update the values of your controls with the values of the mapped variables of your Dialog. UpdateData(TRUE) will update the mapped variables with the values of the controls.
So, lets say you have a Editbox mapped to this variable m_myEdit, this variable is empty, and the user type some text into the Edit, then you call UpdateData(FALSE), this means "Update the control value, with the value of m_myEdit", and since your variable is empty, the control will be set to "".
See: UpdateData
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
For this to work you must not use UpdateData(...) elsewhere.
When you call UpdateData(false) the controls get updated with the stuff in the DDX variables. Now assuming you haven't manipulated the contents of those variables on your own either directly or using UpdateData(...), the call to UpdateData(false) will reset the controls to the state they were in when the dialog was launched.
Nish
One Nish is trouble enough.
Imagine 16 of me, dancing wild...
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
|
|
|
|
|
I was wondering if anyone knows why pressing the enter key closes dialog boxes, when you do not want it to. If anyone knows how to stop this action please help me.
|
|
|
|
|
|
Pressing Enter calls the OnOK() of the Dialog. If the Dialog is derived remove the line that has CDialog::OnOk()....this will prevent the dialog from closing
|
|
|
|
|
some guru has explained how to do this before. Here is what I remembered:
overwrite the OnOK() function:
if ( GetFocus() != GetDlgItem(IDOK) )
return;
else
CDialog::OnOK();
|
|
|
|
|
You can override PreTranslateMessage
Read this article :-
http://www.codeproject.com/useritems/pretransdialog01.asp
Nish
One Nish is trouble enough.
Imagine 16 of me, dancing wild...
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
:jig::jig::jig::jig:
|
|
|
|
|
That Button is your default control in your dialog,if change this property in dialog editor I THINK this problem will solve.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
No, I think you still need to overwrite PreTranslateMessage (or a different approach as pointed on a previous message).
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Yes,I test it and you are right.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hi,
I have a dialog box with 3 edit boxes, IDC_EDIT1,2 and 3 with variables m_edit1,2 and 3. There is also 3 radio buttons in a group called IDC_numbers with m_numbers as its variable. There is also a button called generate which is IDC_GENERATE with the variable OnGenerate to deal with the message handler for when the button is clicked. what I want to do is when the first radio button is pushed (i.e m_numbers=0) and the button Generate is pressed then 3 numbers appear on the edit boxes. when radio button2 is pressed (i.e m_numbers=1) and button generate is pressed then 3 different numbers appear on the edit boxes. I know how to get the box to display the numbers on the edit boxes when the button generate is pressed but how do i impelement the condition to display the numbers according to what radio button is selected?
Thanks a lot for any help
|
|
|
|
|
On the button pressed handler, call UpdateData(TRUE) to retrieve the radio selected, the value will be stored on your variable: m_numbers.
the, do a switch with this variable:
switch( m_numbers )
{
case 1:
//put some logic to generate the three numbers
break;
case 2:
//put some logic to generate the three numbers
break;
case 3:
//put some logic to generate the three numbers
break;
}
(Haven't tested)
I'm not sure if the value of m_numbers is zero-based, I think it is.
This is not a Design advice, just a way to make it work.
I would code a GenerateNumbers(int iSelectedOption), then in Button Pressed Handler obtain the radio value selected and pass it to GenerateNumbers, inside that method code the Switch statement, a little more cleaner.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
|
I think I already know the answer to this one but if someone could point me a link of a document stating the answer, let me know.
Question is:
If I link my program using MFC as a Static Library instead of Shared DLL, does it uses more memory/resources of the computer ? Even if its the only MFC app I´m running in this computer ?
Let see if your opinions match with mine.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
My latest article:
Pentominos - A C# implementation of the famous Puzzle Game
|
|
|
|
|
Unless the changed the memory manager (which I remember reading hints about this in some places), statically linked takes up more resources since the code pages in the DLL can't be shared between processes. Now if they changed it so that code pages (or any read-only page) aren't shared, then there really wouldn't be any difference other than extra disk usage.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Ok, I looked into this a little more. Here is something interesting I found on google groups.
Dll's are "loaded" using the win32 memory mapping mechanism, and the pages are marked copy-on-write (that is, a code page that gets written to get copied, and mapped against the pagefile). The result of this is any pages that are the targets of relocation fixups are not-shared (the relocation fixup code *writes* the fixups back into the code).
However, switching to a non-ms compiler - if you compiled the Dlls object code as position independent code then there will be no relocation fixups associated with any of the code pages. The win32 dll loader will simply map all the pages into memory without any fixups "touching" the pages the result is that the dll will load at any address without any problems.
What this implies is that when using a DLL, code pages will be shared. HOWEVER, if a code page requires a fix-up as part of image loading, then a copy of that page is made and the pagefile is used for backing store. Normally, with read only pages, the disk image of the DLL is used as backing store. Thus if the page is faulted out of memory it will just read it back from the DLL when it is needed again. In the case of a page that required fix-ups, it will end up on the modified page list and ultimately written to the page file if that physical page of memory is required for other needs. Then when that page of code is required by the program in question, it is read back from the page file.
Hopefully I got all this right. Some of this is based on my understanding of the VMS paging system which was a predecessor to the NT paging system. Aren't paging systems fun
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Since when did windows programmers care about eating up resources anyway???
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
I have tried my CAsyncSocket app over the internet but it doesn't work.
It should work... or am I wrong?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
Yes, it should, just make sure you are connecting to a valid IP Address.
If you're using a name (instead of a IP Address) make sure the computer can resolve that name to an IP (try ping <>)
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
Is there a specific Internet IP then?
I use my "computer" IP,, (don't know what to call it)
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
No, i mean.. if you're are connecting to a distant machine on the internet, then make sure you can 'see' that machine, try ping <<machinename>> or ping <<ipaddress>>
You said that were using the class over internet, so I assume you're trying to connect to a far away machine through internet.
makes sense?
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|