|
Pallini is absolutely right!
|
|
|
|
|
See here."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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi,
how do i change the user name of windows? (with a VC code)
thanksZo.Naderi-Iran
|
|
|
|
|
|
I've been trying to figure out how to get the buttons on a CToolBar to accept the newline character like a normal button does when you set the multiple line property to true.
Apparently the buttons on a toolbar are not normal buttons so i cant get a handle and there is no multiline style like there is on a normal button.
I've got (this is in a class that inherits CToolBar)
CToolBarCtrl& bar = GetToolBarCtrl();
int nIndex = 0;
CRect NoTextRc( 0, 0, 0, 0 );
bar.GetItemRect( 0, NoTextRc );
bar.SetMaxTextRows(3);
bar.SetDrawTextFlags( 0xffffffff, DT_WORDBREAK);
Line 1 gets the toolbarctrl for the toolbar in question
Line 5&6 should make me able to have 3 rows of text and break on a space or a carriage return
What it is doing is just not displaying any text after the space or the /n.
I've made the size of the button really large just incase the button wasn't big enough with
SetSizes(CSize( 120, 100 ), CSize( 90, 36 ));
Here is where i set the text of the toolbar
The commented code are failed attempts at making the button multiline in the same mannar as a button
if ( !strButtonText.IsEmpty() )
{
strButtonText.Replace(" ","\r");
SetButtonText( nIndex, strButtonText );
}
All the above is in a class that inherits CToolBar.
Can anyone please help me out here i've spent way more time than i should on this and i have no solution in sight.
|
|
|
|
|
why arent you using "\n" Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
You mean in the CString::Replace()?
I was fiddling with it and forgot to change it back.
I've tried /n, /r/n, /n/r, /0
I was grasping at straws there, lol. You are right it's meant to be /n (at least i think it so too).
That may have creating a whole new set of problems for me thank you.
|
|
|
|
|
|
I used the wrong slash in the reply i apologize but i'm assuming you mean in the CString so what i meant in the replay is that i mistakenly used \r instead of \n in the CString.
so in
strButtonText.Replace(" ","\n");
SetButtonText( nIndex, strButtonText);
Where CString strButtonText is the CString destine for the label of the button
I originally had = "Customer Details"
After Replace i have "Customer\nDetails"
So i'm sending "Customer\nDetails" to the label, however i'm just getting "Customer" and the "Details" part of the string is missing instead of appearing on the next line.
If i Omit:
bar.SetMaxTextRows(3);
DWORD dwSIZE = bar.SetDrawTextFlags( 0xffffffff, DT_WORDBREAK|DT_CENTER|DT_MODIFYSTRING );
I get "CustomerDetails"(no space) in the label after replacing the space with a \n in the string. So the \n from the CString is ignored like it would be in a normal button with its multiline text property were set to false.
Basically it seems as though the text is going to the next line but not visable even thought the buttons size is greater than that of the text.
Sorry if i'm missing your point but i've never used \n anywhere but in a string and strButton is the only string there which as mentioned at the time of going to the label contains a \n should it have originally contained a space. The DT_WORDBREAK also treats a space as a \n when the text is 2 long to fit on one line.(at least that is what i'm led to believe.)
Thank you again for the response i get one step closer to the solution with every one
|
|
|
|
|
use a tooltip for detailed information, a toolbar should be short.
or you make a toolbar of your by ordering some buttons as a "user toolbar". Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Now the data I can get is longitude and latitude, and GMT timezone,
According the data above, I compute the sunrise and sunset time.(So Now I get five data),
Is there any person who could help me compute the five Islamic prayer time everyday
or Give me some advice?
I got two website below to compute five Islamic prayer time everyday!
http://www.qibla.org/cgi-bin/qibla.cgi
http://www.islamicfinder.org/modified on Wednesday, March 3, 2010 10:20 PM
|
|
|
|
|
Read point #2 in this post[^]
fantasy1215 wrote: I got two website below to compute five Islamic prayer time everyday(try it)!
No, I don't feel like going to some website and trying something.
You could try it yourself, and ask a specific question here (as long as it's related to C/C++/MFC).
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
fantasy1215 wrote: http://www.qibla.org/cgi-bin/qibla.cgi
Did you look at the hijr.js file that this sites uses? It looks to be used by qibla.cgi to compute dates and such."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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
How is it possible to get the hijr.js?
I really don't know where to turn for help.
So If I do something irritating you, forgive me!
|
|
|
|
|
i give some idea ..it might be useful
You have Prayer times ?
1. Get the System time ( its your country time and your system time shows your country's GMT time )
http://wwp.greenwichmeantime.com/[^]
2. Get the GMT time
3. Find the Prayer times of your country ( you have 5 set of times ) then u can calculate easily.
4. Find the time Difference between your country and another (it better to maintain database ) Failure is Success If we learn from it!!
|
|
|
|
|
How can i implement drag and drop between two tree control with drag image.
Please help me...modified on Wednesday, March 3, 2010 5:00 AM
|
|
|
|
|
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.
|
|
|
|