|
I think it officially is 'bar' but I've also heard it described as 'pipe'
|
|
|
|
|
According to the character map utility it is called Broken Bar. Whether it is broken or not depends upon what font you select, though.
Chris Meech
It's much easier to get rich telling people what they want to hear. Chistopher Duncan
Why do people in this time period worry so much about time traveler's destroying their worldline when they have no problem doing it themselves every day? John Titor
|
|
|
|
|
Vertical bar, or 'pipe' from my days in the Unix world.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
DavidCrow wrote:
'pipe' from my days
pipe from your days in the strip club world you man-whore. =)
Lol sorry man couldnt resist.
|
|
|
|
|
I call it the 'pipe' char, after the MSDOS days of command prompt control. (ahhh, those were the days)
I Dream of Absolute Zero
|
|
|
|
|
There's no way this is the first time someone has encountered this but all of my searches are turning up unrelated crap.
I have a CRichEditCtrl in a dialog (modal) that I want to be able to accept the TAB key. The dialog keeps butting in and stealing the TAB (as it normally would) to select the next control. There are no other controls that I would want to jump to so if there is a solution that will allow me to get the TAB key within the edit and not have the focus change, that would be ideal.
I have tried playing with PreTranslateMessage() and a few other things but the focus continues to change not matter what I have tried.
Thanks for any help you may be able to provide.
Dave
|
|
|
|
|
Check WM_GETDLGCODE documenation.
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
Thank you very much! That did it!
|
|
|
|
|
hello ppl
i am a newbie to socket programming i am having problems in connecting a client to a server. This is what my SERVER code looks like :
int MainFrame ::OnCreate(LPCREATESTRUCT lpcs)
{
if(!AfxSocketInit())
MessageBox("Socket init error");
//create the server first
if(server.Create(1000,SOCK_STREAM))
MessageBox("Server Socket Created");
CWnd::SetTimer(1,1000,0);
return CWnd::OnCreate(lpcs);
}
void MainFrame::OnTimer(UINT nIDEvent)
{
if(!server.Listen())
MessageBox("Server not responding");
CWnd::OnTimer(nIDEvent);
}
What this code tries to do is that it creates a server on PORT 1000 and listens for incoming connections after each second
now the second part that is the CLIENT has the following code
int MainFrame ::OnCreate(LPCREATESTRUCT lpcs)
{
if(!AfxSocketInit())
MessageBox("Socket init error");
if(client.Create(2000,SOCK_STREAM))
MessageBox("Client Socket Created");
return CWnd::OnCreate(lpcs);
}
void MainFrame ::OnConnect()
{
while(client.Connect("172.16.64.89",1000) != TRUE )
client.Connect("172.16.64.89",1000);
MessageBox("Connected to Server");
}
Everything goes fine here except when i am trying to listen to the server using Connect it never suceeds
please help me out whats wrong with my code what modifications are to be made will be very much thankful
Regards
Cyberizen
|
|
|
|
|
I'm not 100% familiar with CAsyncSocket (this is what you are using?), but this tips might help/be applicable, but do take it with a pinch of salt!!
1. I don't think you have to "Listen" repeatedly, just call Listen() once
2. You need to Accept() connections in you server, implement the OnAccept() notification
3. You shouldn't bind you client socket to a specific port, rather use Create() and let the socket pick the best port for the client
4. Don't use ports in the 0-1024 range, these are resevered, rather us a number > 7000, this is what I usually do.
So maybe:
class CMySocket : public CAsyncSocket
{
CSocket m_Client;
protected:
virtual void OnAccept(int)
{
Accept(m_Client);
}
}
...
//in MainFrame
CMySocket server;
...
int MainFrame ::OnCreate(LPCREATESTRUCT lpcs)
{
if ( !AfxSocketInit() )
{
MessageBox("Socket init error");
}
//create the server first
if ( server.Create(7000,SOCK_STREAM) )
{
server.Listen();
MessageBox("Server Socket Created");
}
return CWnd::OnCreate(lpcs);
}
>>now the second part that is the CLIENT has the following code
int MainFrame ::OnCreate(LPCREATESTRUCT lpcs)
{
if ( !AfxSocketInit() )
{
MessageBox("Socket init error");
}
if ( client.Create() )
{
MessageBox("Client Socket Created");
}
return CWnd::OnCreate(lpcs);
}
// OnConnect is a method delacared in your mainframe
// and called by you in some way, maybe in response to
// a menu item, etc DONT FORGET TO CALL THIS METHOD!!!
void MainFrame ::OnConnect()
{
// this is nasty!! there should be a delay of some kind
// or perhaps some other mechansim, if the connection fails
// this will just flood the poor server!!
// what if it never succeeds? You app will just lock up and the
// MMI will cease to respond!
while ( client.Connect("172.16.64.89",7000) != TRUE )
{
client.Connect("172.16.64.89",7000);
}
MessageBox("Connected to Server");
}
Windows, Linux and Internet Development Consultant
Email: corporate@scriptsmiths.com
Web: http://www.scriptsmiths.com
|
|
|
|
|
I need help trying to programmatically print in landscape mode use Windows 2000. The code below works on Windows 9x but not on Windows 2000:
...
printerDC.StartPage();
DEVMODE dm;
memset(&dm, 0, sizeof(dm));
dm.dmSpecVersion = DM_SPECVERSION;
dm.dmSize = sizeof(DEVMODE);
dm.dmFields = DM_ORIENTATION;
dm.dmOrientation = DMORIENT_LANDSCAPE;
printerDC.ResetDC(&dm);
... Under Windows 2000 the page is printed portait mode.
I have looked in the MSDN, no help...
Thanks in advance!
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
You don't want to do that. DEVMODE is a standard structure but there are cases where the printer driver needs additional space.
You should get the existing DEVMODE and modify that in-place (or possibly copy that, including allocating any extra space).
Steve S
|
|
|
|
|
Hi, I get times from a server given in UTC (Coordinated Universal Time or Universal Time Coordinated),
that is similar to GMT (Greenwich Mean Time) but not adjusted to daylight saving time. That is, during
summer, UTC differs one hour from London time, since UK uses daylight saving during summer.
The application I develop is used worldwide so I can not assume or hardcode anything. This should not
be a problem since winapi have functions to handle this. I do the following.
The function I use to convert UTC time to local time (New York time for me) looks like this:
COleDateTime ConvertToLocalTime(const COleDateTime& timeUTC)<br />
{<br />
<br />
_tzset();<br />
<br />
<br />
CString str;<br />
str.Format("offset = %d, daylight = %d, %s, %s\n", _timezone, _daylight, _tzname[0], _tzname[1]);<br />
cout << (LPCTSTR)str<< endl;<br />
<br />
<br />
COleDateTimeSpan timeSpanOffset(0, 0, 0, _timezone);<br />
<br />
COleDateTime timeLocal = timeUTC - timeSpanOffset;<br />
<br />
<br />
str.Format("time UTC = %s, time local = %s", timeUTC.Format("%H:%M:%S"), timeLocal.Format("%H:%M:%S"));<br />
cout << (LPCTSTR)str<< endl;<br />
<br />
return timeLocal;<br />
}
and produces the following output:
offset = 18000, daylight = 1, Eastern Standard Time, Eastern Daylight Time
time UTC = 11:23:45, time local = 06:23:45
Five hour difference which is fine during winter time, but when daylight saving is in effect, it only differs
four hours. Windows apperently handles this fine, the clock in the notification area adjusts properly, but is
there some way from the API to find out if daylight saving is in effect or not? Are there other ways than using
the functions I been using? _daylight only tells you if Windows should adjust for daylight saving or not.
Disabling automatic adjust of daylight saving in the Windows clock only affects the output as follows:
offset = 18000, daylight = 0, Eastern Standard Time, Eastern Standard Time
time UTC = 11:23:45, time local = 06:23:45
Thanks, Mellowman
|
|
|
|
|
Got the answer in another forum, here's the information if anyone else have similar problem:
Subject: Re: Daylight saving problems when using winapi's timezone functions.
From: "David A. Mair" Sent: 10/17/2003 1:02:16 PM
I have a simple SNTP client app where I need to do the same thing. My case
correctly handles daylight savings, here's the relevant section of code:
DWORD tzResult;<br />
TIME_ZONE_INFORMATION tzInfo;<br />
tzResult = GetTimeZoneInformation(&tzInfo);<br />
m_Bias = (int)tzInfo.Bias;<br />
switch(tzResult)<br />
{<br />
case TIME_ZONE_ID_STANDARD:<br />
m_Bias += (int)tzInfo.StandardBias;<br />
m_TZ = tzInfo.StandardName;<br />
break;<br />
<br />
case TIME_ZONE_ID_DAYLIGHT:<br />
m_Bias += (int)tzInfo.DaylightBias;<br />
m_TZ = tzInfo.DaylightName;<br />
break;<br />
<br />
case TIME_ZONE_ID_UNKNOWN:<br />
break;<br />
<br />
default:<br />
m_Bias = 0;<br />
}
m_Bias now holds the correct timezone offset from UTC in seconds for the
local time regardless of the time of year (assuming the computer has a
correctly configured clock and operating system). GetTimeZoneInformation()
is a Win32 function IIRC.
|
|
|
|
|
I downloaded a bit of code from:
http://www.codeproject.com/shell/cshellfileop.asp?print...
i want to disable the cancel button on the progress dialog but cant. Any ideas on where i would start.
|
|
|
|
|
Depending on whether you have a control variable or not, the syntax would be:
controlvariable.EnableWindow(FALSE);
or
GetDlgItem(IDCANCEL)->EnableWindow(FALSE);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi,
i have a console application which does some file manipulation, and i need to delete a specific amount of signs from the end of the file to shrink the file size, but i can't find a method which can do this !
Can someone help me?
Thanks in advance!
|
|
|
|
|
One option would be _chsize() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
Are there any Software analysis tools for free download ?
What I look for is a tool that will tell me how much time I spent on each function, which function was not active at all, etc.
Thanks,
Shay
|
|
|
|
|
Run this by me... Im missing something and i cant see what.
Ok, Supposing i have a PropertySheet. inside it i have a CPropertyPage Class that has 'CListBox myListBox' as a class member variable and is attached to a ListBox control created using the resource editor. I then have another class called myApp derived from CWinApp.
The question is...
How do i add a string to my ListBox contol at runime from a function triggered by another action in myApp?
When i put the pieces together and compile its all fine until trgger the function. From then i get an assertion error.
void signature(){
cout<<"Sobbayi Interactive"<
|
|
|
|
|
You are supposed to write:
<br />
myApp.myListBox.InsertString("My String 1");<br />
Am I right ?
MaestroProgramador.Com
Where every source code is loved like a girl.
|
|
|
|
|
You're probably trying to write to a non-existing listbox. You have to pass the listbox along to the other class in order to write to it. Create a pointer to the listbox in the myApp class and then set it equal to the listbox when you set up the myApp class, then you should be able to write to it.
Mike
|
|
|
|
|
Thanks guys, The problem is certainly not InsertString() or AddString() i think i am gonna go with Mike. I discovered i am actually trying to insert a string into a non initialized ListBox. So am gonna go with using a pointer to myListBox from myApp class.
Thanks alot guys.
void signature(){
cout<<"Sobbayi Interactive"<
|
|
|
|
|
Hi all,
I have to display some dropdown combobox so I am using
CComboBox::Create. My combo regularly appears with the edit part the right
size, but when I cick on in the list part is 0-heigthed.
Some silly question:
- what is the heigth of a combo? the edit heigth or the edit + list
heigth?
- is the CComboBox::SetItemHeigth suitable for me? I tried it but nothing
changed!
Could you please help me?
Best regards.
Andrea
|
|
|
|
|
This worked for me:
cb.Create(WS_CHILD|WS_VISIBLE|WS_VSCROLL|CBS_DROPDOWNLIST,CRect(10,10,200,150),this,987);
What are you doing different?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|