|
happy new year, all!
don't play ur C++ today, take a rest!
includeh10
|
|
|
|
|
Happy new year!
I'm still playing today.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
Hi folks,
I'm gonna build a GUI which works with XML for a class Project. How can I go about it? Any Pointers are welcome.
|
|
|
|
|
Do you mean use XML to drive gui creation? Or gui manipulation on the fly with XML? Or do you mean manipulate XML from a gui?
Either way one you'll probably want to use some kind of XML parser. You mentioned Visual C++ so I'm assuming you're talking about VC++ 6.0. If that's the case then there are plenty of XML parsers you could use. Do a google search for MSXML4.0 or Xerces. There's some others but I can't remember them right now. You may also want to check W3C for XML parsers and tutorials. I personally use MSXML4.0 though some people snicker at the idea. It suits my needs fine.
If it's the GUI part you need help with there are plenty of articles here on CodeProject that can give you a good start.;)
nay
|
|
|
|
|
Anonymous wrote:
I'm gonna build a GUI which works with XML for a class Project. How can I go about it? Any Pointers are welcome
If you are allowed to, use the Xml classes from the .NET framework. Not only it's an incredible product quality/price ratio, it also makes you take your distance from the bullish msxml parser (former MS Xml sdk).
In addition, you can fill the .NET tabular datagrid control with Xml content, from/to flat files or databases. This can shorten the dev time.
|
|
|
|
|
See http://www.ltpb.8m.com/tutorial[^] I have written many articles on using XML and with VC++.
-Steven
CP Addict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
Reading/Writing XML data?
I use XML DOM for that. See MSDN Library for more info.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi,
happy new year to all...
i want to create a tabbed dialog. I can't find anything. also I am unable to use property sheets as i don't know anything about it. but i guess tabbed dialogs would be better because i have to add functionality to both of the tabs and also i want to appear in my color way. Any suggestions..please..thanx in advance..
Himanshu
|
|
|
|
|
|
hi,
I have problems trying to use CRecordset class.. or maybe I don't need to use it. I want to select some rows from a table. I managed to do some inserts like this:
CDatabase *bd;
CRecordset *rs;
bd = new CDatabase();
bd->Open(_T("MySQL-DSN"),FALSE, FALSE, _T("ODBC;UID=admin;PWD=sa;Database=mydatabase"));
bd->ExecuteSQL("INSERT INTO logs (Action,Data) VALUES (\"Starting...\",NOW())");
For the select I try to use CRecordset like this:
rs = new CRecordset(bd);
rs->m_nFields = 1;
sprintf(sqlbuff,"SELECT UserID FROM users WHERE Login=\"%s\" AND Pass=\"%s\"",user,params);
rs->Open(CRecordset::snapshot,sqlbuff);
cout << rs->GetRecordCount();
but the program crashes. What am I doing wrong?
Thanks.
-----
We are what we repeatedly do. Excellence, then, is not an act, but a habit.
|
|
|
|
|
I am trying to make a context menu appear when the user right clicks on a static control. I can get left click messages, no problem, but for some reason right clicks are verboten.
Please don't tell me that I have to go through all that sub-classing crap for one message.
Thanks,
Aaron
|
|
|
|
|
I assume you have tried creating it with a SS_NOTIFY style?
Otherwise you could tyry using a "read only" CEdit control.with no frame.
|
|
|
|
|
Hi:
I opened an MFC Sample and I would like to see code of Member Functions and Messages of Object IDs but when I double click for example a Command Button it shows a Dialog Box that asks if I want to Create a New Class or to Select an exisisting class and then... I don't know what to do from here ( because the MFC Wizard doesn't have Messages neither Member Functions.
Please, I really need help from anyone.
Greetings and Happy New Year.
This is the strangest life I've ever known.
|
|
|
|
|
I'm confused. Can't you just scroll down to the function your looking for?
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
Hi,
I finally got around to re-installing my compilier after a good ol' virus attack. Sadly, everytime I run VC++ I get an error that says it can't find "winresrc.h".
Could someone send me this file?
Thanks,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
Here's the file:
/*++ BUILD Version: ???? Increment this if a change has global effects
Copyright 1990 - 1998 Microsoft Corporation
Module Name:
winresrc.h
Abstract:
This module defines the 32-Bit Windows resource codes.
Revision History:
--*/
#ifndef _WINRESRC_
#define _WINRESRC_
#include <winuser.rh>
#include <commctrl.rh>
#include <dde.rh>
#include <winnt.rh>
#include <dlgs.h>
#include <winver.h>
#endif /* _WINRESRC_ */
|
|
|
|
|
hi I have a MDI app. I want to define a struct like typedef struct{vars...}s1; and have private s1 struct variables in my view classes. Where is the best place to put typedef block in the code? If I put in stdafx.h then I need to include stdafx.h in all my view headers but I don't want it.. And If I write typedef struct.. block in my view classes' header then I get "Illegal pure syntax must be '=0'" what is the problem?
my struct type:
typedef struct{
int n = 1; char * label = "VAB";
}s1;
My view class:
class CView3 : public CView
{
...
private:
s1 s;
...
};
|
|
|
|
|
class CView3 : public CView
{
private:
class s1
{
public:
int n;
CString label;
s1() : n(1), label("Yadda") { }
};
s1 s;
};
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
The problem is you're putting variable initialization where it doesn't belong.
typedef struct
{
int n = 1; char * label = "VAB";
} s1; Doesn't make sense, the typedef struct means you're declaring a struct type and a new name for it. What I think you meant was:
typedef struct
{
int n; char* label;
} s1 = { 1, "VAB" }; but this makes a global variable s1 . Move the s1 into your view class and initialize its members in the view constructor.
--Mike--
When 900 years old you reach, look as good you will not. Hmm.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
both comments were very helpful thanks
|
|
|
|
|
Is there any easy to use function to rotate a CBitmap 45 degrees? I've seen some in msdn but only work in win2k+, i need for win98 too
I know i can make my own but that is last resort :P
|
|
|
|
|
http://www.codeproject.com/bitmap/rotatebyshear.asp
I'm not the droid you're looking for.
|
|
|
|
|
Hello,
I am a new MFC programmer and I have a problem with the CString class. I am writing an app which includes the new MFC 7.0 class CHTMLEditView, and I am using its GetDocumentHTML() method to transfer the HTML that the user has been editing into a CString.
I have noticed that when the HTML page is only a few lines long, everything proceeds smoothly, but when the user writes an extended page of HTML, and then tries to save it, I get an access error as the CHTMLEditView class attempts to write to the CString.
I know very little about CString, but I was wondering how CString manages its memory, and whether it was possible that its buffer was not big enough to manage a sudden allocation of a big page.
I have investigated MFC 7.0 help, and have become very confused with the shared string classes between MFC and ATL. If anyone can help with the above problem, I would be most grateful!
Thanks,
Paul Trimming
|
|
|
|
|
I have a simple Dialog Application. I am including an Active X Control e.g a simple grid. Apart from this I have a COM Server Object that is a class member of my class .
I dynamically create this object as
myCom = new ComServer();
Everything works fine when this is single threaded . Now I want to write some code that is part of a thread's execution routine(a multi threaded function) for which I do the following :
#define _WIN32_WINNT 0x0400
in my stdafx.h file
as this is used in the InitAtl function as
#if _WIN32_WINNT >= 0x0400<br />
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);<br />
#else<br />
HRESULT hRes = CoInitialize(NULL);<br />
#endif
The result of doing this is that my code compiles and links perfect but does not run . i.e I found the following messages in debug :
Warning: OleInitialize returned scode = RPC_E_CHANGED_MODE ($80010106).
Warning: CreateDlgControls failed during dialog init.
The thread 0x46C has exited with code 0 (0x0).
I am not having a clue about what is going wrong. Any help or suggestions will be really helpful.
Thanks
|
|
|
|
|
i want to get the hwnd of each mainwindow that are appearing on the desktop .
and i also want to bring each window at the level of the secreen one by one ?
can any body help me in this regard?
r00d0034@yahoo.com
|
|
|
|