|
im agn having the same error..ie mysql.h not found
|
|
|
|
|
Are you sure you have this file on your system?
|
|
|
|
|
|
See this[^] thread can solve your problem or no?
|
|
|
|
|
wht code i hav written is moslty similar to this one...
but in this code also im having the same error
|
|
|
|
|
eclairs_db wrote: when im running my c api code for database connectivity..
im getting this error--
"Cannot open include file: 'mysql.h': No such file or directory"
This is a preprocessor error, not a runtime error.
eclairs_db wrote: i have tried to find the mysql.h header file in visual studio
So did you find it?
eclairs_db wrote: now how should i run this code...
You don't, until it has been successfully compiled/linked. In the IDE, you need to verify that the directories for your include files are correct.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i hav included .dll file in my vc++ ...now wht to do..
i hav done all which hav been told me here
i hav done all according to me..
can u help me.
basically i hav to create database in mysql at run time with the help of programming
|
|
|
|
|
eclairs_db wrote: i hav included .dll file in my vc++
Which has absolutely nothing to do with the problem.
eclairs_db wrote: i hav done all which hav been told me here
Explain, in detail, what you did. If the problem persists, then you've obviously done something wrong.
eclairs_db wrote: basically i hav to create database in mysql at run time with the help of programming
At this point, your code is of little importance. You need to configure the IDE so that it knows where to find the include files. Until you do this, nothing else matters. If you are using VS2005, see slide #7 of this. If you are using VS6, select Options from the Tools menu, and then click the Directories tab.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
now how to do tht..
IDE configuration is big thing i think
how to do tht?
|
|
|
|
|
I can't make it any clearer than I already have.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thank you sir
u hav helped me alot
nw i hav to do it by myself
any ways
thx agn
|
|
|
|
|
Hello,
i have a PropertySheet with PropertyPages. If there is no button in a page the "OK"-button of the sheet is the default button. Otherwise the first button in the page will automatically become the default button (none of the buttons in the page has the def-btn-style). My client want me to set always the "OK"-button of the sheet as default button. So i tried SetDefID(IDOK) in the OnInitDialog-handler of the page. But it had no effect.
Is there an easy way to prevent the default behavior of the sheet or must i overwrite the WndProc() of the sheet or page and catch the message where the first button in the page is set do default?
Best regards,
Tabor25
|
|
|
|
|
Well, SetDefID(IDOK) wasn't going to work, as the OK button isn't actually *on* the page - its off it.
Maybe GetParent ()->SetDefID(IDOK) ? Or try setting focus to the OK button?
Iain.
|
|
|
|
|
I included windows media player control successfully, but now I am getting problem with that. I am not able to play movie inside that. It does not resond to any of its functions like SetFileName, SetEnabled,Play. Its buttons doesnot activate. All of its buttons remain inactive.
|| Lust Causes Sorrow ||
|
|
|
|
|
hi...
I have a number of items in a Treectrl. I want to drop a file on a particular item in treectrl....
i was placed the TreeCtrl in a DIALOG,derived from Cdialog class.
Mainly,I have to use ONDrag enter(),Ondargover() events in Dialog class...
is it posible to do this....if yes
How to do this.....?
is any body knows reply me....
|
|
|
|
|
Do you want to drag your items of a leaf to other leaf on the current tree?
|
|
|
|
|
i want to drag a file from windows explorer to current tree and have to drop it on a selected items in current tree
|
|
|
|
|
You could use COleDropTarget, something like:
...
class CMyTreeCtrlDropTarget : public COleDropTarget
{
protected:
virtual DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point);
virtual BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point);
public:
};
DROPEFFECT CMyTreeCtrlDropTarget::OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point)
{
if (pDataObject->IsDataAvailable(CF_HDROP, NULL))
{
<code>
return DROPEFFECT_COPY;
}
return DROPEFFECT_NONE;
}
BOOL CMyTreeCtrlDropTarget::OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point)
{
if (pDataObject->IsDataAvailable(CF_HDROP, NULL))
{
STGMEDIUM StgMedium;
pDataObject->GetData(CF_HDROP, &StgMedium, NULL);
DROPFILES *pDropFiles = (DROPFILES *)::GlobalLock(StgMedium.hGlobal);
TCHAR *pFileNames = (TCHAR *)((BYTE *)pDropFiles + pDropFiles->pFiles);
<code>
::GlobalUnlock(StgMedium.hGlobal);
}
return FALSE;
}
...
CMyTreeCtrlDropTarget MyTreeCtrlDropTarget;
...
MyTreeCtrlDropTarget.Register(pTreeCtrl);
Note this is a simple example. I haven't implemented the hittesting in
CMyTreeCtrlDropTarget::OnDragOver(). You may also want to return DROPEFFECT_NONE if the drop
target point isn't apropriate.
Hope this helps,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
hai Mark...,
Thanks for your sequence reply,and spending time for me.
i have added the class CDragdropmgr with derived class as ColeDroptarget. and i ceated an object for this class .
I written OnDropFiles() Event and necssaery code also in Treectrl Class....
SO. now if i drop files, what ever the code i written its working fine...
upto this clear. ok
now only the problem is starting.....
my objective is(Expected result): tried to drop a file on particular item in treectrl.
(Actual result but if i enter the treectrl none of the item get selected ...... and while doin dragover on items also no changes in selection in treectrl.
using the object which created for the class COLedroptarget.... how to achieve the above jobs.........
Warm Regards,
Manivannan.D
|
|
|
|
|
Get rid of the WM_DROPFILES/OnDropFiles() stuff. That only lets you get the dropped filenames
in the entire window.
In my code example (in red) check out the commented line:
"// Use the passed point to hittest on the treeview control to select the appropriate item "
There you have the cursor position (a POINT struct) and a pointer to the window.
That should be all you need to hit-test on the tree and select/unselect items as the drag
cursor moves over the control. The COleDropTarget::OnDrop() override has the same info and is
called when the files are dropped.
Make sense?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hi all!
I've meet a problem about DrawText. I wrote some code like following:
CString str[7];<br />
CDC *pDC=this->GetDC();<br />
<br />
pDC->SetTextColor(RGB(255,0,0));<br />
pDC->SetBkMode(TRANSPARENT);<br />
CDC memdc;<br />
CRect rc;<br />
GetClientRect(&rc);<br />
memdc.CreateCompatibleDC(pDC);<br />
CBitmap bmp,*oldbmp;<br />
bmp.CreateCompatibleBitmap(pDC,rc.Width(),rc.Height());<br />
oldbmp=memdc.SelectObject(&bmp);<br />
CPen mpen,*moldPen;<br />
mpen.CreatePen(PS_SOLID,2,RGB(120,120,120));<br />
moldPen=memdc.SelectObject(&mpen);<br />
CFont mfnt,*moldfnt;<br />
mfnt.CreateFontW(20,20,0,0,0,FALSE,FALSE,FALSE,GB2312_CHARSET,OUT_TT_ONLY_PRECIS,<br />
CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FF_DONTCARE|DEFAULT_PITCH,_T("SYSTEM"));<br />
moldfnt=memdc.SelectObject(&mfnt);<br />
m_nGroupLeft=200;<br />
m_nContTop=200;<br />
rc.left=m_nGroupLeft+30;<br />
rc.top=m_nContTop+20;
rc.right=m_nGroupLeft+200;<br />
rc.bottom=m_nContTop+50;<br />
ClientToScreen(&rc);<br />
memdc.SetTextColor(RGB(255,0,0));<br />
memdc.SetBkMode(TRANSPARENT);<br />
RECT rc_txt;<br />
rc_txt.left=rc.left;
rc_txt.top=rc.top;<br />
rc_txt.right=rc.right;
rc_txt.bottom=rc.bottom;
memdc.DrawText(_T("Test\0"),-1,&rc,DT_LEFT|DT_SINGLELINE);<br />
pDC->BitBlt(rc.top,rc.left,rc.Width(),rc.Height(),&memdc,rc.top,rc.left,SRCCOPY);
memdc.SelectObject(moldfnt);<br />
mfnt.DeleteObject();<br />
memdc.SelectObject(moldPen);<br />
mpen.DeleteObject();<br />
memdc.SelectObject(oldbmp);<br />
bmp.DeleteObject();<br />
memdc.DeleteDC();<br />
The thing I can't make clear is that the output of this code is only a half of 'Test'. When I assign the rc.top as m_nContTop + 10, the string is disappeared. I think the coordinates in the DrawText are the Text's position. But why the string will disappeared when I decrease the value of rc.top? And when the value increase, the string can appear? Thx!
Regard!
whiteclouds
|
|
|
|
|
I think the coordinates in the DrawText are the Text's position.
I could hardly get what you mean by saying 'Text's position'.. Anyway, DrawText works on the same coordinate system as other CDC functions do. Particularly, it works with logical coordinates set by the current mapping mode.
But why the string will disappeared when I decrease the value of rc.top?
Simply because by decreasing the rc.top, you are offseting the entire rectangle. You might think that 'decrease' would inflate the rectangle.. but not. Use CRect::InflateRect instead, or besides decreasing rc.top also increase rc.bottom.
--
=====
Arman
|
|
|
|
|
I am writing a dialog-based program having a richedit control.
But when i type a url to it,it auto display it with blue color,but I want to change it to show red color.
How should I do this?
Thanks.
GOOD LUCK
|
|
|
|
|
try the SetSelectionCharFormat() function.
|
|
|
|
|
but it could not work well.
would you like to give a demo?
Thanks.
GOOD LUCK
|
|
|
|
|