|
That stuff was in javascript. But the regular expression library is available in almost all languages including C++ and java. So you canuse the same regular expression string in other languages as well.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Hi all,
I'm using CRecordset based classes to get data out of a database (an Excel file) - it works well and has done for a number of years, until now. If the database file name has a space at the end of it, before the '.xls' (eg 'my db file .xls') the columns in the tables can not be accessed (though the tables can!), but if the file doesn't have the space it works fine ('my db file.xls'). The problem only happens on WinXP too, it works fine on Win98 - which is making me wonder if this is a known problem with XP? I've not been able to find any information about it on the web / MSDN, has anybody else seen anything like this, or could any one suggest a way for me to get around this?
Dylan
|
|
|
|
|
I need get the entry Id propierty for an Exchange message. I need read this propierty in c++ (PR_ENTRYID) and in visual basic. The return values are different to the same message. Why?.
Visual basic return de correct value, but C++ return a shorter value. How can I return de same value in both cases?
Thanks in advance
Inma
|
|
|
|
|
Hello all,
I've the situation that I've to observe 60 sockets and process their data (small amounts of data). Those 60 sockets are:
- 30 data sockets receiving realtime data each 15-35ms per socket.
- 30 signalling sockets receiving data around (average) every 4 seconds per socket.
My question now is: what is the most efficient way of observing those sockets by select()-call followed by reading from the socket(s)? Due design it is prefered to have only 1 thread for observing, but 2 threads (one for data, and for signalling) is also acceptable. My point is that I've the feeling that doing a FD_SET-of-60-sockets and than select() followed by FD_ISSET per channel + reading and processing is not really going well.
With regards,
EiSl
|
|
|
|
|
One solution is an OVERLAPPED I/O model or the IOCP.
Kuphryn
|
|
|
|
|
Hi !
My application is showing two different docking windows. I have a class for the main window and another class for the docking window. I want to call a method of another class from either the menu of the main window, or the context menu from the docking window.
How should I do that : The mainwindow and the dockwindow call a method of the application object, which will call the method of the target object, of the mainwindow and the dockwindow both know the target object and call directly the method of this object ?
Thanks for your suggestions !
Jerome
|
|
|
|
|
Your question is incomprehensible.
First explain the scenario, and then the problem you are facing. may be you can add a few code snippets as well.
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors"
|
|
|
|
|
Help !!
I want to rotate the display 90°, I wrote these few lines below but nothing happends running it under XP.
Anyone have any ideas ???
{
LPCTSTR lpszDeviceName = NULL; // name of display device
DEVMODE DevMode; // graphics mode
HWND hwnd = NULL; // not used; must be NULL
DWORD dwflags = 0; // graphics mode options
LPVOID lParam = NULL; // video parameters (or NULL)
DISPLAY_DEVICE DisplayDevice;
DisplayDevice.cb = sizeof(DISPLAY_DEVICE);
DWORD iDevNum = 0;
DWORD dwFlags = 0;
EnumDisplayDevices(NULL,iDevNum,&DisplayDevice, dwFlags);
DevMode.dmSize = sizeof(DEVMODE);
EnumDisplaySettings(DisplayDevice.DeviceName, ENUM_CURRENT_SETTINGS,
&DevMode);
dwFlags = 0;
DevMode.dmPelsHeight = 640;
DevMode.dmPelsWidth = 480;
DevMode.dmBitsPerPel = 16;
DevMode.dmDisplayOrientation = DMDO_90;
ChangeDisplaySettingsEx(DisplayDevice.DeviceName,&DevMode, hwnd, dwflags,
lParam);
}
|
|
|
|
|
Hi friends,
i am doing an mfc application i am having a tree ctrl.
Now the thing is i dont want the tree ctrl to collapse
how to do it any suggestion is welcome.
Thanx
TAKE CARE
|
|
|
|
|
Try this:
void CMyTreeCtrl::CollapseBranch(HTREEITEM hti)<br />
{<br />
if(ItemHasChildren(hti)){<br />
Expand(hti, TVE_COLLAPSE);<br />
hti = GetChildItem(hti);<br />
do <br />
CollapseBranch(hti);<br />
while((hti = GetNextSiblingItem(hti)) != NULL);<br />
}<br />
}<br />
<br />
void CMyTreeCtrl::CollapseAll()<br />
{<br />
HTREEITEM hti = GetRootItem();<br />
<br />
do{ <br />
CollapseBranch(hti);<br />
}while((hti = GetNextSiblingItem(hti)) != NULL);<br />
}
HTH,
K.
Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Dwight D. Eisenhower
|
|
|
|
|
hi friend,
Hey this code is not working in following senario..
what i have done is i have mapped TVN_ITEMEXPANDING of the Tree ctrl in my Dialog box Class.
then i have assigned a variable to the treectrl named m_treectrl
i have written the code u have provided in the Dialog box class
and have inserted the m_treectrl var before the CTreectrl Class function u have used in the collapse function for eg
GetRootItem(); has been replaed by
m_TreeCtrl.GetRootItem();
and in the TVN_ITEMEXPANDING I have called the collapseall function but it doesnt work. can u suggest any help ??
waiting for ur reply...
Thanx
TAKE CARE
|
|
|
|
|
sorry, I wasn't careful enough when reading, I understood you wanted to collapse your treectrl
To avoid it to collapse, do this:
<code>
void CTreeDialog::OnItemexpandingTreectrl(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
*pResult = (pNMTreeView->action == TVE_COLLAPSE);
}
Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Dwight D. Eisenhower
|
|
|
|
|
I have a set of applications for which I must create resources in Russian. They have been working for a number of years with various Western-European languages. Resources in the exe are English; resource-only dlls are used to support other languages. The user can switch between the available languages at run-time.
Now I have to do it in Russian. I assume that the obvious way to do this is to build a Unicode dll. However the apps have no Unicode support. Is this a problem? If so then what is the best solution/workaround? It's not feasible to convert the apps to Unicode (~350,000 lines of code, ~3 weeks).
Thanks in advance.
Phil
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Unicode/ANSI only applies to code, really. I believe that all strings in resources are stored in Unicode. What matters is whether your code that reads the resources can handle the Russian character set properly (which, really, shouldn't be a problem since it's a single-byte character set).
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Ericahist updated Aug 30!
|
|
|
|
|
Hi all
I wish to found a help about using ICQ ActiveX controls.
Whether exist one and where i can get it.
Thanks.
|
|
|
|
|
|
hi,
i'm looking for the source code to determine whether a file is made of ASCII or UNICODE signs. Maybe somebody of you has one !
Thanks in advance!
|
|
|
|
|
you can use the API ::IsTextUnicode()
You pass it a sample of the contents of your text file and it uses a combination of statistical methods to determine if your sample is UNICODE encoded.
I Dream of Absolute Zero
|
|
|
|
|
|
Hello,
the problem is, that I need a identifier number of someones computer to transmit over the net. The number is used to identify a user who want to log on on a game server. It is important for the provider to have a possibility to kickban cheating users. I know that every networkcard has a specific hardware-number wich I can use for this purpose. But - how can I get that number in VC?
Thank you for your help,
Regards Andreas Niedermeier
|
|
|
|
|
Hello,
In order to get the MAC address for a particular Network Interface Card ( NIC in short) use GetAdaptersInfo
OK
The Phantom.
|
|
|
|
|
See the MSDN article Q118623.
|
|
|
|
|
sorry, stupid question: where can I find this article?
Thanks, Andreas Niedermeier
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netbios/netbios_1l82.asp
|
|
|
|
|
Thank You, - they are writing that it won´t work with Win98. Do you know something else wich will work on W98 too?
|
|
|
|