|
Wow that's great! I'll try to work on it
Thanks Mr. Christian. Maybe I'll just post again if I encounter any problem/difficulties
|
|
|
|
|
By all means, that's what we're here for
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christian,
How do you #ifdef out entire files? I may have to do this for some of the files. do I just do something like this?
#if ISEXTENDED<br />
#endif
Also, I tried what you suggested about moving the differences into a separate project. If the Main project has a reference to the Extended project, is it okay not to compile the extended project?
Thanks Much!
~Rafferty
|
|
|
|
|
Rafferty Uy wrote:
#if ISEXTENDED
// ... entire code here ...
#endif
That's it
Rafferty Uy wrote:
Also, I tried what you suggested about moving the differences into a separate project. If the Main project has a reference to the Extended project, is it okay not to compile the extended project?
I wouldn't expect the projects to reference each other as a file, but to reference each others source files. Yes, you can build one and not the other if you want to.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Dear sirs:
I am developing a client application that retrieves files from an FTP site. I wish for these files to be secure. The methodology I have chosen to implement security is as follows: The files are initially encrypted on the server. A file is then downloaded to the user's machine and decrypted in an unobvious location, and then dislayed in the client application I have developed for viewing the files. When the user is finished viewing the document (closes it), then the file is re-encrypted.
The only drawback to this method is that while the files are opened by the client program (they are mostly adobe pdf files), the security of the files are compromised.
Does anyone have a better (and not too difficult) solution?
Thank you,
Rob Hyland
|
|
|
|
|
Once the files are on a local machine, where is the security issue ? If they are PDF's, they can't be edited by most people, do you want to display them without the user being able to give them to anyone else ?
I wonder if it's possible to decrypt the files in memory, and pass them to an IE control, which will render them for you ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I've writen few small apps using doc/view architecture.
Now I want to port my apps using .NET framework,
is there any doc/view-like in.Net?
Thanks
|
|
|
|
|
Not specifically, but there's no reason why you can't emulate it. No matter which way you look at it, MFC does not exist in .NET, you'll be porting to a whole new windowing library, so it won't be the easiest thing in the world to do.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for your information. But if I'd prefer using MFC rather than .NET, What about the future of MFC? Will it be obsolete like Win16 Apps when came Win32 Apps?
Is Microsoft still developing MFC? because I've heard that Microsoft stops developing VB6.
|
|
|
|
|
VB6 is as dead as the dodo, because it's evolved to VB.NET. MFC 6.0 is dead, because it's evolved into MFC 7.1. MFC didn't get a lot of attention in the last two compiler releases, but C++ certainly did. Either way, the framework exists, and you have the source code. I don't think MFC is the best way to go anymore, but people still write pre MFC style windows apps, you can use whatever framework you like.
If you're using MFC, why ask in the .NET framework forum ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Actually I plan to port to .NET framework,
but I don't want to waste too much time for porting my existing apps.
Maybe there's an existing MFC-like framework in .NET so I ask in this forum.
Thanx,
|
|
|
|
|
senzafine wrote:
Actually I plan to port to .NET framework,
Well, then use managed C++ to start with, and you'll be in the .NET framework. DON'T write an MFC app, .NET will not support it, you'll be creating rewrite headaches, unless you keep your presentation layer very seperate and resign yourself to rewriting it.
senzafine wrote:
Maybe there's an existing MFC-like framework in .NET so I ask in this forum.
There isn't one that's analogous to MFC, not that I know of.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I have an app developed using Windows Forms. I need to save the size that the user resizes the app to, so as to open the app window to that size when the user restarts the app. I also need to save the desktop location of the app, so as to display the app window at that location when the app restarts.
What is the best way to do this?
I have implemented this using a config file, such that I save the size.width, size.height, and location.x, location.y of the app when the event to close the app is fired. The problem with this is that when the user closes the app in its minimized state, then the app size is 160 x 30, and the app re-opens at this size at the next restart.
Thanks.
-Shefali
|
|
|
|
|
Check first before writing to the config file ,if
if(this.WindowsState==FormWindowsState.Normal)<br />
{<br />
}
|
|
|
|
|
Hey guys, has anyone else run accross this behavior before?
When using dataadapter.update within the context of a transaction, if the transaction succeeds your datasource has .acceptchanges called and everything is fine. If that transaction fails however, .acceptchanges is still called.
this just doesn't seem right to me? according to a post i found on google ms's recommended way of dealing with this is to make a copy of the data before submitting the update, then if the transaction fails, clear the data and merge the previous version back into the main dataset. i was baffled when i came upon this the other day.
does anyone have any insight as to whether this behavior might be changing in the next release of the bcl? i don't have any of the beta's to check it out and i'm more just curious than anything. seems like if the transaction failed they should just leave the rowstate data as is...
-jim
|
|
|
|
|
I'm having troubles with the MonthCalendar control.
I want its culture to be en-US, but is always
shows the names according to the current locale settings.
My locale settings are Bulgarian and the control appears
twice as wide and it's ugly. It displays the whole names
of the days of the week, not just the first three letters
and it's very very wide. I tried changing the culture of the
assembly but it appears that:
Error emitting 'System.Reflection.AssemblyCultureAttribute' attribute -- 'Executables cannot be localized, Culture should always be empty'
Is there a way to get MonthCalendar always display the
english names?
|
|
|
|
|
Hi,
I use an ArrayList to store class objects which have some public properties defined.
After adding objects to the ArrayList and binding the ArrayList to a datagrid I see all entries of the ArrayList and all public property fields of the class.
However, if I add further objects to the ArrayList or remove some, the datagrid is not updated at all. I have to reset the DataSource property and make a new databinding to see the current ArrayList content
e.g.
dataGrid1.DataSource = null;
dataGrid1.DataSource = myArrayList;
I am sure there is a better way to do that and I guess it has to do with implementing a certain interface, but everything I found so far was quite confusing.
Does anyone have simple example code showing how to do it ?
thanks
ch
|
|
|
|
|
There is a method on the DataGrid object called Refresh ().
Just call that in your code, and it should update the view.
In fact, there is a tutorial right here at the CodeProject, in which the author does something very similar to what you are doing (written for Managed C++ .NET).
http://www.codeproject.com/managedcpp/DataGridSampleMCpp.asp[^]
|
|
|
|
|
Hi guys,
I have created one pocket pc application in C#. I am using
windows pocket pc installation machanism to install the application to
the pocket pc. At the time of installation i am installing .NET
Compact Framework and SQL CE with my application using the
installation machanism.
I have tested it in windows 2000 server and Windows XP with
SP1, it is working fine. But when I tested in windows 2003 server and
windows XP with SP2, it won't able to install the application. What
can I do?. Anybody help me???
Thanks in advance....
Joji Perayil
|
|
|
|
|
Hello Developers,
I want to create a rotated font, and I use the following code to achieve this, like in this sample (http://winfx.msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_fxsamples/html/7c8b073b-5889-45e7-9a99-ebee39fe3b79.asp[^]), but using 1.1 framework.
Font CreateRotatedFont(int angle, Graphics g)
{
LOGFONT lf = new LOGFONT();
// scale a 12 point font for current screen DPI
lf.Height = (int)(-16f * g.DpiY / 96);
lf.Width = 0;
// rotation angle in tenths of degrees
lf.Escapement = angle * 10;
// Orientation == Escapement for mobile device OS
lf.Orientation = lf.Escapement;
lf.Weight = 0;
lf.Italic = 0;
lf.Underline = 0;
lf.StrikeOut = 0;
lf.CharSet = 0; //LogFontCharSet.Default;
lf.OutPrecision = 0;//LogFontPrecision.Default;
lf.ClipPrecision = 0;//LogFontClipPrecision.Default;
lf.Quality = 5;//LogFontQuality.ClearType;
lf.PitchAndFamily = 0;//LogFontPitchAndFamily.Default;
lf.FaceName = "Tahoma";
return System.Drawing.Font.FromLogFont(lf);
}
Am I doing something wrong in this code, or maybe someone did similar code once?
Thank you!
|
|
|
|
|
WinFX is user with .NET framework 2.0.
|
|
|
|
|
Hi,
I'm trying to work out the standard deviation of some numeric data in my form... but I can't see any way to call a StDev function. I've hunted high and low on the web and in the .Net help but I can't seem to find anything like this... can anybody make any suggestions as to how to do this?
TIA...
Mike
|
|
|
|
|
You can calculate StdDev is a simple loop.
1) Calculate the average of all values.
2) For each value X calculate DIFF = (X-AVG).
3) Square each DIFF value.
4) Sum the Squared DIFF values for the entire data set.
5) Divide the Sum of Squared DIFFs by (n-1) where n = number of values.
6) StdDev = Square Root of value calculated in Step 5.
Robert
|
|
|
|
|
Thanks so much for that - I really appreciate it... I'll give that a try when I get a chance to get back to that project.
Mike
|
|
|
|
|
G'day everyone,
I've tried to begin playing with smart device and pocket pc 2003 using VS .net 2003. I can begin a project, no problem, but when I try to debug, it comes up with an error...
One or more files from the Emulator for Windows CE installation is missing,
Please reinstall Emulator for Windows CE and try again.
Well, I've done that numerous times, even tried v 5.0 and 4.2, downloaded and installed just about every tool and sdk for the smartphone and pocket pc and still I get this error.
Im running VS 2003 and XP Pro.
Any ideas on how to get this to work would be great.
Cheers in advance.
Craig
|
|
|
|