|
Like topic says, I'm looking for some tips to do this, like you can see in IE for it's toolbar buttons...
Thanks!
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
You can have text beside the icons if you use the TBSTYLE_FLAT|TBSTYLE_LIST style flags
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
That was easy... I was using Create instead of CreateEx so that's why I wasn't able to do it!
Thanks!
---------------
Tired of Spam? InboxShield 2.0 is now available for Microsoft® Outlook® 2K/2K2/2K3
http://www.inboxshield.com
|
|
|
|
|
hello
i want to link my application with one kind of file (*.dsw or *.cpp).
i want when i click on the files that i have tell above my application run.
|
|
|
|
|
|
Why doesn't this do what I want:
cout << L"Hello world";
This prints out the address of the string, because it interprets it as a void*. Is there not an overload for WCHAR*?
|
|
|
|
|
Try
wcout << L"Hello world";
|
|
|
|
|
Aaaaahhhhhh... there's a wcout! It's funny, because the AppWizard (at least in VC6) generates this for a default console app:
cerr << _T("Fatal Error: MFC initialization failed") << endl;
which if compiled with UNICODE, would print out the address of the string.
I guess I'll have to do something like
<br />
#ifdef UNICODE<br />
#define _tcout wcout<br />
#else<br />
#define _tcout cout<br />
#endif<br />
in order to have some kind of "tchar-ish" macro, 'cause I can't find one already defined.
|
|
|
|
|
The tcout thing is exactly what I did, and it works like a charm.
"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
|
|
|
|
|
I need help ASAP.
I have one document with two views (splitter) , left view(CView),right view(CScrollView).
This is my code:
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
CRect cr;
BOOL rc;
if (!m_wndSplitter.CreateStatic(this,1,2))
{
TRACE0("Failed to create split bar ");
return FALSE; // failed to create
}
GetClientRect(&cr);
CSize paneSize(cr.Width()-200, cr.Height());
CSize paneSize1(0, cr.Height());
((CMyApp*)AfxGetApp())->m_pDoc=(CMyDoc*)(pContext->m_pCurrentDoc);
pContext->m_pCurrentFrame=this;
rc=m_wndSplitter.CreateView(0, 1,pContext->m_pNewViewClass,paneSize, pContext);
if(!rc)return FALSE;
pContext->m_pNewViewClass=RUNTIME_CLASS(CSnapShotView);
pContext->m_pCurrentDoc=((CMyApp*)AfxGetApp())->m_pDoc;
pContext->m_pCurrentFrame=this;
rc=m_wndSplitter.CreateView(0,0,pContext->m_pNewViewClass,paneSize1,pContext);
m_wndSplitter.SetSplitterGapSize(1);
m_wndSplitter.RecalcLayout();
m_wndSplitter.SetActivePane(0,1);
return rc;
}
I don't know why ,but after i added splitter my right view(CScroll view) doesn't support MouseWheel .
Plese help me !!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
Nobody knows ,or it's to simple??
|
|
|
|
|
Hiya I have now to extract all of the records from a buffer. The code I have works for the first record and then crashes..I have to extract from the buffer the 12 up to and including the carriage return.
So I would extract "12,grahamoj,34,this,\r" as the first record and so on.
This is my code:
char buffer[] = "this,is,not,needed,12,grahamoj,34,this,\ris,not,need"
"edeither,12,tony,34,this,\ris,not,needed,either,this"
"is,not,needed,12,paul,34,this,\ris,not,needed,either";
char *pStart;
char* pEnd;
char* pTemp;
pTemp = new char[100];
// search for carriage return
pEnd = buffer;
do
{
pStart = strstr(pEnd,"12,");
if( pStart )
{
pEnd = strstr( pStart,"34,");
if( pEnd )
{
pTemp = strtok( pEnd,"\r" );
}
}
strcpy( buffer,pStart );
AfxMessageBox( buffer );
}while( pTemp != NULL );
As I say it extracts the first record perfect and then crashes..
Can anyone fix this or is there a better way to extract multiple records??
Thanks.
|
|
|
|
|
This is not a problem. You have the solution, just debug it until you get it right instead of asking for help.
Kuphryn
|
|
|
|
|
Another solution to your problem is to replace all the carriage returns with nulls, then process the buffer as an array of zstrings.
*(cpBuffer + strlen(cpBuffer) + 1) = 0;
char *p = strchr(cpTheBuffer,'\r');
while (p && *p)
{
*p = 0;
p = strchr(p+1,'\r');
}
p = cpTheBuffer;
while (*p)
{
ProcessRecord(p);
p += strlen(p)+1;
}
onwards and upwards...
|
|
|
|
|
Thanks basementman, good suggestion but have to actually extract the strings and display them individually.
Any other ideas??
thanks.
|
|
|
|
|
In the ProcessRecord function described previously, you can do the same sort of logic with the comma field delimiters just as you have done with the record delimiters. As a matter of fact, you could use the same function (genericized, of course) to parse records and fields simply by parameterizing the delimiter character. You could also make it more robust by respecting the delimiters that appear in quoted strings, etc.
onwards and upwards...
|
|
|
|
|
what does 0x0a mean in this context?
if (symbol == 0x0a)
count++;
Mark J Jackson
|
|
|
|
|
|
0x0a is a hexadecimal number, the equivalent of 10 decimal.
--Mike--
"So where does that leave us? Well, it leaves us right back where we started, only more confused than before." -- Matt Gullett
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
|
|
|
|
|
hi every one
I am new to MFC c++. Which books i should go for?
How to learn Win32 API's?????????
pl. help
|
|
|
|
|
|
|
Your welcome
Regards,
Brian Dela
|
|
|
|
|
After you get a little familiar with MFC, definitely check out MFC Internals.
|
|
|
|
|
Hi Gang,
I was just wondering if anybody has a vertically aligned Cedit control out there.
Thanks,
Nick
|
|
|
|
|