hhewson's Q&A profile
Internet Explorer Development HTML/Javascript errors with IE7
We developed an application which uses HTML/Javascript for the main user interface. We generate the HTML/Javascript using C++ code and then feed it to the embedded IE MFC control for rendering. This app was developed with IE6 and works fine in that environment. We recently upgraded some of our machines to IE7 and now when we run and the page renders in the embedded IE window, we get script errors. The errors we see are shown below. 1) Line: 1, Error: Invalid character 2) Line: 9, Error: 'CalendarPopup' is undefined The first error is a bit confusing, since if you view the source the first line is just <html>. I thought perhaps it wanted a valid <!DOCTYPE ...> header so I added that, but the error was still there. The second err ...Show All
SQL Server Matrix Push Direction
Hello - I have Matrix with LayoutDirection equal to RTL the problem is that the matrix push the elements to the right edge mean while I want element beside the rightreight edge in its location and the matrix expand to left not right. ...Show All
Visual Studio Express Editions Instance of Class and context
Hi, I have a project that contains the following: Form1------------------Form AccountsForm-------Form Search-----------------Form AccUpdate-----------Class I have created the following instances of the above AccountsForm in Form1 and called it ObjAccountsForm Search in the AccountsForm and called it ObjSearch AccUpdate in Search and called it ObjAccUpdate My question is When I need to reference, forexample, the instance of the AccUpdate Class form within my project I am having to type the full context to its instance Form1.objAccountsForm.objsearch.ObjAccUpdate. somepublic property in this Class My project contains many more Class's, and I have had to draw a table to keep track of where each instance of a ...Show All
SQL Server Need desperate help on a storedProc
Hi, I'm a PHP Programmer but I need help making a storedProc. basically, if I have orders and want to output the intials of the order taker I need help on that storedProc. So I got the IDClientID select idRessCreatedBy from TBL_quotation where idClient = IDclient now i got the IDresscreatedby and I need to do a substring(firstname,1,1) + substring(lastname,1,1) from tbl_ress where IDresscreatedby = IDresscreatedby Can anyone help me with this storedProc I would very much apreciate it Creek: I am guessing at a good bit of this, but maybe you have in mind something like this set nocount on -- --------------------------------------------------------------------- -- I am assuming that ...Show All
Visual Studio Express Editions Error Installing C++ Express 2005
Search the forums for "advpack.dll", there are several threads talking about this problem. This first hit I got might be relevant. ...Show All
SQL Server Exporting data to Flat File
I'm using SSIS package to export some data to a comma delimited CSV file. The problem is that some of the fields have commas in them. Is there a way to deal with this other to changing the delimiter It depends on your requirements. As I see it you have 2 options: 1) Change your delimiter 2) Change the commas in the data to something else. -Jamie ...Show All
SQL Server How to implement OR clause in MDX Queries
Hi How to implement OR clause in MDX Queries so that i can write a query with OR condition on two dimensions. If possible please post some example. Regards; Rakesh Steve Thanks for you prompt reply. Sorry, but its giving me following error. #Error Arbitrary shape is not allowed when its elements cross a reference dimension. Am I missing something Is it because i am using Many-to-Many relationship between Fact table and Users dimension Please suggest. Rakesh ...Show All
Visual C# foreach without Type
Hello, I have a collection and I want to iterate all elements in it. Example: string [] arr = new string [] { "A" , "B" , "C" }; foreach ( string s in arr) Console .WriteLine(s); in the example the element type is string, because the collection is array of strings. is there a way to do the same as foreach does, but without declaring the type. something like: foreach ( s in arr) Console .WriteLine(s); some how make the compiler know that the type is the collection's element type. Thanks. yes, I've heard something about the var stuff. Currently my application is deployed with .net framework 2.00, and it is not going to change for a while about object - ...Show All
Windows Forms Position of a treeview?
Does anyone know if it is possible to get the position of a treenode Mikael if tn is the current node in the treeview, then you can get the path to it from the root like this Dim str As String While Not (tn Is Nothing ) str = tn.Name & "\" & str tn = tn.Parent End While MessageBox.Show(str) Is it what you were looking for ...Show All
SQL Server Range function on role-playing dimensions
Hi, Isn't it possible to use the range function ( : operator) on role playing dimensions. For e.g. to find the average difference in days between Ship Date and Order Date for a set of fact rows. The error says #Error Range operator ( : ) operands have different hierarchies; they must be the same. Is there a workaround for this. Regards No, you can't do this because role-playing dimensions are treated as different dimensions in the cube, and the range function only works on members from the same hierarchy. You need to use something like the Linkmember() function to find the equivalent date on Order Date to Ship Date. HTH, Chris ...Show All
Windows Forms Dynamically choosing a UI library
Hello All. I'm working on an educational app that is targeted for ages 6 and up. I've got two versions of the UI library, simple (for the youngsters) and normal (for the not-so-youngsters). Both libraries are self-contained and localized, so UI upgrade is simply a matter of file replacement. The user can switch between normal and simple at runtime simply by selecting a menu command. The way that I'm doing it now is by maintaining a persistent UIState variable and checking it each time I need to open a form. That's the problem. I'm wondering (can't find anything on the forums or in MSDN) if there isn't a way to make the check once, initially, and responding to the user changing the option, and not having to check again. Basically, ...Show All
Visual Studio 2008 (Pre-release) Trigger on value changed
Lets say I have the following TextBlock < TextBlock x:Name = " countText " Text = " {Binding Path=Count} " FontSize = " 12px " FontWeight = " Bold " > </ TextBlock > I’ve spent all night trying to figure out how to use a Trigger on this TextBlock so that when the Text changes, a storyboard will begin. Can someone push me in the right direction Many thanks -Steven do you mean textblock or textbox here I am pretty new to this but thought that textblock was just static text and did not receive input I may well be wrong. anyhow with textbox you can create an event and in the xaml include TextChanged="the ...Show All
Visual C++ PrintTo command in the ShellExecute
Hello, I'm trying to use the ShellExecute API to print an HTML file to a specified printer passing the "printto" as the command verb. My default Internet Explorer is IE 7.0 Beta (I tried this also on IE 6), the problem that also I use the PrintTo verb and I pass the printer name to the ShellExecute, the Print Dialog of the IE. Is this a bug in IE Please give me a hand. Yes, it seems like that. But I noticed something: Create an MFC exe project and just replace these lines of the InitInstance() /* CCommandLineInfo cmdInfo; ParseCommandLine( cmdInfo ); if (!ProcessShellCommand(cmdInfo)) return FALSE; */ Instead use these lines: //////////////////////////////////// CCommandLineInfo cmdInfo; ParseCommandLine( cmdInfo ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How can I make a console in the game?
I was wondering how I could make a console in a game(full screen). To be specific in a game I'm making I have a ship and I'd like to be able to see the ships coordinates in the top right corner of the screen while the game runs. Offbeat, I implemented something similar to this in a game to track various stats (framerate, position coords, etc). Listed below is the code that I used. You could wrap these functions in a class if you were doing some more complex statistics. In my object building routine: // font object creation D3DXFONT_DESC Descrip; ZeroMemory( &Descrip, sizeof(D3DXFONT_DESC) ); _tcscpy( Descrip.FaceName, _T("Verdana") ); Descrip.Height = 16; Descrip.Italic = false; De ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Performance Questions
I have two questions regarding how much of a hit certain practices might take to the speed of the game and if anyone has taken the time to run the system through its paces yet. 1) How badly does using accessors (private members with public get and sets pointing to them) tax the system. I can't imagine it being a whole lot, but I can see if you have enough classes in use at the same time, it would add up. In my other, non-gaming, applications (both web and window) I make a strong practice out of never exposing members to the outside world unless it is done via a property, but I noticed that the SpaceWars demo either doesn't do that at all or does it very infrequently. I also remember the GarageGames guys at GameFest, I believe it was the ...Show All
