|
-
February 19th, 2009, 12:04 AM
#15
Re: CEdit::Create & GetWindowRect
Guys... I know how to change the type of a variable. My problem has always been what I said above. That if I add the controls via the visual editor, they aren't created as instances and so I didn't know how to change their type. John, you said it yourself:
Once dialog resource is saved, all information is written to a resource file as ASCII script.
I told you days ago. In the header file change the control variable type from CEdit to your CEdit derived class. That's all you have to do.
If that's the reason, I would strongly and I mean strongly recommend throwing away this code and doing it properly. It'll be easier for you to maintain, whoever works on it after you will be happier, it's really easy to do, and you can't jump through all these hoops every time you need to use a control class you've created yourself.
One thing about being a good programmer is knowing when you're headed down the wrong path and not creating a convoluted workaround because you're stuck on a simple problem.
That's not what I meant at all. I meant:
I'm creating them myself because otherwise , if I place them visually, I don't know how to change the type to my derived edit class.
I don't know how to change their type if they were placed visually with the editor. When I place them with the editor, there are no instances created that I can edit:
As you realize now, once control is placed in a dialog template you do not have to create it.
So, I have two options. 1) Add them via the add variable wizard. They're created as instances and I can change their type (I always understood how do to that). But if I do it that way, then I have to position them manually... which is harder.
2) Create them with the visual editor by placing them on the dialog. Easier to do but there is no way to change their type as there are no instances created and I have not yet found a way to change their type via properties or anything else like that.
Last edited by Mybowlcut; February 19th, 2009 at 12:15 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|