|
No one is going to go to those links to see your code. You must post the relevant code snippets here along with any exact error messages.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
You already posted this request in the quick answers thread.
As already told you, you don't have post links, but code (just for your knowledge the links are not even working).
Just a small direction: compile your code with debug info, open a debug session and localize where your code fails. Restrict the place, extract a small snippet showing the problem and post only that small piece if you want any help.
|
|
|
|
|
Back when I was in school, we made our own RPN calculator from scratch (after spending weeks discussing data structures and algorithms on the chalkboard), not converting it from one language to another. As a result, I understand how they work.
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
HI all
I want to design a ui widget library , which any iDE developer can use and develop GUI applications. let say library has application widgets include menu bars, tool bars.
at starting point what are functional and non functional requirements should i consider
use cases for UI widget design
Thanks for help
|
|
|
|
|
This is a looooonnnnggg conversation. If you're just starting out, I'd look at what other widget libraries have done. You'll probably also find that a lot of widget libraries have grown into full out frameworks.
Here are a few to look at:
- Qt
- MFC
- wxWidgets
- GTK+
|
|
|
|
|
HI all
I want to design a ui widget library , which any iDE developer can use and develop GUI applications. let say library has application widgets include menu bars, tool bars.
at starting point what are functional and non functional requirements should i consider
use cases for UI widget design
Thanks for help
|
|
|
|
|
I am looking around for topics like MFC vs WTL. There have been many discussions regarding that.
I am trying to make a decision of what type of library to use for programming C++ GUI application on Windows7/8.
One of the strongest arguments in support for using WTL over MFC was the fact that executable of WTL will be around 4x smaller in size than statically linked MFC Application.
Now, given the fact that we are living in 2015 now, does it really matter? If your program is 8MB or 2MB?
From what I see, MFC has many more rich features, and most of all, it is very well supported.
For example, I can install Visual Studio 2013, and build MFC right away and change it the way I want.
On the other hand WTL does not even install properly with its installer under new Visual Studio unless you do some tricks/corrections.
Plus, WTL literature/examples are scattered here and there, and there is very minimal support to it. And most of all, it doesnt have as many nice UI features as MFC does.
The only thing WTL buys me is the fact that its applications will be just more compact, and smaller, but then again, does it really matter for PC's of these days?
Also, MFC gives programmer to do anything what he could do with Win32 API.
Am I missing anything else what is needed to make a decisio whether I should go with MFC or WTL?
So, if one wants to develop some big and professional Windows GUI Application, what is better invest time for coding/learning, MFC, or WTL?
|
|
|
|
|
Member 11203277 wrote: WTL literature/examples are scattered here and there, and there is very minimal
support to it
Documentation, or lack thereof, would be a deal breaker for me, I vote for MFC as there are TONS of examples and lots of documentation. I can't remember the last time I really cared about the size of an executable.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
Member 11203277 wrote: Now, given the fact that we are living in 2015 now, does it really matter? If your program is 8MB or 2MB? Depends.
I'm on a 3G connection with a maximum with 7Gb a month. I won't fret over 6Mb, but most setups are larger than those 8Mb, often including stuff that has already been downloaded.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Member 11203277 wrote: One of the strongest arguments in support for using WTL over MFC was the fact that executable of WTL will be around 4x smaller in size than statically linked MFC Application.
Now, given the fact that we are living in 2015 now, does it really matter? If your program is 8MB or 2MB?
Well, when it comes to MFC, you should probably be dynamically linking to system installed dll's anyways. In that case, the size of the libraries doesn't really matter since you'd be sharing the system MFC libraries (instead of bloating the application).
|
|
|
|
|
I am facing the performance Issue in VS C# 2014, when we adding the item in softtree,setting the image in softtree and changing the font. sample code:-
//Collection.count=10000
for(int i=0;i<=Collection.count;i++)
{
//if collection count is 10k or more than that,facing performance issues.
//time taken by below three lines-6-11 ms.for each record.
int Index = sftTree.InsertItem(parentIndex + 1, desc);
sftTree.set_CellFont(Index , (short)0, new Font(sftTree.Font, FontStyle.Bold)); sftTree.set_ItemPicture(Index,GetImage("Sample"));
}
C# Full Execution Time-3.5 Min
VB6 Full Exceution Time-.19 sec to 1.5 Min
|
|
|
|
|
This is a C++ forum; you're looking for the C# forum, which is immediately below this one in the list.
You'll also need to explain what "softtree" is.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I am developing an application to copy USB memory sticks. As part of this app, I want to be able to eject the memory sticks when copying is complete. (I DO wonder whether this is necessary as I do a file flush before closing the file) I found a nice little utility (deveject) to implement this and am calling it using WinExec() - I do realise that this is very old and I should be moving on to CreateProcess(), but it has worked well for me in the past and I'm in a bit of a hurry !! Although WinExec() returns 33 (which indicates success), the drives are still accessable aftyerwards and so deveject presumably has not executed properly As a test for the command line used, I placed it in a batch file (deveject -EjectName:"USB Mass Storage Device") in the same directory as deveject.exe, and it executes perfectly, releasing all USB sticks. However, if I use WinExec() to call this batch file, then it doesn't work (but good return code from WinExec() )
So my question is - what am I doing wrong when using WinExec() ? Should I be doing something (permission-wise)to allow the WinExec command line to execute ? My code is as follows:-
CString szCmdLine;
const CString quote = "\"";
szCmdLine = "D:\\StickCopier\\deveject -EjectName:" + quote + "USB Mass Storage Device" + quote;
UINT uiRC;
uiRC = WinExec(szCmdLine,SW_HIDE);
(The command line formed is exactly what I used in the batch file)
Would greatly appreciate any help on this daft (but perplexing) problem !!
modified 10-Mar-15 7:44am.
|
|
|
|
|
Still learning how to code wrote: I placed it in a batch file (deveject -EjectName:"USB Mass Storage Device") in...
Still learning how to code wrote: szCmdLine = "D:\\StickCopier\\deveject -EjectName:" + quote + "USB Mass Storage Device" + quote; Are not quite the same. Try:
szCmdLine = "D:\\StickCopier\\deveject -EjectName:\"USB Mass Storage Device\"";
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Hello David,
Thanks for your reply ! I have tried your suggestion but this change produces the command line "D:\StickCopier\deveject -EjectName:""USB Mass Storage Device""" in the debugger (i.e. a PAIR of double quotes whereas single double quotes are needed for the argument to EjectName
Since my original posting, I have tried ShellExecute() and am getting a similar result - ShellExecute() succeeds (RC = 42, which is greater than 33), but the USB stick is still mounted.
New code is as follows:-
CString szFile = "D:\\StickCopier\\deveject.exe";
const CString quote = "\""; // This is actually the character '"'
CString szParameters = "-EjectName:" + quote + "USB Mass Storage Device" + quote;
CString szDirectory = "D:\\StickCopier\\";
HINSTANCE hInstance;
hInstance = ShellExecute(NULL,"Open",szFile, szParameters, szDirectory,SW_HIDE); // returns 42 (> 33 so no error
Doug
|
|
|
|
|
Hello,
I’m new in MFC programming and I have a doubt about destructor's calling in a MFC application.
I wonder if it’s necessary to insert destructors for the classes of the project.
I suppose (but I’m not sure) that Windows automatically calls destructors for classes created by the project wizard (doc, view, frame…) when I stop the program execution and close the program window.
But what’s the situation for classes that I have inserted in the software?
I never put destructor for these objects (dialogs, strings, bitmap, controls, custom objects…)
Is this a problem? What could be the problems in this situation?
Best regards.
|
|
|
|
|
lor75 wrote: I wonder if it’s necessary to insert destructors for the classes of the project. Yes, if you have clean up tasks that need to be done.
lor75 wrote: I suppose (but I’m not sure) that Windows automatically calls destructors for classes... Yes it does.
lor75 wrote: But what’s the situation for classes that I have inserted in the software? Please explain.
lor75 wrote: I never put destructor for these objects (dialogs, strings, bitmap, controls, custom objects…) You mean classes that you're using as opposed to those that you've created?
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
I try to explain with an example: I create a CBitmap object used to put a bitmap on a custom button control.
Do I have to destroy the object when I exit from the program or the object is automatically destroied?
|
|
|
|
|
Is the CBitmap object allocated on the heap (with new) or on the stack
class YourClass
{
~YourClass (){};
CBitmap m_Bitmap;
};
or
class YourClass
{
~YourClass () {delete m_Bitmap;};
CBitmap* m_Bitmap;
};
If you properly override a MFC class then the MFC (and/or underlying Win32 object) will be destructed by the framework, but everything else that you have allocated yourself should be handled by you (in a cleanup function or in the class destructor).
I'd rather be phishing!
|
|
|
|
|
If the CBitmap was dynamically allocated, then you probably need to deallocate it yourself. If it was allocated on the stack, then the framework will take care of it. For the most part, anything you new, you must delete.
As for classes that you make, you only really need an explicit destructor if you need to clean things up that you did (deallocate memory/resources, close files, close sockets, etc). The framework has default destructors that deallocate what it allocated behind the scenes, so you just have to clean up what you did for the most part.
|
|
|
|
|
which is the best book to study about graohics in c , and which compiler is the best ? i have been looking orward to make a game using c. please guide me
|
|
|
|
|
I generally use always plain C even for COM. Unfortunately nowadays almost all advanced libraries for graphics, comms, and whatever you want are available only in OOP and managed code.
But still you can do alot of things using plane C.
I suggest to start studying the old good GDI[^].
For games is available the evergreen Allegro library[^].
Hope this will help.
|
|
|
|
|
If a book offers graphics, its best for beginners! There is no problem for you to get in depth of everything, you need to get idea of it right now... Any book, would give you an idea of what graphics is, what C has for graphics and so on.
Secondly, every compiler if it compiles the code correctly, is good... You can try out multiple, and see for which one suits you. Once you've learnt enough, and you want to move to productive scenarios. Then I would suggest, you move on from C to C++ at least. GTK+, QT and many more libraries are out there to support graphics. You can learn the basic difference here: http://stackoverflow.com/a/1887094/1762944[^].
Finally, nothing is best, you have to see which product suits your requirements. Good luck!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
c/c++ program of rabin cryptosystem
|
|
|
|
|
If you mean "Please give me the source of a c/c++ program of rabin cryptosystem", then I am afraid you have come to the wrong place.
|
|
|
|
|