mruniqueid's Q&A profile
Visual C++ adding MFC controls to main window after start-up
Hello there, I am currently writing an MFC application, and want to add some controls. Most of the examples and tutorials show how to add controls to a dialog box, but I need to add them to the main window. The problem is, these controls will not be shown straight away, they are dependant on what file the user opens. Therefore, these buttons should (probably) be created in the appDoc class, in the ::OnFileOpen() function. In the create() function for buttons, one parameter is the parent window, and the appDoc does not have access to this - as far as I can tell. My question is, does anyone know the best way to either address or work around this problem I have been trying a couple of different ways and searched the forums, but have ...Show All
Audio and Video Development Regarding Set Property and Unset Property
Hi there My current understanding is : if any style attribute is set using script then it gets locked on that particular element ...till it is unlocked on that particular element....ie the style attributes are locked at element level. whereas for state attributes things are different. a) state:focused can be locked using one element and unlocked using other element(even that belonging to a different application) b) state : enabled and state:value can be locked by one element and unlocked using other element belonging to same application i.e. they are locked at application level. I have seen behaviour a). About b) I am not sure. Do these i.e. a) and b) look right to ya all. Here "global status& ...Show All
Visual Basic How Can we make any drive read only in windows
Hi All, I want to make any drive in windows read only. The basic aim is to restrict copy between Hard Disk and Removable disk. Thanks, Dinesh I think you can find what you're looking for here: How do I prevent people from writing data to the USB port This link explains how to put an entry in your system policy template to disallow writing data to USB drives. ...Show All
.NET Development How can I synchronize two MS Access tables?
Hello, I have 2 MS Access databases, In each database I have a table called catlog. What I want to do is to check the catlog table in database (B) and pass over each row to see if it (the row) exists on table (A). If the row doesn't exist, I insert it as a new row, if it does exist I update the existing row. I want to do that at the runtime of a C# program. Your help would be greatly appreciated. Hello, What if the source database column uses a combo box and shown only the second column, (first one is id and set width to 0" and hide), how can we change the above code to get the second column. I tried and always get the first column. Do we need any setting on the traget db's column as well Or ju ...Show All
SQL Server Passing parameters
Hi Does anyone know how to pass a parameter between two seperate datasets using MS Reporting Services (2005) If you mean passing parameters between two datasets in 2 different reports, this is how we have done it: In the target report, you need to set up a parameter to receive the value you are choosing to pass. Set up the report parameter to Multi-Value, Allow blank value. Under Available values, choose "Non-queried". Under default values, select "null". In the parent report, go to the textbox properties of the field containing the value(s) you want to pass. Go to the navigation tab, select "Jump to report:", select the report you want to pass values to(I'm pr ...Show All
SQL Server Passing Multivalue String Parameter to a Store Procedure
Hello Experts, I have a situation here. i have a report where the user enter Multi Value String (nothing but unique string ID's), based on this ID i need to get the related information from the table. when i pass the value it goes as , delimited text but i need to put the following statment in stored procedure Select ID,NAME, TITLE, FIX_FOR from Issue where ID in (@Param) when the SSRS pass the data to stored procedure @param has 'D412,D154,D457' Any idea on how to format this so the SQL Query works and return results. I appreciate your time and help /Soni Hi, have a look in here, I once wrote a function which will chop the values from the string and put them in a table var ...Show All
Visual C++ error LNK2001
Hi, (I saw the post on same subject but it seems to be a little different. so I'll use some word from that post!) There is a project earlier written in VC++ 6.0. I opened the same project in VS. NET 2005 and I am trying to compile. The code compiles properly (with couple of warnings) but while linking I am getting unresolved external symbol errors like this: The linker seems to have problem with seeing .obj from files in program (which are in the debug directory). It doesn't seem that the /Zl switch or the /NODEFAULTLIB are on. 1>Linking... 1>Utm.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zone.obj : error LNK2001: unresolved external symbol _RTC_Shutdown 1>Zones.obj ...Show All
Visual Basic Responding To A User Clicking The Red X In Upper Right Corner
Using VS05 Visual Basic - when a user closes a program by the red x in the upper right hand corner, is there a way to respond to that the same way as if they had properly used File, Exit Does the X raise an event I have not been able to figure this out yet. I don't want to disable the X, just respond to it. Thanks for your help. Bob The reason is this is a telephony application and File|Exit waits for all calls to finish before exiting the program. The Red X simply hangs up on everyone as the program closes. Thanks! Bob ...Show All
Windows Forms Form-to-form communication --- events or messages?
Hi, In my app, I want to send a message from a form I'm dragging to whichever other form in the application is "most covered" by the form I'm dragging. Since I'm new to C#, I'm just making sure I'm not sticking to old MFC habits, so... Is sending a message from one form to another still a recommended method of communication, or is it concidered "old hat" now, and I should learn new tricks Thanks, Jim Tomasko Hi, my name is Chris and I am working on an application using Visual C++ which is consist of at least 2 forms. Form1 consists of these controls : treeView, listView Form2 consists of these controls : TextBox, Button The flow is when I click ...Show All
Visual Studio Express Editions Fonts residing in the app's folder
Is there a way to use fonts that aren't installed but that resides in the application folder If you want to use a 'freeware' TTF and embed it in a program, try my private font test program at http://users.adelphia.net/~gcumbia/FontPrivate.zip I can not get the private font to print! (Using the regular 'drawstring') It is replaced with a regular font. ...Show All
Visual C# Casting anonymous lists
The following is legal in c#: DerivedClass d = new DerivedClass(); ITestClass i = (ITestClass)d; BaseTestClass b = (BaseTestClass)d; However, I receive a compile error when I do either of the following: List<DerivedClass> dList = new List<DerivedClass>(); List<ITestClass> iList = (List<ITestClass>)dList; List<BaseTestClass> bList = (List<BaseTestClass>)dList; Cannot convert type 'System.Collections.Generic.List<MyClass.DerivedClass>' to 'System.Collections.Generic.List<MyClass.ITestClass>' The question I have is... How does one go about casting between generic classes without doing it manually Is this even possible Class Code: public class DerivedClass : BaseTestClass, ITes ...Show All
Visual Basic passing variables between forms
I am having serious issues trying to take data from one form and passing it to another form... I have a 3 form new employee application that gets information from the new employee in textboxes and then sends it to a database... my problem is that once i make an instance of the form: dim theFirstForm as new Form1... and dime theSecondForm as new Form2. i cant seem to figure out how to access it and store it in variables... so that on the third form i can access it and populate a database with all the information. My programming teacher made the suggestion to make a new class and send all the info to the class and then on the submit button access it from there and then populate the database... any suggestions on the best way to do this i hav ...Show All
Visual C# - How do I refer to an assembly located in the Global assembly cache while compiling my file?
I put a strong named assembly in the assembly cache using: Gacutil –i MyAssembly.dll. How do I refer to it in my application MyApply.dll When I do: csc /t:library MyApply.cs /reference:MyAssembly.dll I get the error: Meta data MyAssembli.dll could not be found. When I go to the Global assembly cache I find the assembly there. Weird. Any ideas pls. What am I doing wrong please What section of this forum should I discuss AL, Building and CSC or VBC and assemblies referencing issues Thank you Questions related to AL and stuff should probably be posted to the CLR. As for referencing a GAC assembly you don't directly reference them during compilation. Instead you have to store a copy of the assemblies in ...Show All
Visual Studio Team System CTP5 - TF10175 error adding to source control while loading schema
Hi Started with a new SQL 2005 Wizard project with an existing database. Getting a lot of errors but this is the one that worries me the most: "TF10175: The team project folder $/FHI_2.SYSVAK does not exist. Contact your Team Foundation Server administrator and ask that it be created." etc Correct in the sence that this project doesn't exist but this is by design . Our team project folder is named FHI.SYSVAK. The first time I did this I got the same error except from the "missing" project folder beeing $/FHI_1.SYSVAK. Have to do an inspect of our code repository me thinks :-| TFS checked it in in the right place though Brumlemann Solution Architect Update: Checked the project file and it contained hard ...Show All
SQL Server Distribution Database Log File Growth
SQL Server 2000 | Transactional Replication Suspected Problem: Distribution Database Transaction Log Not Checkpointing I have a distributor with a distribution database that keeps growing and growing (About 40 GB in 7 days). The database is using the SIMPLE recovery model but the log continues to accumulate data. I have spent time looking at articles such as: "Factors that keep log records alive" ( http://msdn2.microsoft.com/en-us/library/ms345414.aspx ) and the one thing that stands out is the Checkpoint. I noticed that I can run a manual checkpoint and clear the log. If the log records were still active, the checkpoint would not allow the log to be truncated. This leads me to believe that the server is not properly initi ...Show All
