|
Anonymous wrote:
The best way is to get a new object via new.
Everything else makes your application crashing after some time.
Could you explain this problem a little more detailed? I use dynamic and static socket objects, my app runs stable... well, I think it does.
Thanks, Moak
|
|
|
|
|
Anybody can give me a sample code of IE horizontal band (at the bottom of IE)?
|
|
|
|
|
I dont know but the only thing I see at the bottom of IE is a standard statusbar. (IE 5.5 so maybe there is another bar in newer versions)
But the top Bar is a CReBar in case you're wondering.
I used to have a life ... now I have a computer
|
|
|
|
|
yeah..the bar is so common...but what do you exactly mean?
Hey!I am @lex.
|
|
|
|
|
Hi i've just started learning c++ with visual c++.net standard, after programming in java for about 3 years.
Im trying to build a simple QT example, copyed and pasted from there site. but im getting heaps of errors from qstring, qapplication,...
I have set the project director setting with the qt/lib, /include, /bin directorys.
This has to be a simple problem.
Any advice?
thanks.
|
|
|
|
|
What is QT ?
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
It allows you to write code for windows, mac, and unix at the same time. Go to www.trolltech.com for more info.
|
|
|
|
|
Ah - I knew I'd heard of it....
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
|
This is the most simple example i wanted to start off with.
I created a new win32 project, the other project files are blank ( resources.h ,QT2.h )
Is it the way im creating the project?
The QT .lib,.h file paths are added to the project settings.
Is there a particular order they should be in?
Thanks for any help!
// QT2.cpp
#include "stdafx.h"
#include "QT2.h"
#include <qapplication.h>
#include <qpushbutton.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );
a.setMainWidget( &hello );
hello.show();
return a.exec();
}
The full erros list :
i:\qt\include\qpixmap.h(71): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qcstring.h(7): error C2065: 'QApplication' : undeclared identifier
i:\qt\include\qcstring.h(7): error C2146: syntax error : missing ';' before identifier 'app'
i:\qt\include\qcstring.h(7): error C2065: 'app' : undeclared identifier
i:\qt\include\qcstring.h(8): error C2065: 'Editor' : undeclared identifier
i:\qt\include\qcstring.h(8): error C2146: syntax error : missing ';' before identifier 'editor'
i:\qt\include\qcstring.h(8): error C2065: 'editor' : undeclared identifier
i:\qt\include\qcstring.h(10): error C2530: 'editor' : references must be initialized
i:\qt\include\qcstring.h(11): error C2825: 'editor::show': cannot form a qualified name
i:\qt\include\qcstring.h(11): error C2039: 'show' : is not a member of 'operator``global namespace'''
i:\qt\include\qcstring.h(11): error C2146: syntax error : missing ';' before identifier 'show'
i:\qt\include\qcstring.h(11): error C2065: 'show' : undeclared identifier
i:\qt\include\qcstring.h(12): error C2064: term does not evaluate to a function
i:\qt\include\qstring.h(331): error C2504: 'QShared' : base class undefined
i:\qt\include\qstring.h(355): error C2629: unexpected 'QString ('
i:\qt\include\qstring.h(355): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qstring.h(366): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qstring.h(504): error C2146: syntax error : missing ';' before identifier 'utf8'
i:\qt\include\qstring.h(504): error C2501: 'QString::QCString' : missing storage-class or type specifiers
i:\qt\include\qstring.h(504): warning C4183: 'utf8': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstring.h(507): error C2146: syntax error : missing ';' before identifier 'local8Bit'
i:\qt\include\qstring.h(507): error C2501: 'QString::QCString' : missing storage-class or type specifiers
i:\qt\include\qstring.h(507): warning C4183: 'local8Bit': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstring.h(546): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qstring.h(644): error C2039: 'ref' : is not a member of 'QStringData'
i:\qt\include\qstring.h(649): error C2039: 'deref' : is not a member of 'QStringData'
i:\qt\include\qstring.h(331) : see declaration of 'QStringData'
i:\qt\include\qstring.h(820): error C2146: syntax error : missing ';' before identifier 'qt_winQString2MB'
i:\qt\include\qregion.h(76): error C2143: syntax error : missing ';' before '<'
i:\qt\include\qregion.h(76): error C2501: 'QRegion::QArray' : missing storage-class or type specifiers
i:\qt\include\qregion.h(76): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qregion.h(116): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qmime.h(52): error C2146: syntax error : missing ';' before identifier 'encodedData'
i:\qt\include\qmime.h(52): error C2433: 'QMimeSource::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(52): error C2501: 'QMimeSource::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(52): error C2253: 'QMimeSource::encodedData' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(52): warning C4183: 'encodedData': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qmime.h(115): error C2146: syntax error : missing ';' before identifier 'convertToMime'
i:\qt\include\qmime.h(115): error C2433: 'QWindowsMime::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(115): error C2501: 'QWindowsMime::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(115): error C2061: syntax error : identifier 'QByteArray'
i:\qt\include\qmime.h(115): error C2253: 'QWindowsMime::convertToMime' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(115): warning C4183: 'convertToMime': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qmime.h(116): error C2146: syntax error : missing ';' before identifier 'convertFromMime'
i:\qt\include\qmime.h(116): error C2433: 'QWindowsMime::QByteArray' : 'virtual' not permitted on data declarations
i:\qt\include\qmime.h(116): error C2501: 'QWindowsMime::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qmime.h(116): error C2061: syntax error : identifier 'QByteArray'
i:\qt\include\qmime.h(116): error C2253: 'QWindowsMime::convertFromMime' : pure specifier only applies to virtual function - specifier ignored
i:\qt\include\qmime.h(116): warning C4183: 'convertFromMime': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qevent.h(361): error C2146: syntax error : missing ';' before identifier 'encodedData'
i:\qt\include\qevent.h(361): error C2501: 'QDropEvent::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qevent.h(361): warning C4183: 'encodedData': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qevent.h(364): error C2146: syntax error : missing ';' before identifier 'data'
i:\qt\include\qevent.h(364): error C2501: 'QDropEvent::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qevent.h(364): warning C4183: 'data': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qcstring.h(6): error C2084: function 'int main(int,char ** )' already has a body
i:\qt\include\qcstring.h(5) : see previous definition of 'main'
i:\qt\include\qcstring.h(7): error C2146: syntax error : missing ';' before identifier 'app'
i:\qt\include\qcstring.h(8): error C2146: syntax error : missing ';' before identifier 'editor'
i:\qt\include\qcstring.h(10): error C2530: 'editor' : references must be initialized
i:\qt\include\qcstring.h(11): error C2825: 'editor::show': cannot form a qualified name
i:\qt\include\qcstring.h(11): error C2143: syntax error : missing ';' before 'show'
i:\qt\include\qcstring.h(12): error C2064: term does not evaluate to a function
i:\qt\include\qiodevice.h(128): error C2143: syntax error : missing ',' before '&'
i:\qt\include\qiodevice.h(129): error C2146: syntax error : missing ';' before identifier 'readAll'
i:\qt\include\qiodevice.h(129): error C2501: 'QIODevice::QByteArray' : missing storage-class or type specifiers
i:\qt\include\qiodevice.h(129): warning C4183: 'readAll': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qdatastream.h(52): error C2629: unexpected 'QDataStream ('
i:\qt\include\qdatastream.h(52): error C2238: unexpected token(s) preceding ';'
i:\qt\include\qobject.h(161): error C2146: syntax error : missing ';' before identifier 'normalizeSignalSlot'
i:\qt\include\qobject.h(161): warning C4183: 'normalizeSignalSlot': missing return type; assumed to be a member function returning 'int'
i:\qt\include\qstyle.h(81): error C2061: syntax error : identifier 'QApplication'
i:\qt\include\qstyle.h(82): error C2061: syntax error : identifier 'QApplication'
i:\qt\include\qtranslator.h(92): error C2146: syntax error : missing ';' before identifier 'cx'
i:\qt\include\qtranslator.h(92): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(92): error C2501: 'QTranslatorMessage::cx' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(93): error C2146: syntax error : missing ';' before identifier 'st'
i:\qt\include\qtranslator.h(93): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(93): error C2501: 'QTranslatorMessage::st' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(94): error C2146: syntax error : missing ';' before identifier 'cm'
i:\qt\include\qtranslator.h(94): error C2501: 'QTranslatorMessage::QCString' : missing storage-class or type specifiers
i:\qt\include\qtranslator.h(94): error C2501: 'QTranslatorMessage::cm' : missing storage-class or type specifiers
i:\qt\include\qapplication.h(57): error C2143: syntax error : missing ';' before '*'
i:\qt\include\qapplication.h(57): error C2371: 'QApplication' : redefinition; different basic types
i:\qt\include\qapplication.h(57): error C2501: 'qApp' : missing storage-class or type specifiers
i:\qt\include\qapplication.h(397): error C2227: left of '->notify' must point to class/struct/union
i:\qt\include\qpixmap.h(71): error C2629: unexpected 'QPixmap ('
i:\qt\include\qpixmap.h(122): error C2143: syntax error : missing ',' before '&'
i:\C++ Testing\QT2\QT2.cpp(14): error C2146: syntax error : missing ';' before identifier 'a'
i:\C++ Testing\QT2\QT2.cpp(14): error C2065: 'a' : undeclared identifier
i:\C++ Testing\QT2\QT2.cpp(19): error C2228: left of '.setMainWidget' must have class/struct/union type
i:\C++ Testing\QT2\QT2.cpp(21): error C2228: left of '.exec' must have class/struct/union type
|
|
|
|
|
I need some advice.
I am working on an application that needs to have customizable forms (Visual C++ MFC GUI). This application is targeted at the general population. One of my goals for this app is that 95%+ of the users will be able to easily customize the forms to their needs. This is, infact, a key requirement for the app.
I have worked with my own form designer engine (yuck!), Dundas Hyperforms (yuck!), VBA and a couple others from this site and others. The main problem with all of these is that my experience indicates that the average user won't be able to figure out how to customize them. Each of these form engines tries to be everthing to everybody. (One size fits all).
What I am thinking of doing is creating a form designer which will allow the user to add fields to it but it will automatically position them. The user would use a simple dialog with 2 listboxes (side-by-side) and about 6-7 buttons to design the form. The left list box would contain the available fields and the right list box would contain the fields included on the form. Buttons would be present to reorder the fields on the form, add new fields and add/remove fields from the form.
This form engine would not support activeX controls, scripting or anything fancy. Just a standard set of controls (edit, label, date picker, combo box, etc.)
My question is this: Do you think the averate user can figure out how to do this? AND will the more advanced users be frustrated by this?
What's your advice?
|
|
|
|
|
Matt Gullett wrote:
My question is this: Do you think the averate user can figure out how to do this?
The ones that need it will. The ones that don't might complain about not being able to figure it out, but if you include a comprehensive set of pre-defined configurations, they should be alright. Just make sure the form editor isn't *annoying*, i.e., if you have buttons that jog field position, make them autorepeat if they're held down, allow drag&drop if it makes sense to do so, etc.
- Shog9 - Aaah... It's time to relax. You know what that means: a glass of beer, your favorite ergo chair... And of course, The Code Project loaded on your Personal Computer System. So go on, and indulge yourself, put your feet up. Lean back and just enjoy the articles. After all, CP sooths even the savage
|
|
|
|
|
You could have an advanced mode, which is turned off by default, that would let an advanced user modify more stuff (such as the positioning)
If you just want to experiment with UI stuff, then probably the best thing to do would be to knock together a simple prototype, and get assorted people to play with it, and give feedback
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi,
I just wonder if I can use PThread (or any PThread class) in VC++. How about java and visual basic?
Thanks
|
|
|
|
|
Sorry, this is not an answer but a question : what´s a PThread ? ("You still have to learn a lot, young Padawan")
~RaGE();
|
|
|
|
|
You can find a Win32 pthreads library at http://sources.redhat.com/pthreads-win32/
|
|
|
|
|
The problem is that the dialog has not been created yet so you can't set its text, and SetWindowText isn't a member function of the CColorDialog class. It should be something like this:
CColorDialog clrDlg;
clrDlg.m_SomeMemberVariable.NameVariable = "Select Object Color";
clrDlg.DoModal();
-Raffi
|
|
|
|
|
Well, this is a rather common misundertanding about MFC dialogs and the underlying windows. When you construct a CColorDialog (or some other type of dialog, for that matter), it is only the MFC wrapper that gets created. It is in the middle of DoModal that the underlying HWND is actually created and attached to the MFC object. Unfortunately, after calling DoModal is all too late for setting the caption (the dialog has already exited.) The way out of this dilemma is as follows:- Create a class derived from
CColorDialog , say CMyColorDialog .
- Provide a constructor accepting the caption that stores it in some member variable defined to that purpose, say
m_caption .
- Add an
OnInitDialog handler and set there the new caption with SetWindowText(m_caption) .
Good luck!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to save some information in SYSTEM REGISTRY and then retrieve.
any one?
|
|
|
|
|
Why don't you use one of the classes available here at CP ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
More about me
|
|
|
|
|
You can use a registry class as Colin Davies suggested but if you want to directly use API, look up the following functions on MSDN
RegOpenKeyEx
RegCloseKey
RegEnumKeyEx
RegCreateKeyEx
RegDeleteKey
RegQueryValueEx
and
RegSetValueEx
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
How about the Old style WriteProfileString, WriteProfileInt and to retrieve use the GetProfileInt and GetProfileString. It works for me and it will work for you too. Make sure that in the App's InitInstance change the SetRegistryKey function if you don't want the stuffs to get saved in the "Local AppWizard.. Bla bla".
Sudip
Its QTime
|
|
|
|
|
Hi: I am trying to create a window using Microsoft, Visual C++ with MFC. I created the window with an “edit” box that is supposed to receive input from the keyboard. I also created a variable under the “edit” box IDC_BUTTON1 so that when I input data to the “edit” box, it can be transferred into the variable associated with the IDC_BUTTON1 and used in a C++ program. However, when I execute the program, nothing gets into the variable created. I am not sure of how I input data and transfer it to my C++ program. Any help will be appreciated.;P
|
|
|
|
|
in the handler for the button, call UpdateData(TRUE); this will load the data from the dialog into your variables, via the DDX calls that the class wizard has generated for you.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Thanks for your help Joaquín M López Muñoz. I have got the grid into the print dc. just have to resize
Desmond Mardle
|
|
|
|