|
don't mix C and C++
there are whatever you want in the C++ libraries.
also, read the previous answers...
|
|
|
|
|
Karthikeyan .g wrote: sprintf(szChar,"%s",sString);
You don't expect this to work, do you?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You do NOT want to pass in a CString's buffer to strtok. strtok changes the buffer it operates on. Thus, if you pass in the buffer returned from GetBuffer, it will change it and the original CString object will be invalidated (that is, the data will be changed) when you call ReleaseBuffer. Looking through what you want to do, just use something like:
void Split(CString strText, CString strSeparators, CStringArray& strArray)
{
int start = 0;
while (start >=0 && start < strText.GetLength())
{
int stop = strText.Find(strSeparators, start);
if (stop < 0 || stop > strText.GetLength())
stop = strText.GetLength();
strArray.Add(strText.Mid(start, stop - start));
start = stop + 1;
}
}
The strArray parameter will hold the values you are looking for.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
hi,
I have got blob file, and i want to insert that into image/blob column of database, how can i do that programmatically in C++/MFC.
Warm Regards,
Mushq
|
|
|
|
|
Is this With Access, Microsoft SQL, or MySQL?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It is SQL Server and Oracle.
Warm Regards
Mushq
|
|
|
|
|
|
See here for starters.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to remove the Titlebar of a SDI FrameWnd class.
could you please tell me which style should I specify?
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Remove the style WS_CAPTION
|
|
|
|
|
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CMDIFrameWnd::PreCreateWindow(cs) )
return FALSE;
cs.style = WS_VISIBLE | WS_THICKFRAME;
return TRUE;
}
I specified the above code in the precreate Window function. But it is not working for me.
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Use ModifyStyle(WS_CAPTION,0); in OnCreate instead.
|
|
|
|
|
Thanks for your reply.
we need add one more tweak to avoid painting problems.
The following code worked fine for me.
ModifyStyle(WS_CAPTION,0);
SetWindowPos(NULL, 0, 0, 0, 0,
SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|
SWP_DRAWFRAME);
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Sarath. wrote: SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE| SWP_DRAWFRAME);
you can mention this as third parameter of ModifyStyle . You need not call SetWindowPos
|
|
|
|
|
I forgot it Thanks
Anyway those flags need to be called
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Sarath. wrote: But it is not working for me.
Which means what exactly? Does the frame window still have a titlebar?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi
Application in release version is working fine but crashing in debug version.
I think its because of ASSERT statement.
Does any one has a clue?
TIA
|
|
|
|
|
Use your debugger to locate more precisely the problem.
EDIT:
Yes, ASSERT wroks only in debug mode but if something asserts, it means that something is going wrong.
|
|
|
|
|
Where it is crashing ?
Please show the code where it is crashing
RinuRaj
|
|
|
|
|
Its a switch statement with diff cases:
pseudo code:
switch(text)
{
case1:
Do something...;
case 2:
Do something..;
default:
ASSERT(FALSE);
}
Its going to default case and then assert statement is excuting and it crashes here.
Its giving error
"A breakpoint has been reached.
(0x80000003) ocurred in application at location 0x7c901230"
|
|
|
|
|
Jacqi123 wrote: Its giving error
"A breakpoint has been reached.
(0x80000003) ocurred in application at location 0x7c901230"
Possibliy, you are pressing Abort Retry button on Assert dialog.
Assert doesn;t necessarily lead code to crash. Its just indication, thats some thing going wrong.
What happens,if you use Ignore button on assert dialog? As its not crashing in Release, should not crash in debug.
And then, check code flow, why code is going to default case, where it should not go, as per your coding.
-- modified at 8:08 Thursday 7th September, 2006
-- modified at 8:39 Thursday 7th September, 2006
|
|
|
|
|
Jacqi123 wrote: Application...crashing in debug version.
I think its because of ASSERT statement.
ASSERT() statements do not causes crashes. They actually indicate to where the problem is.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
From the MSDN:
Note This function is available only in the Debug version of MFC.
|
|
|
|
|
Hello all,
I want to restrict user not to reduce the size of dialog within limits.
My dialog box is created in resource editor and class is derived from CDialog.
I made the Border property "resizable" and it allows the user to resize the dialog.
I want to restrict the user not to reduce the size than certain limit. I write the code in OnSize handler as below
void CMyDlg::OnSize(UINT nType, int cx, int cy)<br />
{<br />
if (cx < 650)<br />
cx = 650;<br />
<br />
if (cy < 270)<br />
cy = 270;<br />
<br />
CDialog::OnSize(nType, cx, cy);<br />
<br />
}
But the dialog still can be reduced less than width 650 and height 270.
I tried to put "return" if the cx is < 650 and cy < 270. but user can still reduce the size.
Can any one suggest how to restict the user?
Thanks for your time
Ravi
|
|
|
|
|
Try OnSizing[^]
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|