|
The code that Hans showed could have been placed in a CListCtrl -derived class.
"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
|
|
|
|
|
Mirror climbing?
(in a derived class, you don't use m_List.GetItemCount() )
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.
|
|
|
|
|
Hi all
In VC++ 6.0 How can make run time Combo Box
In which data come from MySQL Table.
I am writing code for it in OnInItDialog() function
but It can not work proper
Please any one told how can i make it
Regard's
Kaushik
|
|
|
|
|
Y_Kaushik wrote: How can make run time Combo Box
as follows
CComboBox* pCpmbo = new CComboBox;
pCpmbo->Create( WS_CHILD|WS_VISIBLE|CBS_DROPDOWN, CRect(0,0,100,100 ),this, 0 );
nave
|
|
|
|
|
But
How we will showing the value in it from database(MySQL)
Regard's
Kaushik
|
|
|
|
|
Connect to the database, read the strings from it and then use CComboBox::AddString to add the strings in the combo box.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think you need to MFC and MySQL[^] (MFC classes to fill ComoBoxes & ListBoxes with MySQL data.)
|
|
|
|
|
call AddString() function to add data.
nave
|
|
|
|
|
Do you have problem with create ComboBox or Read table?
|
|
|
|
|
Its Become hard for me to showing data in Combobox
Regard's
Kaushik
|
|
|
|
|
Did you see my last post I think it was your answer.
|
|
|
|
|
Yes i come to Know .
My problem is solved now
Thanks for this
Regard's
Kaushik
|
|
|
|
|
|
Hi,
I am using Visual studio 2005 for my application.
In my application,Loadlibrary is used,
LoadLibrary("library.dll");
If i simply give like this, it's showing error as "cannot convert parameter 1 from const char to LPCWSTR",so i typecasted it as,
LoadLibrary(_T("library.dll"))
or
LoadLibrary((LPCWSTR)"library.dll"))
if i give like this it is not taking or recognizing the library gives error as No such lib found.
Please I need help...
Siddharth
|
|
|
|
|
siddharthsan wrote: "cannot convert parameter 1 from const char to LPCWSTR",
This is because in your project setting the _UNICODE is defined. So you must specify unicode string like LoadLibrary(_T("library.dll")) or LoadLibrary(L"library.dll").
siddharthsan wrote: LoadLibrary((LPCWSTR)"library.dll"))
This is not the corrcect way. This casting dosent make the string unicode.
siddharthsan wrote: library gives error as No such lib found.
This error may be because the dll is not in the path.
try
1.Give full path of the dll in that function.
2.Add the path of the dll into the "PATH" environment variable. Restart msdev after this and try
nave
|
|
|
|
|
siddharthsan wrote: If i simply give like this, it's showing error as "cannot convert parameter 1 from const char to LPCWSTR",so i typecasted it as,
LoadLibrary(_T("library.dll"))
or
LoadLibrary((LPCWSTR)"library.dll"))
So the compiler is wrong and and you are making it listen by casting, right!!
|
|
|
|
|
Siddharth,
Have you tried using LoadLibraryA("library.dll") ? Your project is clearly set to use UNICODE by default and the API headers are defining LoadLibrary as LoadLibraryW. This is a bit of a strange one, I've never been quite sure what happens if you try to load a dll with the name in UNICODE (wide characters).
Note: ((LPCWSTR)"library.dll") will never work as this just casts the pointer to narrow string to a pointer to wide string but doesn't change the string
If LoadLibraryA does not work then I guess it just can't find your dll. Is it in the normal search path, i.e. same dir as exe or Windows\System32 or somewhere mentioned in the PATH environemnt variable?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
siddharthsan wrote: LoadLibrary((LPCWSTR)"library.dll"))
if i give like this it is not taking or recognizing the library gives error as No such lib found.
Try a fully-qualified path.
"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
|
|
|
|
|
siddharthsan wrote: LoadLibrary((LPCWSTR)"library.dll"))
This is wrong. If you get into the habbit of using static_cast instead of C-style casts this kind of mistake will produce compiler errors instead of runtime errors.
Steve
|
|
|
|
|
Hi
I am making an application in VC++ 6.0 using Modal Dialog based
Problem is that when i press enter key or Press Esc Key form is closed.
Please any one told me How I avoid It.
2:
The Another Issue is In my application Backend is MySQL so
my requirment is upload .doc file in to database how can i
do it Please told me if possible with an example
Thanking You
Regard's
Kaushik
|
|
|
|
|
Y_Kaushik wrote: Please any one told me How I avoid It.
Use PreTranslateMessage()
Y_Kaushik wrote: The Another Issue is In my application Backend is MySQL so
my requirment is upload .doc file in to database how can i
do it Please told me if possible with an example
You should write some code to read from .doc file and then write the strings read into the database.
Then, Post a specific problem that you are stuck on and some one here will help you out.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Overriding PreTranslateMessage() is not the best way to do it. Read reply by Roger Stoltz, below.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
yeah. got to read that point, didn't know about this earlier
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Yeah. Didn't know about that fact earlier.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See this[^] thread is helpfuls?
|
|
|
|