|
Consider to use Qt if wanting to implement a cross platform native application.
Another alternative is to use Silverlight and .NET.
|
|
|
|
|
Hi!
Is it available free? Won't there be any license issues? Can you please confirm these things before I decide to use Qt? If it's payable, how much is the cost?
modified on Tuesday, August 30, 2011 1:12 AM
|
|
|
|
|
|
Hi all,
i want to write multiple files inside a loop simultaneously. But how many files will be written at a time will be decided at run time but, i know the maximum limit can be 15.
I am not getting how to create object of class FILE and then how to access them.
Can anybody help me in this.
Thanks in advance
|
|
|
|
|
Can this[^] and this[^] help you?
-Sarath.
Rate the answers and close your posts if it's answered
|
|
|
|
|
Create using fopen[^]
Write using fwrite[^], fputs[^], fprintf[^] and alike.
Close by fclose[^].
The fopen page even has a small example around the bottom.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Usually it gives very bad performance to write to multiple files at the same time. Maybe this has changed with the introduction of SSD disks.
|
|
|
|
|
Hi ,
I am converting my 32 bit windows application in VC++ into 64 bit windows application. I convert it with configuration setting req. for 64 bit platform. But when i check performance of 64 bit application, it is same as 32 bit. I did not found any improvement is speed execution of application. What changes i need to do in C++ VC++ code to speed up the execution of my application on windows 64 bit OS.
Regards
abm
|
|
|
|
|
There is no performance improvement by converting to 64 bit, unless your application performs lots of 64 bit calculations.
The main reason for converting to 64 bit is to get access lots of RAM, so one is not restricted by the usual 1-2 GByte RAM. The minor reason is that in 10-15 years the 32 bit platform will no longer be supported (Like 16 bit was abandoned with Win7)
See also Find out if you need the 64-bit version of your product[^]
|
|
|
|
|
Just to add a little to the previous post:
There is a minor performance improvement for all programs in terms of function calls. The calling conventions have been optimised for speed, by passing the first few arguments via the CPU registries.
However, this increase is only seen if your application uses a lot of function calls. Mostly, the compiler tries to avoid them in the first place, such as using inlining.
Also, if you make lots of API calls then you should see a small increase, as the WoW64 subsystem is taken out between the application and the Windows kernel (which does the conversion to the new calling convention for the 32 bits applications).
But, mostly, 64 bits is for the increase in address space, the most noticeable example being that you can use more than 4 GiB of RAM in your system.
|
|
|
|
|
I was messing around with resource files and such in C#.
I found out that with a Compiled Resource Script you can add multiple icons to your applications.
Then I found out that a manifest file allows you to force it to be run as admin.
But a choice has to be made between the two (in c#).
I came to the conclusion that the Compiled Resource Script must contain a manifest.(if this is faulty, please correct me.)
I took a quick look into Resource Scripts (RC) C++ and saw something of a structure.
IDI_ICON1 ICON "file.ico"
IDB_BITMAP1 BITMAP "file.bmp"
Taking a peek in the Resource.h file that was generated I noticed the definition for IDI_ICON1, same goes for IDB_BITMAP1. ICON and BITMAP seem keywords for the Resource Compiler (can't find their definitions in #includes).
But what if I want to add a manifest?
IDM_MAN MANIFEST "file.manifest"
ends up with a folder called "Manifest" (including quotes, which does not happen with ICON and BITMAP).
I've seen MSDN saying that a manifest can be to an existing (post-compile) binary file, but can it be done with Resource Script, compiled with RC.exe?
The first rule of CListCtrl is you do not talk about CListCtrl - kornman
|
|
|
|
|
If it's not a compiler bug, it could be possible the manifest data overwrites the resource information for icons. If that's the case, you might need to write a custom build step to manually add the manifest, or the icons.
I would imagine it's the manifest overwriting the other resources.
|
|
|
|
|
nbgangsta wrote: But what if I want to add a manifest? IDM_MAN MANIFEST
"file.manifest" ends up with a folder called "Manifest" (including quotes,
which does not happen with ICON and BITMAP).
It usually ends up looking something like:
1 24 MOVEABLE PURE "res\\MyApp.exe.manifest"
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
nbgangsta wrote: But a choice has to be made between the two (in c#).
... not really...
You could (like me) use the icon resource in c sharp for the icon and then use something like:
If NativeMethod.IsProcessElevated = False Then
Dim proc As New ProcessStartInfo
proc.UseShellExecute = True
proc.WorkingDirectory = Environment.CurrentDirectory
proc.FileName = Application.ExecutablePath
proc.Verb = "runas"
Using AppProcess As New Process
AppProcess.StartInfo = proc
Try
AppProcess.Start()
Catch ex As Exception
Throw New Exception("UAC Authorization Failed")
End Try
AppProcess.WaitForExit()
End Using
Else
End If
I run this in a Main method ... so your version may need to be modified ... Also I am more familiar with VB ... so have left you to convert it to c#
... Also you will need to download the Microsoft UAC project from here[^] for this to work
Kris
|
|
|
|
|
Have anybody know how to set an VC6 editor behaviuor on Ctrl+Tab at an standard MDI application ? A MDI application roll on window after window on Ctrl+Tab, if I release Ctrl key or not, but VC6 editor (and any other editor) show previuous child window if I release Ctrl key ... any ideas ? Thanks.
|
|
|
|
|
hi, how can i get all the windows handle from a point?
For example if in (100,100) i have two windows overlapped, i want to get the handle of the topmost window and the handle of the other window.
|
|
|
|
|
WindowFromPoint, ChildWindowFromPointEx.
For windows under windows, you'll have to EnumWindows and do your own hit testing.
/* Charles Oppermann */
http://weblogs.asp.net/chuckop
|
|
|
|
|
Use EnumWindows to enumerate the windows.
Use GetWindowRect to get the rectangle of the window.
Then use PtInRect to check if the point of interest lies within the window rectangle.
|
|
|
|
|
Additionally to what the others have said, the "get the rectangle and check if the point is inside it" method might not work with non-rectangular windows (layered windows with per-pixel alpha (see here[^]) or windows with a non-rectangular window region (see here[^]). I wonder if sending these kinds of windows the WM_NCHITTEST[^] message could tell you if the point is on the window or not.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
That's what RealChildWindowFromPoint handles.
/* Charles Oppermann */
http://weblogs.asp.net/chuckop
|
|
|
|
|
Load and Display a Dialog Box from Simple Win32 DLL with No MFC support
|
|
|
|
|
Don't you like DialogBox function[^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have declared a global coblist in my Snapshot.CPP file on the top of the file.
CObList SnapList;
void CSnapShot::OnDelete()
{
int index = 2; //Want to delete some item from the list
pos = SnapList.FindIndex(index);
CSnp *pSnp = (CSnp*)SnapList.GetAt(pos);
SnapList.RemoveAt(pos);
delete pSnp;
}
My question is: Is it a must to delete the object after removing the pos from the SnapList using the statement:
SnapList.RemoveAt(pos); delete pSnp;
or
we can just remove the statement
delete pSnp;
from the above code.
|
|
|
|
|
manoharbalu wrote: Is it a must to delete the object after removing the pos from the SnapList Yes, when the list is the owner (single holder) of its entries
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
What Eugen said is correct: it depends who is considered the 'owner' of this object, i. e. for allocating and deallocating the required resources.
If you have references to that same object outside the list, then you must make sure that either these are not being used after deleteing your object, or you must choose another owner, because in this case the list must not delete its elements! But that means that whatever other object (or function) owns the elements, it is that object (or function) which is responsible for deleting the objects to prevent memory leaks.
|
|
|
|