|
You have to cast the void* to a CComboBox*:
((CComboBox *) ptr)->GetCurSel () for example.
|
|
|
|
|
A little bit of C++ to the recipe will be nice. For instance,
CComboBox* pComboBox = static_cast<ccombobox*>( ptr );
pComboBox->TheFnYouNeedToCall();
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Is the only way to call OnDraw() is by calling Invalidate?
Tell me the other ways how i can Call OnDraw()?
Also pls confirm that Is not OnDraw() called by the framework under any circumstances?
If it is called by the framework under any situation describe it.
Thanks in advance.
|
|
|
|
|
Can you explain about your problem?
|
|
|
|
|
No, there is also
OnDraw();
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You can also send the WM_DRAW message to your window.
OnDraw () isn't called by the framework if the WM_DRAW message isn't sent by the framework.
The WM_DRAW message isn't sent if the framework is unaware that the view has been changed. In this situation, you tell the framework it's been changed by calling Invalidate ().
|
|
|
|
|
Hello !
I am trying to connect remote SQL server from my app. The Connectionstring I am using is as follows .
connection->Open(L"Provider=sqloledb;DBPROP_INIT_DATASOURCE='p3swhsql-v06.shr.phx3.secureserver.net';"
L"Initial Catalog=XXXX;User ID=XXXXX;Password=XXXXX ", L"",
L"", ADODB::adConnectUnspecified);
Error Message comes as "Login failed for user 'XXXXX'"
But for same user using asp.net I can connect.
Anyone please help me to connect this server. I do not have IP address for the remote system.
thank you
|
|
|
|
|
abumath wrote: I do not have IP address for the remote system.
if you need to connect to a remote machine you either need IP address or the machine name.
abumath wrote: But for same user using asp.net I can connect.
See the connection string used by this asp.net webapplication, it may give some clue.
-Suhredayan
|
|
|
|
|
Hello,
I am working on an mfc application in which i have a chat dialogbox with smiley button.
On click of smiley button i am opeining a new dialogbox with emoticon
Now i want to close the dialog with emoticon button when mouse is clicked outside it.
Please help me how to do it.
Thanks In Advance.
modified on Monday, November 17, 2008 5:36 AM
|
|
|
|
|
I believe you shouldn't have managed this with a dialog but with an owner drawn menu...
|
|
|
|
|
can you help me with some article as i dont know this metho.
How to use owner draw menu.
|
|
|
|
|
|
Handle WM_KILLFOCUS.
Another way would be to create your window with WS_POPUPWINDOW style.
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I have created my window with WS_POPUP.
How can I handle WM_KILLFOCUS. Please elaborate it if possible.
Thanks
|
|
|
|
|
If it is a modal dialog box then you have no chance. On the other hand, if it is a modeless dialog, then send it the WM_CLOSE message.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Yes it is a modal dialog box. I am doing DoModal.
|
|
|
|
|
SendMessage(hwnd,WM_CLOSE,0,0);.
|
|
|
|
|
Dhiraj kumar Saini wrote: Now i want to close the dialog...
If it's a modal dialog, call EndDialog() .
Dhiraj kumar Saini wrote: ...when mouse is clicked outside it.
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello All
I am working in VS 6 (VC++) using win32...
My task is to display an avi file in Animate control.....
I use Animate_Open And Animate_Play...Both Works fine.....
But The problem is it displays the avi file with Player also .....it looks as .avi is playing in the media player....
Can anybody suggest me how to display the picture only without any player in the animation control
|
|
|
|
|
If you want to play avi file or even your pictures you can use of MCI functions however you dont need to use of MCI functions for pictures.
|
|
|
|
|
hi i m usng the below code for writing data to excel from vc++
but the saved file is not in good format.
can anyone suggest a gud one?
UpdateData(TRUE);
ofstream o;
char ch[101];
o.open("D:\\tdy1",ios::app);
int s, s1;
s = m_edit1.GetLength();
strcpy(ch,"\n");
o.write(ch,2);
strcpy(ch,m_edit1);
o.write(ch,s);
strcpy(ch,"\t");
o.write(ch,2);
s1 = m_edit2.GetLength();
strcpy(ch,m_edit2);
o.write(ch,s1);
o.close();
|
|
|
|
|
hellogany wrote: hi i m usng the below code for writing data to excel from vc++
1) no, you're not - you're writing to a file you hope excel can read - since D:\tdy1 has no extension and you're likely not doing a file import, excel wont have a clue how to read the data.
2) your use of ostream is an abomination !!!
how about :-
ofstream o;
o.open("D:\\tdy1.csv", ios::app);
if (!o.is_open())
{
cout << "Cant Open D:\\tdy1.csv For Output" << endl;
return -1;
}
o << m_edit1.GetLength() << "," << m_edit1 << endl;
o << m_edit2.GetLength() << "," << m_edit2 << endl;
o.close();
Because Excel knows how to read a file with a .csv extension, you should see 2 x 2 rows/columns with your data
'g'
|
|
|
|
|
i tried savin in xls format
but whil openin the excel file, it is showing " the file format is not recognisable"
|
|
|
|
|
so what makes you think those values you are saving constitute the Excel .xls format ? - they dont
if you dont like the help Ive offered, learn to use a textbook or google for instance
modified on Monday, November 17, 2008 6:42 AM
|
|
|
|
|
Garth J Lancaster wrote: if you dont like the help Ive offered, learn to use a textbook, google for instance
Hey Garth, is Google a textbook now?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|