|
Thx Led Mike for qour quick answer !
No Tuts or samples ;(( !
I will try it anyway
Best regards
Croc
|
|
|
|
|
CrocodileBuck wrote: No Tuts or samples
What? There are loads of them both here in CodeProject Articles and on MSDN.
For the articles on CodeProject in the left column under "Chapters" click "Desktop Development". In that list you will see both List Controls and Tree Controls.
|
|
|
|
|
FWIW - when the new MFC classes are released in the next month or two,
there's new controls for both the tree and the list in the shell (Windows)
explorer.
You can roll your own, of course
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What are you doing in my thread!
Merry Christmas Mark
|
|
|
|
|
|
How to insert a hotkey (Eg. Ctrl+U)in a menu item (through code) in vc++.
|
|
|
|
|
|
hi
i am doing reading frame by frame using avcodec, posting the data for rendering. i am getting the video properly but i am getting memory leak in bitmapinfo
i am using bitmaps for drawing the image.
please help me to how to over come that.
thanks
|
|
|
|
|
adiveppanavar wrote: memory leak in bitmapinfo
How do you use it (i.e. post the relevant code.)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Is it possible we see your code?how did you try?
|
|
|
|
|
Hi adiveppanavar!
I'm also dealing with avcodec to convert a video file to the other format. COuld u help me out plz?
U'r help would be highly appreciated.
thanx
Come online at:-
jubinc@skype
|
|
|
|
|
adiveppanavar wrote: i am getting memory leak in bitmapinfo
How are you verifying this?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I want to connect to MySQL database when i click a button in MFC dialog based application.
1)I searched web (including CP) but i didn't find exact info since there seems to be various methods to connect including DSN less (using MySQL++)
2)I have downloaded MySQL database & ODBC connector but i am not able to connect to it even while creating DSN(From Control Panel).
3)I am able to create tables etc on MySQL command line but not able to establish link between database & VC++ App.
Can anyone point me to a simple article which explains connecting to MySQl and inserting a record into it(with DSN or without DSN)
thanx in advance
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
MySql installation will provide you with soem documentation for api's to be used for all operations with MySql Database.
Some of them are
void *mydata;
mysql_init((MYSQL*) 0);
mysql_real_connect((MYSQL*) myData,dbHost,dbUID,dbPWD, NULL, MYSQL_PORT, NULL,0);
mysql_select_db( (MYSQL*)myData,"MYSQL");
mysql_query((MYSQL*)myData, "select * from mysql.host");
Saadhinchaali
|
|
|
|
|
|
See Using Visual C++ 6.0 to connect to MySQL[^].
<blockquote class="FQ"><div class="FQA">QuickDeveloper wrote:</div>"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"</blockquote>
if you find your name in that list do you go to work if see your name in the middle of list?
|
|
|
|
|
QuickDeveloper wrote: I want to connect to MySQL database when i click a button in MFC dialog based application.
So what are you having trouble with: 1) connecting to the data source, or 2) responding to a button click?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: 1) connecting to the data source,
Connecting to the datasource while creating DSN
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
One way is to create a CRecordset -derived object. ClassWizard (Ctrl+W) will ask you what DSN to use.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This type of construction so that a function with an indefinitely long parameter list can pass those parameterson to another function:
/*-----*/
void diprintf(HWND db,short c,char*fmt,...){char C[256];
vsprintf(C,fmt,(&fmt)+1);
SetDlgItemText(db,c,C);};
/*-----*/
short discanf(HWND db,short c,char*fmt,...){char C[256];
GetDlgItemText(db,c,C,256);
C[255]=0; return vsscanf(C,fmt,(&fmt)+1);}
/*-----*/
worked fine for me under Gnu C++ and Borland 4.5 C++, but my (free version) Visual C++ 2008 refused it with these error messages:
1>c:\2d\ppp_vc\ppp_vc\ppp.cpp(274) : error C2664: 'vsprintf' : cannot convert parameter 3 from 'char **' to 'va_list'
1>c:\2d\ppp_vc\ppp_vc\ppp.cpp(277) : error C3861: 'vsscanf': identifier not found
(plus the expected complaints about having char* instead of WCHAR* .)
I cannot find the info that I need in the online help.
Please what should these two funtions be corrected to for my Visual C++ 2008?
|
|
|
|
|
Anthony Appleyard wrote: cannot find the info that I need in the online help.
See there http://msdn2.microsoft.com/en-us/library/28d5ce15(VS.71).aspx[^]
the sample code looks promising
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Anthony Appleyard wrote: 1>c:\2d\ppp_vc\ppp_vc\ppp.cpp(274) : error C2664: 'vsprintf' : cannot convert parameter 3 from 'char **' to 'va_list'
So have you looked at the prototype for vsprintf() to see what it is expecting as arguments? The error messages seems fairly self-explanatory.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want to get the choosed menu's caputer,then to modifly StatusBar's info.
At Event: OnMenuSelect(UINT nItemID,UINT nFlags,HMENU hSysMenu)
I write
void CMainFrame::OnMenuSelect(UINT nItemID,UINT nFlags,HMENU hSysMenu)
{
CString str;
CMenu* pMainMenu = GetMenu();
CMenu* pSubMenu = pMainMenu-> GetSubMenu(nItemID);
pSubMenu->GetMenuString(nItemID,str,MF_BYCOMMAND);
}
But when compile to the " pSubMenu->GetMenuString(nItemID,str,MF_BYCOMMAND);
" It aways tells me wrong ,I don't know why?help!! thanks!
|
|
|
|
|
vernchen wrote: But when compile to the " pSubMenu->GetMenuString(nItemID,str,MF_BYCOMMAND);
" It aways tells me wrong ,I don't know why?
Without an actual error message, neither do we.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I have a function that calculated two int values. I call the function only by using a string and calculated those two int values. I want to return that two int values from the function when I call it with a string.
Look at the following function,
bool CharWordCount(string rtf, int& word_count, int& char_count)
{
}
<pre>
One of my friend say i can do it as above. using the bool type return value. Can you guys give me a help how to do that.
I appreciate your help all the time...
Eranga
|
|
|
|