Create controls through SCRIPTING

Hi,
I need to create contols at run time through scripting. how to do it ?
Any idea  ? samples  ? Links ?  waiting for ur reply...
thanks,
Jayender.

0
1/23/2006 9:07:02 AM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
339 Views

Similar Articles

[PageSpeed] 39

How is your question related to MFC?
If so bring the context and you may get some replies.

-- 
Vipin Aravind
Microsoft MVP

<jayender.vs@gmail.com> wrote in message 
news:1138007222.043466.107020@g14g2000cwa.googlegroups.com...
> Hi,
> I need to create contols at run time through scripting. how to do it ?
> Any idea  ? samples  ? Links ?  waiting for ur reply...
> thanks,
> Jayender.
> 


0
vipin (696)
1/23/2006 9:14:13 AM
I need this too.

I'm not sure if it is possible to create dialog windows from resource
files at runtime. If so, that's what you can do (and your scripting
language will be that of the standard visual resource file), otherwise
I myself am looking at creating a visual editor using the "subclassing
an already subclassed control" technique.. not sure about this title
and whether you can google for it. Then generate XML from this, and
when loading this XML, you create controls dynamically by calling:

CSomeControl* pCtrl = new CSomeControl();
pCtrl->Create( .... )

HTH
Lisa

jayender.vs@gmail.com schreef:

> Hi,
> I need to create contols at run time through scripting. how to do it ?
> Any idea  ? samples  ? Links ?  waiting for ur reply...
> thanks,
> Jayender.

0
reageer (10)
1/23/2006 9:26:55 AM
There's also a pascal scripting engine, that InnoSetup uses (and you
can download it for free too), but it is only useful when used from
within Borland Delphi I think.

Lisa

0
reageer (10)
1/23/2006 9:28:08 AM
Hello guys,
 thanks for ur reply.. . well.. i have done the scripting where i can
assign values to the textbox through scripting.. but now i need to add
controls at run time.
I use VB scripting. anyone of u come across this issue ? waiting for ur
reply..
thanks,
Jayender.

0
1/23/2006 10:08:49 AM
Ooops more info .. am working on VC++ 6.0 where i need to add scripting
.... and i have done that now i need to add conrols through scipting.
waiting for ur reply.
thanks,
Jayender.

0
1/23/2006 10:13:22 AM
I think you need to post some code. You say you're using VBScript to change 
the text in a control in a MFC application? Post the script.


<jayender.vs@gmail.com> wrote in message 
news:1138010929.279474.78540@g47g2000cwa.googlegroups.com...
> Hello guys,
> thanks for ur reply.. . well.. i have done the scripting where i can
> assign values to the textbox through scripting.. but now i need to add
> controls at run time.
> I use VB scripting. anyone of u come across this issue ? waiting for ur
> reply..
> thanks,
> Jayender.
> 


0
kma3184 (100)
1/23/2006 10:24:05 AM
You can do this if your application exposes an object model. You can
then provide a method which creates controls. This means using COM. You
can use ATL or use MFC(look at automation server).  Another alternative
is to host ActiveX scripting engine provided by Microsoft. This
technology was very popular (even not its immensely useful) in late
nineties. There were few articles published in MIND(miscrosoft internet
developer) by Steve Zimmerman(??) and others.

This techonology is used in all Office products; eg you can use
scripting to automate Excel, Word etc.

-------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
1/23/2006 2:29:04 PM
Reply:

Similar Artilces:

Double Buffering, Reduce flicker of child control
Hello, I have CWnd that wraps a third party control (TX4OLE). Currently the third party control paints to the screen and our code draws on top of it. This process can produce a bit of flicker and I am trying to eliminate this using double buffering. Is there any way I can redirect the output of the control into a memory buffer? I already handle WM_PAINT calls in the window proc, but there doesn't seem to be any way to change the device context the control uses. Any help or ideas are appreciated. Thanks, Jay On Mar 5, 11:43 am, "Jay Hamilton" <jayhamilto...@gmail.com&g...

Create a report in excel
Dear all, Could somenone help me on how can I create & print a report for each case that will have all or only selected variables from each case? To be more specific. I have a database which is anthropometric measurements of a sample and I would like to create a feedback report to be mailed in each case-person. So in every separate page the name of that person should be at the top and the results of the measurements below- each measurement result in a different row. Many thanks in advance! Chrys, I don't think there's a very direct way to do that with Excel. Data - Subto...

creating mixed dashed and solid line charts
Is it possible to create a line chart that mixes dashed and solid lines on a single data series? I have a couple of data points missing throughout the chart and would like to represent that with a dashed line. Thank you. On Fri, 9 Nov 2007, in microsoft.public.excel.charting, nathanhutto <nathanhutto@discussions.microsoft.com> said: >Is it possible to create a line chart that mixes dashed and solid lines on a >single data series? I have a couple of data points missing throughout the >chart and would like to represent that with a dashed line. Create two data series, one for ...

Account created itself on Exchange Server
Hello Friends, According to Event viewer, an account name as "sbsmonacct" is created itself and join Enterprise admin Group (member of this group). This event is logged into event viewer with this user S-1-5-21-XXXXXXXXXX-XXXXXXXXX......... I want to know, is this account is created by any Exchange Process or any services Or someone is playing with our server intensionally(means entering from back door). do anyone have any idea, what is going on with exchange server. Regards G. Gureey <Gureey@discussions.microsoft.com> wrote: >According to Event viewer, an account ...

how do you create an importance-performance chart in excel 2003?
...

Lost temporary file created due to "sharing violation"
Hello I was just working in MS Excel 2003. I opened the sheet to discuss over a telephone call and made a number of alterations during the conversation. When I went to save the sheet I was working on, a dialog box came up saying that the sheet could not be saved due to a sharing violation (I am the only user of this machine). I cancelled the dialog box and tried to save again - this time a slightly different dialog box popped up saying that the sheet could not be saved due to a sharing violation and it had been renamed with a six-digit numerical name - the details of which I cannot rem...

Howto create textbox like in powerpoint
Hi Could someone tell me how to create powerpoint type textboxes? Are they windowless rich edit controls? Thanks Sachin They are rich edit control, but they have a window, they are owned by the window that they are being displayed on. AliR. "sachinkundu" <sachinkundu@gmail.com> wrote in message news:1170062520.486641.43880@m58g2000cwm.googlegroups.com... > Hi > > Could someone tell me how to create powerpoint type textboxes? Are > they windowless rich edit controls? > > Thanks > Sachin > > They are rich edit control, but they have a wind...

Create a cell with only PART of another cells data
I have a column (D) with the following formatted data 0908-1234 0208-0691 0903-0256 I want to create a cell (column) that ONLY contains the last 4 digits 1234 0691 0256 Can some one please tell me how to accomplish this. Thanks Dave __________ Information from ESET NOD32 Antivirus, version of virus signature database 4443 (20090921) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com Try this: =3DRIGHT(D1,4) assuming the data starts on row 1. If you want it as a number, then you can do this: =3DRIGHT(D1,4)*1 Copy down as required. Hope this helps....

Creating pre-filters
I have created report using VS 2005 and reporting services. The report runs fine, but I cannot get the pre-filter to 'kick-in'. I create a data source that looks like this: SELECT CRAMF_FilteredTask.actualdurationminutes, CRAMF_FilteredTask.description, CRAMF_FilteredTask.fived_assignorname, CRAMF_FilteredTask.fived_attentionname, CRAMF_FilteredTask.fived_category1name, CRAMF_FilteredTask.fived_category2name, CRAMF_FilteredTask.fived_coordinatorname, CRAMF_FilteredTask.fived_estimatedduration, CRAMF_FilteredTask.fived_estimatedtime...

how to make a treeview control to notify its parent (a dialog) ... ?
Hi, I have a dialog in which there is a treeview control. When the mouse moves over any treeview item, I want to highlight it and then do something. So, I need to catch the event. What should I do? I add a mouse move handler for the dialog. The handler is executed when the mouse moves over the dialog. But when the mouse starts to enter the treeview control's client area, the hander is not executed. I guess the dialog needs to be notified the event by the treeview control. Can someone kindly tell how to do it? Your help is appreciated. JD "JD" <jdt_young@ya...

ActiveX control from existing controls (windows common or another
How to assemble a new control from several existing controls (windows common controls or another activex controls). My application uses MFC. Klina wrote: > How to assemble a new control from several existing controls (windows common > controls or another activex controls). My application uses MFC. A new ActiveX control can display a dialog. That dialog can contain any type of other controls. If you do not want the result to look like a dialog then turn of the dialog's titlebar and border styles. -- Scott McPhillips [VC++ MVP] > How to assemble a new control from severa...

Labels-creating different labels on the SAME page
I would like to print a set of labels, however, I do not want each label to be exactly the same as my sheet of address labels are. I would like to number the labels and print a sheet where each of the 30 labels on the sheet has a different number on it. How do I make each label on one sheet different? Use a mail merge. Numbers instead of addressees. :-) -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "camionneur" <camionneur@discussions.microsoft.com> wrote in message news:B8ECA494-24C7-44DE-...

Creat links to pages within the newsletter
How do I create links from the headlines discussed throughout a newsletter. Verses having readers scroll to each topic page by page. You can insert a hyperlink to the top of any other page in your publication and it will survive conversion to a PDF if you are using Pub 2007 and the pdf addin. If you insert a bookmark, and then a hyperlink to that bookmark and convert to a pdf, the link will only take you to the top of that page, and not to the bookmark. To get links to take you to specific bookmarks and thus specific locations on any page, you have to convert your publication t...

Creating Signatures Manually using HTML
Hello to all and sundry. I'm doing a favor for my boss--writing him a signature for Outlook in straight HTML. The reason I'm doing this is because the formatting of the generated XML signature is a bit off (e.g., it will treat a carriage return as a paragraph break instead of a line break). The problem is that when I write the signature (which takes next to no time), it doesn't appear to recognize the image tag or the stylesheet I've been using to format the text in the signature. While I'm not a CSS purist, I'd rather do it that way than use deprecated formatting t...

backup file created for every file
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Every time I save a file, there is another file created in the same folder called &quot;Back up of filename.&quot; It doesn't matter if it is a new file or an edited file. It happens every time. I think this just started since I updated to Snow Leopard. All these backups are annoying and double the disk space for every file. <br><br>Can I turn that off or stop it from happening, or is it another incompatibility with Snow Leopard? Have a look in Word> Preferences - Save, clear the...

OL 2007 Forms and not seeing new contacts created for the public G
A few years ago I created a form to be used with Exchange's public GAL. It has and is working OK. I am now running Windows 7 and Outlook 2007 and ran into this problem. When I go to the public GAL and create a new contact using a form I created after it is saved I don't see the contact. If I go to someone elses PC that is running Outlook 2003, I see the contact I just added and yes I have full Admin rights to my PC and the Exchange server. So I was wondering if the form could have something to do with it. If I right click on the GAL public folder and click properties and t...

How do you create a before and after date query?
I am working on getting my vacations tables to work better. What I am trying to do is to get a query for the 'StartDate' of staff vacations. There can be between 3 - 7 weeks of vacation for staff, with each week having it own 'StartDate'. The 'TBL-Vacation-2007' has seven 'StartDate' fields. (Start-1, Start-2, etc.) all in date/time format. I have created queries that will select only 'not null' entries in each 'StatDate' field, and append them together to create a table called: table: "VacStartDate" fields: "Name"...

HELP! Seeking Instructions to Create Report of POS (NOT RMS) Discounts Applied #2
We need to run monthly reports to determine how many of our different Discounts are claimed/used and the proceeds not tendered. We have offered a number of discounts to customers and employees as incentives and cannot find a method to track how each discount is applied. The built-in Discounted Sales report in POS 2.0 lists only the resulting Sale Price; we seek to have the report sorted by PresetDiscount type but the Advanced Report Filter dialog does not list Discount in the Field dropdown box and we can't locate the table in which transactions that have the Preset Discount are appl...

Capture Control Name Clicked
I am looking to sort a subform based on the column of data clicked. In the past, I have created a separate but nearly identical OnClick event for each label. In the interest of condensing code, since i have 25 columns, which may or maynot be shown depending on the SQL string built through code, and I don't want 25+ more Subs, all nearly identical... I would like to set the same function as the OnClick event of every label, and have the name of the label be passed to the function, from which I can get the column selected through a MID function. I can get this to work if I use Text B...

Script to call varibles from input file help please
Hi guys at the moment im using arrays to pull in iformation for the script but now i need to pull the info from an input file The text in the input file will be Servername\instance servername\instance etc and it would need too loop around to the EOF. This is what it looks like at the moment �** Define the SQL Instance names arrInst = Array(�Default�,�Instance2�,�Instance3�,�Instance4�,�Instance5�,�Instance6�,�Instance7�) '** Define Servename Array arrSvr = Array ("SeverName","SeverName","SeverName","SeverName","SeverNam...

How do I create a text box with brackets on either side?
I am trying to create a call-out text box that has square brackets on either side of the box instead of the usual box outline. (ie. [ ] - imagine that but larger). How do I do this? Use the freeform line tool in AutoShapes. Press shift while you draw. Using and snapping to grid guides will be helpful. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Paresh" <Paresh@discussions.microsoft.com> wrote in message news:B833945E-BC2B-4099-9A99-D76C7E8DEDBE@microsoft.com... >I am trying to create a call-out text box th...

Want to create a backup SMTP Connector
Background: The company has two offices separated geographically and connected via a dedicated T1. Each office has its own internet connection. The company resides in a single forest and a single internal domain. Each office has two Win2k3 DC's. Each DC is a global catalog. Each office has two Exchange 2k3 servers with one in each office configured as a bridgehead. Each office has its own Unix qmail mail relay located in their perimeter network. There are two AD sites. Each site representing its respective geographic location. There are two routing groups. Each routing group representing i...

Set platform to x86 while creating a project using a project templ
Hi, I am creating a C# project using my own project template. The project template has a csproj file with two platfroms Any CPU and x86. I want x86 as the default platform when the project is created in visual studio using this template. But the default platform displayed in the new project created is 'Any CPU'. The vstemplate or cscsproj doesn't have a property/item to specify the default platform. Is there a way to specify the default platform? Thanks ...

Creating an Autobiography
I'd like to write my autobiography and think I want to do it in Publisher, since I want to include a large number of photographs. I've found trying this in WORD is extremely difficult. Is PUBLISHER a good option, or does anyone have a better solution? I want to easily resize photos and insert them within my text, as I type my text. Create the text in Word, once you are finished, open Publisher, create a text box, paste the text, Publisher will automatically create text boxes and pages. Do your layout, adding more text boxes and pages as needed. -- Mary Sauer MSFT MVP http:/...

Create Outlook mailing list ex contacts
I wish to make a number of mailing lists in my outlook contact section. Please give me "how to" answer in GREAT detail. I am new to Microsoft Outlook which I am enjoying tremendously File->New->Distribution list. How much more detail do you need?? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, jirehtrust asked: | I wish to make a number of mailing lists in my outlook contact | section. Please give me "how ...