For a CListCtrl with the report style, is there an easy way to prevent the user from resizing the column headers? I was hoping there would be a style setting for this, but I can't find it.
If you implement a notification handler for HDN_BEGINTRACK and within that function set *pResult = TRUE, that will prevent the header sizing from happening. Unfortunately, the handler for HDN_DIVIDERDBLCLICK does not allow this override, so header sizing can still happen if the user double clicks a header divider. I don't know a way to change this behavior.
Perhaps there is something else I'm doing that's preventing your solution from working. But I can't find anything out of the ordinary. I just SubClassDlgItem() and set the extended style to include gridlines and fullrowselect.
If you use classwizard to insert a handler for HDN_BEGINTRACK in the list control, it incorrectly inserts a reflection handler, even though the notification is sent directly to the list control (ie not through the reflection mechanism). That's why the classwizard handler is marked =HDN_BEGINTRACK (= indicates a reflected notification).
You need to replace the line ON_NOTIFY_REFLECT(HDN_ENDTRACK, OnEndtrack) in the message map with ON_NOTIFY(HDN_ENDTRACK, 0, OnEndtrack). (See the MSDN knowledge base article Q281155)
"We are the knights who say Ni" (The Knights Who Say Ni)
Sorry guys, but it's still not working. I've tried changing the message map as directed, but nothing happens. The message is still not sent. (I've checked with a messagebox.)
I noticed that the MSDN article refers to CListView while I'm working with a CListCtrl. Could this have anything to do with it?
I am developing a password entry screen( VC++ dialog based application) I am storing password in registry in HKEY_LOCAL_MACHINE\\Software\\myapp
I want it to encrypt and make access denied.
How can we set permissions of a key or its subkey . I need that the access should be denied ,if somebody tries to delete this key the key shouldnot be deleted (ie key should be read only)
I am developing it for Windows NT/2000
Hoping for a positive response
Rohit Dhamija
Software Engineer
Divas Offshore Software Technolgy Pvt. Ltd.
i apologise if this message loads slowly (received a warning when i sent). i live way out back, very slow connection, and i get email longer than this no problem)
why did the one project i did compile include syntax
different to the text book example? (staugaard, jr. structured and object oriented techniques, 2nd edition)
using borland 5.5.1 free command line tools with a command promt screen setup for me be a student list advisor so i type in 'complink <filename> to compile. i don't want to bother him further on this matter. couldn't figure out how to get a project to compile with borland 4.5, but have succedded in getting one to run with 5.5.1. i thought all i would have to do is use the same #include, #endif, etc, and all would be well. i think the enum is wrecking things in some small part, i can't find any information to show me rules for using enum's in structs. this code is probably a bit cut up by now.
you may have to fix the word wrap
you may assume i am rather green at this
/* *************************************** */
/* Yahtzee header file: */
mehere wrote: Error E2209 Yahtzmain.cpp 12: Unable to open include file 'Yahzt.h'
Something is rotten with your include-path: the compiler does not find the header file to include. He is probably not searching the Dir where it sits.
Correct that and most (any?) of the errors are fixed.
The compiler ( being supid as toast but a workaholic;) ) tries to interprete the rest of your code anyway, and fails.
My opinions may have changed, but not the fact that I am right.
mehere wrote: Error E2209 Yahtzmain.cpp 12: Unable to open include file 'Yahzt.h'
I know it sounds silly, but are you sure your file is named 'Yahzt.h'? I once mistyped the filename for a class. I wanted to include the headerfile but it wasn't found. After half an hour searching for the error I checked filenames and found the problem
Linking yahtzee.exe:
linker Warning: No module definition file specified: using defaults
Linker Error: Play::DisplayScoreCat(ScoreCat) defined in module YAHTZMAIN.CPP is duplicated in module YAHTZ.CPP
/* **************** */
these 5 linker messages continue for all functions.
i am giving up and getting on with conceptual foundations study.
thanks again
kirk
I am facing a problem which I don't know if a solution exists. I might have to develop a software which should fullfill these requirements :
- Modular
- Using an Oracle database
- Have to work on Windows and Linux
I know that Oracle exists for both OS. I don't exactly know how to interface it in a way that will work for both Windows and Linux.
But my main concern is regarding modularity. Each time I had to have modularity under Windows, I just used ActiveX components. I was easy and worked well.
But, how to achieve such modularity on Linux ? Is it possible to have a concept of modularity which would work for both Windows and Linux ?
Any hints, help, links, advice, etc.. will be greatly appreciated !
There is (almost) certainly no single framework for you to work with, and the resulting code compiles on Linux and Windows.
To make a GUI that works with Linux and Windows use Java, or you can try wxWindows[^]. It works fine, but is not as advanced as MFC.
*modified the link. 2003-0211T12:37:00*
My opinions may have changed, but not the fact that I am right.
ODBC interface to databases is available both on Linux and Windows. I guess Oracle has some lower-level API that might also work on both systems.
There's an implementation of DCOM for Linux from Software AG.
You can alos check out the QT-Framework wihich is a very well developed C++-cross-platform GUI-library with database connectivity included. It is free and open-source for Linux non-commercial usage, for Windows there is a time-limited test release, I think. www.trolltech.com or www.troll.no or www.trolltech.no
I wrote following code for creating toolbar
CToolbar x;
if(!x.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOOLTIPS |CBRS_TOP|CBRS_SIZE_FIXED|CBRS_ALIGN_TOP| CBRS_GRIPPER,ID_TOOLBAR_MEASURE))
{RACE0("Failed to create toolbar\n");return ; // fail to create }
CToolBarCtrl *m_pToolBarCtrl = &x.GetToolBarCtrl();
TBBUTTON tbb[6]={.............};
m_pToolBarCtrl->AddButtons(76, tbb) ;
m_pToolBarCtrl->SetRows(2,TRUE,&r);
If the program run in DEBUG mode I am getting Exact out put
But I change project setting from DEBUG to RELEASE
I was observered following changes in the structre of the toolbar
1.Some times Total Toolbar occupying the whole window
2.Without have any buttons
3.Some times only single row
Please Help me
I've succeeded in writing my own DDX and DDV routines.
After implementing the ExtraDDX stuff in my project's clw file,
I now want to make these routines available to all my future
projects by putting it in ddx.clw as suggested in Technical Note 26 !
I've already tried the following directories ...
[ExtraDDX]<br />
ExtraDDXCount=5<br />
ExtraDDX1=E;;AC Value;BYTE;0;ACText;AC BYTE with range verification;ACMinMaxByte;Mi&nimum;u;Ma&ximum;u<br />
ExtraDDX2=E;;AC Value;short;0;ACText;AC Short with range verification;ACMinMaxShort;Mi&nimum;d;Ma&ximum;d<br />
ExtraDDX3=E;;AC Value;UCOUNT;0;ACText;AC Unsigned short with range verification;ACMinMaxUshort;Mi&nimum;u;Ma&ximum;u<br />
ExtraDDX4=E;;AC Value;int;0;ACText;AC Integer with range verification;ACMinMaxInt;Mi&nimum;d;Ma&ximum;d<br />
ExtraDDX5=E;;AC Value;UINT;0;ACText;AC Unsigned integer with range verification;ACMinMaxUint;Mi&nimum;u;Ma&ximum;u
Can anyone please tell me where to put it or is it just not possible with VC++ 6.0 ?