|
Lee Hamel has posted a nice library to CodeGuru which does exactly what you want. Click here to get it.
Regards,
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Just check which ip address that's not a private one.
Private ip addresses are in those ranges:
10.0.0.0. - 10.255.255.255.255
192.168.0.0 - 192.168.255.255
172.16.0.0 - 172.31.255.255
If an ip address is in any of those ranges, it's not routable on the internet, and therefore not assigned by an ISP...
h_addr_list[0] = 192.0.2.172 //My local machine IP assigned by Domain.
It's a bad idea to use public ip addresses on a LAN...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi.
I have a problem with using CTreeCtrl.
How Can I Get Expanded item in "OnExpanding(...)" event, when user
click on '+' and no any item selected.
Iman Ghasr-e-fakhri
|
|
|
|
|
TVN_ITEMEXPANDING
Notifies a tree-view control's parent window that a parent item's list of child items is about to expand or collapse. This notification message is sent in the form of a WM_NOTIFY message.
TVN_ITEMEXPANDING
pnmtv = (LPNMTREEVIEW) lParam
Parameters
- pnmtv
- Address of an NMTREEVIEW structure. The itemNew member is a TVITEM structure that contains valid information about the parent item in the hItem, state, and lParam members. The action member indicates whether the list is to expand or collapse. For a list of possible values, see the description of the TVM_EXPAND message.
Return Values
Returns TRUE to prevent the list from expanding or collapsing.
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi,
I would like control the LPTport (PRINTERPORT) with CreateFile in Win98 and Win2000.
If anyone have a solution is great.
Best regards
Youssef
youssef
|
|
|
|
|
What do u need for?
U can use CPrintDialog and the member funtion GetSafeDC()
|
|
|
|
|
|
hi
I tried some simple programs using collection classes of c++
like and <list>most of the programs gives 26 warnings but no errors,
Though the program works i am not able to understand the warnings
These are the warnings------------------
Compiling...
AGComponent.cpp
warning C4786: 'std::reverse_bidirectional_iterator<std::_tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::les
s<char *="">,std::allocator<int> >::iterator,std::pair<char *="" const,int="">,std::pair<char *="" const,int=""> &,std::pair<char *="" const,int=""> *,int>' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::reverse_bidirectional_iterator<std::_tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::les
s<char *="">,std::allocator<int> >::const_iterator,std::pair<char *="" const,int="">,std::pair<char *="" const,int=""> const &,std::pair<char *="" const,int=""> const *,int>' : identifier was truncated to '255' characters in the debug information
warning C4786: 'std::pair<std::_tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::less<char *="">,std::allocator<i
nt> >::iterator,std::_Tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::less<char *="">,std::allocator<int> >::iterator>' : identifier was truncated to '255' characters in the debug informati
on
warning C4786: 'std::pair<std::_tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::less<char *="">,std::allocator<i
nt> >::const_iterator,std::_Tree<char *,std::pair<char="" *="" const,int="">,std::map<char *,int,std::less<char="" *="">,std::allocator<int> >::_Kfn,std::less<char *="">,std::allocator<int> >::const_iterator>' : identifier was truncated to '255' characters in the deb
ug information
parag
|
|
|
|
|
You need to put a pragma at the top of your stdafx to stop these stupid warnings - they relate to the innefficiency of VC, not anything wrong with your code or the STL. The pragma is something like
#pragma disable 4786
but my syntax is probably wrong. The pragma tells the compiler to ignore this warning.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
What you mean is:
#pragma warning(disable : 4786)
regards
|
|
|
|
|
Hi,
I'm deriving a class off of the WTL's CCommandBarCtrlImpl in an attempt to
recreate the new look of Office XP or DevStudio.NET. I'm running into a
problem, however, as I cannot seem to get the WM_DRAWITEM message sent to
draw the 'root' menus on the screen ( those which appear at app startup ).
I've overridden the AttachMenu function as follows to change the base menus
to be owner drawn ( the base command bar control doesn't ):
long CCoolMenu::AttachMenu ( HMENU hMenu ) {
ATLASSERT(::IsMenu(hMenu));
for ( int i = 0; i < ::GetMenuItemCount ( hMenu ); i++ ) {
MENUITEMINFO mii;
char menuString [MAX_MENU_STRING];
mii.fMask = MIIM_CHECKMARKS | MIIM_DATA | MIIM_ID | MIIM_STATE | MIIM_SUBMENU | MIIM_TYPE;
mii.fType = MFT_STRING;
mii.dwTypeData = menuString;
mii.cch = MAX_MENU_STRING;
mii.cbSize = sizeof ( mii );
::GetMenuItemInfo ( hMenu, i, TRUE, &mii );
int errorval = GetLastError();
mii.fType = MFT_OWNERDRAW;
::SetMenuItemInfo( hMenu, i, TRUE, &mii );
errorval = GetLastError();
}
CCommandBarCtrlImpl<ccoolmenu>::AttachMenu( hMenu );
return 0;
}
This seems to almost work. The errorval variable thrown in to test shows
that the menu is being set without error. The app starts up, and no menu
information is displayed at the top. However, I put breakpoints in the
CCommandCtrlImpl OnDrawItem and OnMeasureItem functions, and they are only
receiving messages when I click to open a submenu. I have also intercepted
the WM_DRAWITEM and WM_MEASUREITEM commands in my own class, with the same
results. So now I am confused. Is it possible to ownerdraw the root menu's
at all? Or will I be forced to do something more drastic?
Thanks, this is starting to give me a headache...
--russell
|
|
|
|
|
see sample at
http://home.worldonline.dk/~viksoe/recentcmdbar.htm
|
|
|
|
|
The sample mentioned doesn't receive messages for the root menu's either. There must be some way to receive DrawItem and MeasureItem messages for the root menus - isn't there?
--russell
|
|
|
|
|
I have a workspace that consists of an MDI project as one project and another GUI project that is used in the MDI project as its GUI elements.
However, anytime I want to trace a problem in the GUI project from the MDI project, I get the "Some breakpoints can not be reached error".
Since I need to launch the MDI project and input paramters first before launching the the Dialogs in the GUI project, I am not sure what to do?
How would you debug something like this?
|
|
|
|
|
Put them in the projects in the same workspace set all the breakpoints and start debugging. some of the breakpoints will get disabled but you will probably get stopped at one of your breakpoints in your MDI or at the beginning of the MDI application and you can then renable the breakpoints in the other GUI project in the workspace via the breakpoints dialog (Ctrl-B).
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
What is meant by the term 'regular expression'. I see it alot but I'm not clear as to what it means. Thanks,
Josh
josh@that-guy.net
|
|
|
|
|
first result in a Google search:
A regular expression is a way for a computer user to express how a computer program should look for a specified pattern in text. The user of a regular expression can then tell the program what it is to do when matching patterns are found - for example, print out each line in which a match is found or substitute another text sequence where any match occurs.
....
best known tool is grep used in UNIX systems and also offered as a separate utility program for Windows and other operating systems.
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
This site explains it pretty well...
http://sitescooper.org/tao_regexps.html
Steve T.
|
|
|
|
|
|
Hi
I want to add a button to the IE-toolbar.
I read the article on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/ext/tutorials/button.asp
The creation of the necessary registry-keys is no problem, but there are mentioned
to COM-function:
IOleCommandTarget
and
IObjectWithSite
Unfortunately I have ABSOLUTELY NO IDEA what to do with them, the help didn't take me any further.
Could you explain me or give me some URL on how to use it?
regards
|
|
|
|
|
To add a button to IE you don't have to do any com programming. If you want the button to do something, you can write script, write a exe to execute, or develop a IE addin like a toolbar or an explorer bar. If you're looking to do the later, read my latest tutorial in the ATL section.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
What I want to do is as follows:
When the user clicks on the button a popup-menu should appear.
When the user clicks on a menu-item some text should be inserted into the control of the current html-site, which has the focus.
How can I start?
The button is created already
|
|
|
|
|
Hi Gurus
I'm using LVS_EX_GRIDLINES in my CListView derived class ...
The grid lines appear in gray, and I would like to have them in black...
Any Idea ?
Thank's
Hello chérie, was it written in the stars, that we were supposed to fraternize ( Pepé Le Pew )
|
|
|
|
|
I have a tree, and I want to be able to dynamically change the color of an individual tree items' text. If anybody can help, I would appreciate it.
|
|
|
|
|
You can do that quite simply with custom draw. Look up "NM_CUSTOMDRAW (tree view)" in MSDN.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|