|
Hi
I am writing an application where the user can enter multiple occurences of an edit control or a combo-box. I keep adding new Edit controls whenever the user fills the previous one. On order to allocate these edit controls, I use the "new" operator. However, when I need to add a new CEdit control, I would need something like a "renew" operator (much like the realloc routine). Does anyone know how to do this? I could of course allocate a completely new set of Edit controls, and then copy the properties of the already used ones, but this seems like a rather clumsy way of doing things!
Thanks in advance.
William
|
|
|
|
|
1) If you are talking about C++ syntax, there is the method called "placement new" for you to new the objects at the specified address (in this case, the address of previous newed objects).
2) After new, you should "create" the edit controls to create the windows ...
Maxwell Chen
|
|
|
|
|
Why don't you use one of MFC's or STL's containers? They will grow/shrink without having to worry about memory management.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
didn't get enought sleep ???
codito ergo sum
|
|
|
|
|
Hi,
Normally if we create a dialog with few buttons..In order to edit the code for the particular buuton.We double click the button,then there will be a popup dialog that automatically it will give a function name,if we need then we can change the name of the function and we code there.
But in my application,if i double click the button,it does not pop up anything.It simply stays as it is.
For writing code,I moved to ClassWizard,then i click the ID of the button..and i continue coding like this only.
Is there any settings to pop up that dialog when i double click the button or any other?
|
|
|
|
|
|
In my context menu,there is no option as "Add on Event Handler"What can i do?Is there any option pls
|
|
|
|
|
Or add this code to your program
Hope I understood your question
BEGIN_MESSAGE_MAP(CssDlg, CDialog)
ON_BN_CLICKED(IDC_BUTTON1, OnBnClickedButton1)
END_MESSAGE_MAP()
void CYourclass::OnBnClickedButton1()
{
}
afx_msg void OnBnClickedButton1();
whitesky
|
|
|
|
|
I can write this..But its not my question..When i click the button or any other control it will ask
--------------------------------
Add Member Function
Member Function Name:
OnOk
Message:
ObjectID:
---------------------
One dialog will appear with this details know.
But in my dialog it does not ask like this.My problem is this only?
But my ID's are in classWizard Object IDs.
-- modified at 6:29 Tuesday 18th July, 2006
|
|
|
|
|
Anu_Bala wrote: For writing code,I moved to ClassWizard,then i click the ID of the button..and i continue coding like this only.
Is there any settings to pop up that dialog when i double click the button or any other?
Some time clw file get corrupted so you have to delete that file and instruct the Studio to create new!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I did as u said.I delete clw file and again it ask me to create classs wizard,now class wizard created.
But when i double click the button..It shows error as
Cannot add new member.
What is this?
|
|
|
|
|
One cause would be The member is already be existing for that control
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hey,
1)just take class wizard and select the button ID
2)Select the message BN_CLICKED
3)then press buttons Add Function and Edit Code
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
With ClassWizard open, just click the Add Function button. It will suggest a function name for you that can be changed.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How will I know programmatically, software installed in the system? How to check whether the installed software is correct version? Is there any article related to this?
Thanks,
Stanly
|
|
|
|
|
Which software ? Your software or another one ?
If it is your software, you can simply add a registry key in the windows registry (that's what a lot of application are doing). You can also store the version in the registry (and some other parameters like the install path).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
I mean not my software. I want to check whether certain softwares(Visual Studio, SQL Server like that) are installed in the system or not?
Thanks,
Stanly
|
|
|
|
|
|
Thanks a lot!!!
Thanks,
Stanly
|
|
|
|
|
Mihai Moga wrote: Please check out Robert Edward Caldecott's article: How to get a list of installed applications[^] Good luck!
Ohh i lost
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Re
|
|
|
|
|
|
There's really no way to do this reliably. An application can be installed using a fancy install program, or a simple batch file (i.e., create folder, copy files). Notifying Windows (via the registry) that an application is being installed is not a requirement.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello All,
I am going to get straight to the point. I am new to win32. I am trying to write an application that resembles an MDI application. That is, it has a main frame window and children. However, what I would like to do is instead of having the children frames as windows, I would like to have them as dialog boxes. As mentioned I am new to win32 and would like to use the GUI buid tools. The whole point of using win32 is because I have some stuff written in native win32 c++ that I would like to use and it will be a lot easier using the dialog box GUI build tools.
Can this be done? and Can any one help me with this? That is, creating the structure with a main window and some dialog boxes as the children of the main window such that it resembles an MDI application.
live life
|
|
|
|
|
Do you mean using Win32 SDK way to program a MDI program?
Yes it can be done in the SDK way, but would take you tons of efforts. To use some libraries like MFC or some others would save you much efforts.
Maxwell Chen
|
|
|
|
|
If your writing a common desktop application with no strict speed requirements, i recommend MFC. I like win32 sdk very much but when times get rough, its nice to have plan B.
"You have to be in a situation where you see just how fast things fail to make you take it seriously, I guess. " Bruce Eckel
|
|
|
|