|
Hi there,
I'm developing an ActiveX control, for that I need to pass CPoint array to an Automation Member. So Can Anyone say How to Convert from CPoint* to VARIANT FAR.
TIA
-------------------
Rajesh Parameswaran
|
|
|
|
|
hi all,
I have a Method like this:-
void CMyprogramDlg::Addcustomers(BSTR bstrParty)
{
CListBox m_lbParties;
_ASSERTE( bstrParty != NULL);
m_lbParties.AddString(bstrParty);
}
But when I compile this,I am getting such a Error:-
"error C2664: 'AddString' : cannot convert parameter 1 from 'unsigned short *' to 'const char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
"
How do I solve this?
If anyone know this please help me..
Thanks in Advance..
|
|
|
|
|
Add string requires the char* and you are suplying the BSTR here.
You need to convert it from UNICODE BSTR to the normal string or force the listbox to accept BSTRs
|
|
|
|
|
You could use CString to convert from UNICODE to char string like this: m_lbParties.AddString(CString(bstrParty)) or use WideCharToMultiByte function. You must also create list box before you call AddString .
Regards,
Andrzej Markowski
|
|
|
|
|
Dear all,
in VC++ we can find the username by calling GetUserName () API. But how to find the Domain name ? please help me.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
look at IADsADSystemInfo documentation, there's everything you may need.
|
|
|
|
|
Dear Geo,
Thanks a lot.
Regards,
Jijo
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Use NetWkstaGetInfo() to get the name of the domain to which the workstation belongs. Use NetWkstaUserGetInfo() to get the name of the domain in which the user is currently logged on
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Dear David,
Actually i was searching for this type API... Thank you very much...
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Hello,
I have a button, I want to change the look of the button when the mouse is over and when the button is pressed and released. The look and feel should be similar i.e exact replica when a menu item button is clicked. I know that I have to do this in OnDrawItem. But without using bitmaps for changing the look and feel of button, I want to use some drawing operations. Can anyone please help me to do this?
Thnaks
Madhavi
|
|
|
|
|
Hi,
Have a look @ this article
http://www.codetools.com/buttonctrl/cbuttonst.asp
Sujan
|
|
|
|
|
|
Hi,
I want to do the same, but without loading the bitmap on button. My buuton should only contain text.
I hope u got my point.
Please give me some suggestions...
thnaks
madhavi
|
|
|
|
|
OnMouseHover event will simply solve what u r looking for either with Image or test, just drop some code there and u will see the difference
|
|
|
|
|
hi all,
I'm having a Error when I compilled my Project.
Error is
"error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [15]' to 'const unsigned short *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"
Probelm caused Code Part:-
HWND m_hDisplay;
m_hDisplay = CreateWindowEx ( WS_EX_CLIENTEDGE, RICHEDIT_CLASS, NULL,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL |
ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL,
0, 0, 100, 100,
m_hWnd, (HMENU)IDC_IM_DISPLAY, GetModuleHandle(NULL), NULL);
There is a Problem in "RICHEDIT_CLASS" ..So what is the solution for that?..If anyone know this please help me ?
Thanks in advance..
|
|
|
|
|
Try the following:
CreateWindowEx ( WS_EX_CLIENTEDGE, _T(RICHEDIT_CLASS), NULL,
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ......
Greetz,
Davy
|
|
|
|
|
hi Davy,
Many Thanks ...I compilled it.
|
|
|
|
|
Clicked on File Menu
Selected New Project
Selected "MFC AppWizard (exe)"
Selected Dialog Based
I got a new dialog that has 2 buttons - OK, CANCEL.
Q. Where's the code that adds them? What's a newbie got to do to get with this stuff?
Q. Are there any tutorials that describe step by step application UI development with screenshots or explain what the Class Wizard does and how somethings done there can be undone?
Q. Finally, how does one create a tabbed page?
|
|
|
|
|
you need to start off by buy a book on visual c++ or taking some classes or finding lots and lots of tutorials online
and yes there are tons even here.
and creating a tab page is somewhat complicated you would need more than basic programming skill to create a tabbed page
anywhere here is a tutorial on making a dialog based app
http://www.thecodeproject.com/dialog/dialogapptute.asp[^]
|
|
|
|
|
Anonymous wrote:
Q. Where's the code that adds them?
In the project's .rc file.
Anonymous wrote:
What's a newbie got to do to get with this stuff?
Start off small and practice.
Anonymous wrote:
Q. Are there any tutorials that describe step by step application UI development with screenshots or explain what the Class Wizard does and how somethings done there can be undone?
Most start with MSDN's Scribble example. It's a very comprehensive tutorial.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hi i am working with the following code. however anytime i size it larger or smaller horizonitly the tree view continies to shrink horizontily waht am i doing wrong?
ive tried both getwindowrect and getclientrect and neither do the job
also as you can see i want it to remain attached to the left side of the window and to just resize verticly wich works fine. can anyone help me?
<br />
CRect rect, rect2, rect1;<br />
<br />
GetClientRect(&rect);<br />
<br />
tree.GetClientRect(&rect2);<br />
<br />
rect1.top = rect.top+24;<br />
rect1.left = rect.left;<br />
rect1.right = rect.right+rect2.Width();<br />
rect1.bottom = rect.bottom;<br />
<br />
tree.MoveWindow(rect1);<br />
|
|
|
|
|
The problem is that MoveWindow() works in window coordinates, but GetClientRect() doesn't return the full size of the window, only the client area. It doesn't include the borders, or the scrollbars or anything else in the non-client area. Change tree.GetClientRect() to tree.GetWindowRect() and it should work nicely.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hai,
I want to print % symbol in my printf statement..
eg : printf(" Error is %.2f %",val); ie it should print Error is 5.00%
How should I do this??
thanks.
|
|
|
|
|
in order to print a % use \% if you wannt print a \ do \\ or a quote mark would be \"
they are all escape sequances similar to \n or \r
|
|
|
|
|
Using %% in the format string will output a single % symbol. So your format string should be " Error is %.2f %%" .
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|