|
In fact, bandinfo.lpText is a null string (the first byte is equal to 0) ?
|
|
|
|
|
Probably no, but just to be sure...does anything change if you declare your textInfo array as TCHAR instead of char? So i mean, instead of char textinfo[80]; , TCHAR textinfo[80]; . Another question, is 80 characters enough? Could it be that you are specifying a not big enough buffer?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
No change with TCHAR and 80 is more than necessary...
I will appreciate an other idea...
|
|
|
|
|
HF wrote: When I use my function FindToolbar (see below), the REBARBANDINFO.lpText is always NULL?
Actually, I use VS2008 with Windows XP. I can't remember if this function that I have written many years ago has never worked or if it's a new bug...
I don't know about it in VS2008, but I tested it in the Microsoft's ControlSpy tool and it is working.
ControlSpy[^]
- ns ami -
|
|
|
|
|
I have received a mail where you talk about the hwndChild.
This pointer stays to NULL...
|
|
|
|
|
That was one wrong suggestion, so I deleted immediately
HF wrote: This pointer stays to NULL...
Means you are not getting the window to that bar.
- ns ami -
|
|
|
|
|
Effectively with control spy, I have the good lpText (Planets...). But I have no idea why my function doesn't work...
|
|
|
|
|
From your previous reply, I think, the window handle is not getting because the index might be wrong. When using ControlSpy, you can see that window handle become NULL when you give wrong index.
Can you debug step by step and trace the values?
- ns ami -
|
|
|
|
|
Hi All
How can i delete all line of List Box?I want to delete all line from list box on Buttonclick.Plz help me
|
|
|
|
|
|
After Mike you could to find this secret,Cedric!
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
I Have created 3 dialog boxes in my application, i want to move 3 dialog boxes using back and next.. with out loosing the dialog box selection state..
Can any one help me regarding this..?
Thanks in advance...
|
|
|
|
|
That would be called a wizard.
Do a search for Property Page, Property Sheet, or for MCF, CPropertyPage / CPropertySheet.
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi,
Thanks for your help on this.., i don't want tabs in single dialog. Below i am explaining my scenario:
1. I have two dialog boxes, have two buttons on each dialog, and have to move (shuffle) from one dialog to other..
Can you please explain how i have to achieve this..?
Thanks in advance
|
|
|
|
|
John502 wrote: i don't want tabs...
There aren't any tabs with a "wizard."
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Tabs, Property Pages and Wizards[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
Thanks for your help on this.., i don't want tabs in single dialog. Below i am explaining my scenario:
1. I have two dialog boxes, have two buttons on each dialog, and have to move (shuffle) from one dialog to other..
Can you please explain how i have to achieve this..?
Thanks in advance.
|
|
|
|
|
May be SetWindowPos() can help? You can make use of the "insert-after" parameter.
Thought it was "back-n-forth".
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
modified on Wednesday, March 4, 2009 6:03 AM
|
|
|
|
|
Hi,
Thanks for your help on this.., i don't want tabs in single dialog. Below i am explaining my scenario:
1. I have two dialog boxes, have two buttons on each dialog, and have to move (shuffle) from one dialog to other..
Can you please explain how i have to achieve this..
Thanks in advance
|
|
|
|
|
Then you can use SetWindowPos. First of all you need to create them as "Modaless" dialogs. Which can be created using "Create" call rather than using "DoModal". Then you can simply call SetWidowPos and pass the other CDialog's pointer as the first parameter. It gets shuffled by that. You need to do it vice-versa in the other dialog. So that it works both ways.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Hi...
How to get system ip address in C++ or Mfc?
Please can anyone help..?
THank you.
G.Paulraj
|
|
|
|
|
This is a bigger question than it looks.
I have a loopback address, my ethernet adapter has two addresses (don't ask), and my wifi adapter has one address (though not currently active).
Go to a command prompt, and type:
ipconfig /all
and see all the information you can shake a stick at.
Then do a search for GetIpAddrTable in MSDN, and that will show you a bunch of functions to interogate windows about network information.
Now, get scared and look for articles on codeproject (which you should have done first)
http://www.codeproject.com/KB/IP/[^]
http://www.codeproject.com/KB/IP/getipnr.aspx[^] looks pretty perfect for you.
Enjoy, and learn,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Thank you so much for your reply.
G.Paulraj
|
|
|
|
|
#include <afxwin.h>
#include <afxsock.h>
:::::::::::
:::::::::::
char* CLogger::GetIPAdd()
{
WORD wVersionRequested;
WSADATA wsaData;
char Name[255];
PHOSTENT HostInfo;
wVersionRequested = MAKEWORD( 1, 1 );
char *IPAdd;
if ( WSAStartup( wVersionRequested, &wsaData ) == 0 )
{
if( gethostname ( Name, sizeof(Name)) == 0)
{
if((HostInfo = gethostbyname(Name)) != NULL)
{
int nCount = 0;
while(HostInfo->h_addr_list[nCount])
{
IPAdd = inet_ntoa(*(struct in_addr *)HostInfo->h_addr_list[nCount]);
++nCount;
}
}
}
}
return IPAdd;
}
|
|
|
|
|
You might want to reply to the person asking the question...
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|