|
See the properies of that resource, you have the hScollBar propierty enable. In this case always you will see the Hrozontal Scrollbar visible, when the text is small it will be disabled, but when the text is large, it will be enable.
I hope to help you.
Carlos Antollini.
Is friday at night in Argentina I need =>
|
|
|
|
|
And what forces the horizontal scroll to show up anyways?
You didn't say which mode your list is in. If it's report view, then the horizontal scrollbar appears when the sum of all column widths is larger than the width of the control.
--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?
|
|
|
|
|
Hi everyone! Im having a little problem with this code.
I have B1 and B2 class offpring of some B class and an A class that have linked lists to B1 and B2 references to the objects it "owns".
class B {};
class B1 : public B {};
class B2 : public B {};
typedef struct B1node
{ B1 *B1obj;
B1node *next; } B1node;
typedef struct B2node
{ B2 *B2obj;
B2node *next; } B2node;
class A {
B1node *list1;
B2node *list2;
A &operator=(A& parent) {
B1node *p=parent.list1;
B2node *q=parent.list2;
B1 *obj1;
B2 *obj2;
// we are just creating new B1,B2 objects for the new
// A object and addin them to A
while(p) {
obj1=new(B1);
add_b1(*obj1);
p=p->next;
};
while(q) {
obj2=new(B2);
add_b2(*obj2);
q=q->next;
};
};
void add_b1(B1& obj1) {
B1node *p=new(B1node);
p->B1obj=&obj1;
p->next=list1; // HERE IT'S THE BUGGY SH*T !
list1=p;
};
void add_b2(B2& obj2) {
B2node *q=new(B2node);
q->B2obj=&obj2;
q->next=list2;
list2=q;
};
};
When i call the add methods regularly from main() it does just fine, but when they are called from the =OP they give some "General Protection Fault" at runtime just like they were some misused pointer. The fact is im startin to believe this could be some freaky pointer bug in MSVC++ 6.0, althought i do know that most probably its my fault.
I havent yet downloaded any SPx so i wonder if it could be a bug or its something im doing wrong (do you see some obvious flaw?)
The error jumps out (on add_b1()) when trying to assign list1 as the next node of p! that's pretty unusual!
ANY help or suggestion would be hugely apreciated
my mood stages through this issue:
then then then then
THX!
________________________________________________
Those that have really found the meaning, dont find it meaningful
|
|
|
|
|
What is the value of p?
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
P and q are just references to the lists that are defined
locally on the method
________________________________________________
Those that have really found the meaning, dont find it meaningful
|
|
|
|
|
No, I mean when the program crashes, what is the value of p? That value can usually tell you a LOT about what the program is doing wrong.
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Ok, i know what might be the problem
until now i hadnt said something because i didnt know it was important, but know i figured its the root of the problem.. but since i think the problem has to be reformulated, please forgive me and consider this thread closed, im posting a new thread in a moment...
________________________________________________
Those that have really found the meaning, dont find it meaningful
|
|
|
|
|
Not an answer to your direct question, but an alternative would be to use the std::list container from the STL. You can simplify this code greatly by using STL containers, and if you can live with the cost of object copying, then reworking the lists as lists of 'b1' and 'b2' objects instead of pointers will enable you to eliminate virtually all of this code.
|
|
|
|
|
I have three columns. Each column has alot of text. The user can move the divider, but is there away of letting the user horizontally scroll an individual column without moving the divider?
Please, please any response anyone can give me will be greatly appreciated.
Sincerely,
DanYELL (an overworked graduate student)
|
|
|
|
|
The standard list control can't do that. You might want to look into a grid control (such as Chris Maunder's, right here at this site) so you can resize the rows and show more text.
--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?
|
|
|
|
|
You might try enabling the tooltip control by item/subitem so that when you hover your mouse in a item/subitem the tooltip would popup and show you the rest of the text. I'm also assuming you're in report mode. BTW - dundas has published a good tooltip control somewhere on this website that has many neat features.
|
|
|
|
|
I add a class from dll to my mfc single document (without doc view support) project in CMainFrame::OnCreate function i create my activex control wich is wrapped by the class i added ussing it's create function, then i use it's SetWindowPos function to change it's size in CMainFrame::OnSize function, it's working perfect but when i minimize the main window and then i restore it back, the ActiveX control crashes, saying "Devision by zero".
What is the problem ???
|
|
|
|
|
Hi,
I am using gethostbyname(strHost) method.
and in the LPHOSTENT structure, i am getting two IPs in the
h_addr_list[0] = 192.0.2.172 //My local machine IP assigned by Domain.
h_addr_list[1] = 202.23.24.220 //IP address assigned by Internet Service
//Provider when I dial an internet connection.
Now the same function returns values of same type on a different machine but woth reverse sequence.
Can anybody tell me the way I can check which IP is assigned by ISP and which is my local IP.
Thanks in advance..
Iftikhar Ahmad Dar
|
|
|
|
|
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
|
|
|
|
|