|
|
Many thanks, Rene!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi
This is the first time I'm working with the CTreeCtrl class. I have already inserted a few items. What I now what to do is:
When the user clicks on an item the dialog box should change the controls on the right side next to the TreeCtrl. How do I accomplish that? Do I need to use CPropertyPages or what?
btw: I've never worked with CPropertyPages or CTabCtrls before
thanks in advance
modified 12-Sep-18 21:01pm.
|
|
|
|
|
- Add a handler for the tree control's
OnClick notification. - Then use the various
CTreeCtrl methods to determine which item is selected. - Finally, manipulate your dialog's controls depending on which item is selected.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Hi. I am trying to create a program that will load settings from a file. So far, it doesn't work. The program crashes for some reason. I think the CEdit function GetLine() is doing it. I had this same problem in Win32 and I am having the same problem with MFC. Is there a built-in way to load settings files?
Thanks!
-- Steve
|
|
|
|
|
Yes. See the GetPrivateProfile*() functions.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
If I staticly link the MFC libraries, will a doc/view MFC application run on any Win32 system? It seems like Visual Studio.net comes with a new version of MFC. I read somewhere that some of the controls relies on IE 4, is there anything else I should be concerned about?
If I don't staticly link the libraries, what versions of windows will still be able to run the application?
Thanks!
- Anatari
|
|
|
|
|
With VC 6, I've been able to run a non-static(dynamic) linked mfc app on every platform from win95 up through xp. However, there have been cases (not all) on certain NT4.0 installations that I got some kind of 'ordinal' error. After scratching my head for a few minutes, I realized that the MFC42.DLL on the NT 4.0 box was probably out of date. Copying a new one manually to the box fixed the problem. This, I believe, was also fixed by doing a later service pack.
Static linking will guarantee functionality.
HOpe this helps.
Paul Oss
|
|
|
|
|
The only problem I have struck is if I was forgetful enough to try to run a Debug build on a 'virgin' machine. Then it will natually report an error that MFC42D.dll can not be found. Windows ships with the latest release versions of MFC, both the MFC42 with is for VC6 and MFC7 which is used with .NET.
Happy programming!!
|
|
|
|
|
None of the distributions of Windows 2000 or XP I've seen in recent months, including the ones that come with the MSDN Universal, or any of the service packs (Win2000SP3 or WinXPSP1), include the MFC7 libraries. If you build an MFC app with VS.NET, you've got to install the libraries on the target machine.
Software Zen: delete this;
|
|
|
|
|
Hi all just recently Visual Studio (6 and .NET) have started been a pain in the proverbial. Everytime a workspace is opened for further work VS complains that is can't open all files. The files that it complains about are ones that have alway been part of the project and still are. They have not been moved to anther directory and used to load quite happily if they were open when the workspace was saved and closed.
It doen't happen with every project. At first I thought one of the files it needs to save the info was readonly so I painstakingly ensured all the files were r/w and it still happens.
Any ideas anyone????
Happy programming!!
|
|
|
|
|
Try to remove all temporary files (.ncb, .clw, .plg, .aps, .clw, .opt, ...)
How low can you go ? (MS rant)
|
|
|
|
|
Have tried all that already thinking it might be the opt file especially but it didn't help. Even deleting the entrie project and getting it fresh from Source Safe (no temp files in there naturally) never helped.
However something must be kept somewhere to make it do this.
Happy programming!!
|
|
|
|
|
I've got a resizing Dialog inside sizing control bar ( using the great CSizingControlBar
from Cristi Posea ) and inside the dialog I have a few edit controls ( either simple
controls, or RichEdit, or CEdit embeded in a custom control ). When resizing the control
bar, the edit boxes loose their 3D borders, and if I move a window over them, they get
partially repainted.
When I resize the controlbar, I can see the borders beeing redrawn, and then drawn
over...
This look like a bad invalidate somewhere ... but I even have an invalidate at the end of my OnSize callback.
The hierachy goes something like this : ( from the outside going in )
ControlBar
CWnd ( PlaceHolder )
Dialog (auto-resizable dialog base class )
CEdit ( bad redraw )
CButton
Dialog (same auto-resizable base dialog class as the Cdialog above)
CEdit ( bad redraw )
Any clue ? I've seen this before but I can't remember how I fixed this ...
Max.
|
|
|
|
|
Ok, now, I've fixed this, styles added to controls ...
Max.
|
|
|
|
|
Hi !
Let's say I pop up a dialog from the main window like this:
CVpdDisplayDlg *vpd_disp=new CVpdDisplayDlg (data_base,this);<br />
vpd_disp->Create(IDD_VPD_DATA,this);<br />
vpd_disp->ShowWindow(SW_SHOWNORMAL);
After that, when the main window is hidden by the new one, if I move the new one to the side and click on the main window, it will not pop back up ??????????????????????
This should be an easy one for Windows experts.....
Thank you
|
|
|
|
|
IF the dialog is the child of the main window, it will always display above it. Pass NULL as the parent if you do not want this, but remember this means your dialog will be lost behind it's real parent.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
I'm a bit of a beginner on Winsock programming. I've done some simple apps which connect to a server/client etc., on a given port, transfer data blah blah. However, I'm curious how programs work that listen on 'any port'. For instance, if I want to write a program that looks for 'a connection' and then can report to me on what port that connection is being attempted, how do I go about doing that? Since there are 65,535 tcp ports, how does one listen to all of them simultaneously? Or am I going about this the wrong way?
Paul Oss
|
|
|
|
|
hi I've looked at FileMonitor by franky braem, it looks good but when i compile it i get an error message... and it debugs on the line
HRESULT hRes = pUnkCP->QueryInterface IID_IConnectionPointContainer, (void**)&pCPC);
thats in the atlbase header file, which is
ATLINLINE ATLAPI AtlAdvise(IUnknown* pUnkCP, IUnknown* pUnk, const IID& iid, LPDWORD pdw)<br />
{<br />
CComPtr<IConnectionPointContainer> pCPC;<br />
CComPtr<IConnectionPoint> pCP;<br />
HRESULT hRes = pUnkCP->QueryInterface IID_IConnectionPointContainer, (void**)&pCPC);<br />
if (SUCCEEDED(hRes))<br />
hRes = pCPC->FindConnectionPoint(iid, &pCP);<br />
if (SUCCEEDED(hRes))<br />
hRes = pCP->Advise(pUnk, pdw);<br />
return hRes;<br />
}
Does anyone know why this is happening? do i have to set the project up differently as it is using atl objects, or is it because i'm now using windows xp pro and not windows 98...
Thanks - Jason
|
|
|
|
|
What you say is both untrue and badly described.
I've taken the time to recompile the FileMonitor code by franky, and :
- it compiled fine
- there is no AtlAdvise call in his code
Not only I don't see where the problem is, but here are my points :
- in case of a problem with a CP article, why not post in the comment area associated to that article, so to make sure the author can help you
- there is no AtlAdvise call, so there is no relation between your post and the actual code you refer to
- you forgot to replace < by < in your post. It's impossible to understand it.
- you begin your post saying you have problem compiling something, and finish your sentence saying "it debugs on the line". So what is it actually ? compiling problem or run-time problem ?
This post is definitely a poor rate.
How low can you go ? (MS rant)
|
|
|
|
|
Sorry.
Why do you take that so personally? You're right in that I made an error it does compile and there is a runtime error on my computer.
It is an unhandled exception at 0xC0000005 : Access Violation, and when I debug the program it returns me to the ALTBASE.H file and points at the line I said. I know this function isn’t called directly from the source code however it obviously is called from another function in one of the header files or I wouldn’t be getting this error message and debugger wouldn’t point me to this line.
So next time you reply please consider that some of us aren’t as good at programming as others and try and help, constructive criticism is fine, but please try not to be so offensive.. Also I’m using visual c++ v6.0 for anyone who might be able to help.
One final thing, both the release version and the debug version of the compiled program already (compiled) also gave me this error, so why is this? It has to be my operating system which differs to the one used when the program was compiled is this true?
Please help as I’ve not been programming long, lame excuse I know but hey we all have to start somewhere.
- Jason
|
|
|
|
|
Most of my comments is not about programming experience. It's about the proper use of the CP forums. I won't list again those things. But if you are willing to get a reply, try to maximize the potential of actually getting read and answered.
How low can you go ? (MS rant)
|
|
|
|
|
Ok i'll have a look at that. I've not had time or I've been going too fast about things to realise that I meant franky braems' TempMonitor, I probably got confused between filemonitor and temp monitor.
My aims are to write/ change a program to:-
Allow it to run in the background which can provide a report of all files accessed and modified at any time!
This way i should be able to see where any program has updated it's settings and probably change these settings back to there original settings by simply copying the files back where they came from.
I'd already written simplistic exe encapsulating programs, (like viruses that dont do anything) and i was hopeing that i could alter this to encapsulate the exe allowing for the program to revert it's settings back to previous loaded version automatically, it should be simple and this way it would be possible to bypass any evaluation period on the software that I'm dealing with without too much hassle (microsoft only for what they did with virtual engine and sun).
The only way is to find out what files have been changed and I'd prefer to program an application that does this rather than search the internet for one.
Thanks - Jason
|
|
|
|
|
Hi,
I found a lot of articles about editing list view subitems, but i need something about editing these subitems when i'm using virtual lists... Does anyone has anyideas about it?
Thank u very much,
Dirso
|
|
|
|