|
Did you try searching CP?
See here[^]
I hope it helps.Regards,
Sandip.
modified on Wednesday, March 3, 2010 3:28 AM
|
|
|
|
|
|
May any one pls help me.. its urgent
|
|
|
|
|
hey folks,
I'd like to be able to set several basic colours for my wx-app (without calling setcolour/setbackgroundcolour/... for each widget), like general black style. I guess this is possible somehow but googling for wxwidgets and themes/styles didn't give me any result. any hints or keywords.
Hopefully you don't get angry asking a question about wxwidgets here.
-zqueezy-
|
|
|
|
|
I have simple CLine class which has two member variables
which store first and last point of line.I store set of drawn lines in CObArray .Now I want to save the set of lines which I have drawn on CView on save button. And Get All lines back
on open button click. Means serialize and deserialize in and out of
CObArray Collection class.
I have tried as shown in code. but I get no values where I have mentioned in code.Thus enable to retrieve the saved drawing.
Can any one help me on this issue?
// Serialization3View.cpp : implementation of the CSerialization3View class
//
#include "stdafx.h"
#include "Serialization3.h"
#include "Serialization3Doc.h"
#include "Serialization3View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View
IMPLEMENT_DYNCREATE(CSerialization3View, CView)
BEGIN_MESSAGE_MAP(CSerialization3View, CView)
//{{AFX_MSG_MAP(CSerialization3View)
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_WM_MOUSEMOVE()
ON_COMMAND(ID_FILE_SAVE, OnFileSave)
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View construction/destruction
CSerialization3View::CSerialization3View()
{
// TODO: add construction code here
}
CSerialization3View::~CSerialization3View()
{
}
BOOL CSerialization3View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View drawing
void CSerialization3View::OnDraw(CDC* pDC)
{
CSerialization3Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
int liCount = pDoc->GetLineCount();
if(liCount > 1)
{
int lipos;
CLine* l;
for(lipos = 0;lipos < liCount;lipos++)
{
l = pDoc->GetLine(lipos);
l->Draw(pDC);
}
}
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View printing
BOOL CSerialization3View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSerialization3View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSerialization3View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View diagnostics
#ifdef _DEBUG
void CSerialization3View::AssertValid() const
{
CView::AssertValid();
}
void CSerialization3View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CSerialization3Doc* CSerialization3View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSerialization3Doc)));
return (CSerialization3Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSerialization3View message handlers
void CSerialization3View::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
SetCapture();
m_ptPrevPos = point;
CView::OnLButtonDown(nFlags, point);
}
void CSerialization3View::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if(GetCapture() == this)
ReleaseCapture();
CView::OnLButtonUp(nFlags, point);
}
void CSerialization3View::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
if((nFlags & MK_LBUTTON) == MK_LBUTTON)
{
if(GetCapture() == this)
{
CClientDC dc(this);
CLine *pLine =
GetDocument()->AddLine(m_ptPrevPos,point);
pLine->Draw(&dc);
m_ptPrevPos = point;
}
}
CView::OnMouseMove(nFlags, point);
}
void CSerialization3View::OnFileSave()
{
CSerialization3Doc* pDoc = GetDocument();
pDoc->fp.SeekToBegin();
CArchive ar(&(pDoc->fp),CArchive::store);
pDoc->m_oaLines.Serialize(ar);
}
void CSerialization3View::OnFileOpen()
{
CSerialization3Doc* pDoc = GetDocument();
pDoc->m_oaLines.RemoveAll();
RECT r;
GetWindowRect(&r);
InvalidateRect(&r,true);
pDoc->fp.SeekToBegin();
CArchive ar(&(pDoc->fp),CArchive::load);
pDoc->m2.Serialize(ar);
// here I expect that m2 obarray get all saved Lines
//but It does not happen.//
int liCount = pDoc->m2.GetSize();
if(liCount)
{
int lipos;
CLine* l;
for(lipos = 0;lipos < liCount;lipos++)
{
l = (CLine*)(pDoc->m2.GetAt(lipos));
//***************************************************
//But This does not work as l contains no values
CDC* dc = this->GetDC();
l->Draw(dc);
}
}
}Be Happy
|
|
|
|
|
Just prepare an instance of CArchive
and call CObArray::Seraialize(CArchive&) Check your definition of Irrationality[ ^]
1 - Avicenna
5 - Hubbard
3 - Own definition
|
|
|
|
|
Hi all,
i working on SMS sending application,
i sending sms by using AT commands,
when i send sms using Nokia Mobile Phone its working fine,
but when i try this over SOny Ericssion mobile phone its return error +CMS Error 303.
is there defferent AT commands for diffrent type of Mobile Phones?
please help me what can i do for this.
thanks.
|
|
|
|
|
Le@rner wrote: is there defferent AT commands for diffrent type of Mobile Phones?
Yes, even different phones from the same vendor differ in what AT command set they support.
To my knowledge, the specifications for supported AT commands are company confidential.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
PLease tell me general method or command set which is applicable for all mobiles.
|
|
|
|
|
Le@rner wrote: PLease tell me general method or command set which is applicable for all mobiles.
I guess that would be the Hayes command set[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi all,
I need to have a child window pop up (modal) when I push a button. My program is the default application created by MSVS 2005 when you select MFC. How do I do this?
P.S. If I'm not being descriptive enough, tell me.
|
|
|
|
|
The easiest is to use a dialog as the child and call DoModal() .
A dialog is in fact a window.
If you cannot use a dialog, show the child window and disable the parent using EnableWindow(FALSE) .
After the child is closed, enable the parent again using EnableWindow() .
|
|
|
|
|
|
Hi All,
How to convert .ico file to .png file#sanroop#
|
|
|
|
|
find a graphics library that supports reading ICO to RGBA-32, and that can write PNG-32
|
|
|
|
|
I have one simple acronym: GIMP.
|
|
|
|
|
|
If you need to do it non-problematically, I've found that IcoFX is a great, free tool.
|
|
|
|
|
Does there exist a sample project which will perform actions online? For example, lets say there is a webpage with a login and passcode. How could I programmatically have the software enter that data and hit Enter? I get to another page that has Next. How can I programmatically click that Next button.
Eventually what I want to do is programmatically upload a file.
If there exists any type of sample project that anyone can point me to, that would be great.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Something like that might require a high level of machine intelligence, unless you are creating it to interact with only a small set of pre-defined pages.
Instead of interacting with the web page like that, why not think about interacting with the web server as if you are the browser?
For instance, have your program connect to the web server, and issue its own POST request.
|
|
|
|
|
I want it to interact with a small set of pre-defined pages. And I
know what those pages are.
In fact, all the program has to do is get past a login page, click
Next, Next and then upload a file.
Is there any sample project you know of that would do something like
this? For example, if I could programatically log into yahoo, maybe
that would be the first step. If I could do that, I might be able
to do the same for this project.
|
|
|
|
|
I don't know of anything that already exists that you could coopt for your purposes.
However, people on this website can help you a great deal if you are very specific about what it is that you don't know how to do.
What is your current level of competency with writing Windows programs in C++?
Doing what you require is a multistep process; which step is giving you trouble:
1. Downloading the page
2. Parsing the HTML to find the link(s) you are looking for
3. Performing a virtual click on the link
?
|
|
|
|
|
Hello,
I am working in Visual Studio 2008. I currently have a project that was created years ago that deals with COM components. Now, however, I need to add new functionality to this old project. The new functionality would be easiest if we used ATL. However, the problem is that the old project is not an ATL project.
So, my question is: Is there any (easy) way to convert my old project to an ATL compatible project?
Thanks in advance,
Nick
P.S. If my description is too vague or there are any questions just let me know. Thanks.
Post Moved from .NET Framework
|
|
|
|
|
|
hi,
i have a tree ctrl with Number of items say 10 items under one root Node,
at the end of each child item i need to add an image .
How is this Possible ?
Thanks,Born to win...!
|
|
|
|