|
Hi everyone,
Well my propblem goes like this. First of all i want to let you know that the project that I have developed works under WinME , Win98SE and Win95B without any problems. I ran into this problem when someone wanted to install this on a Win95A machine. We also found out that this problem is also consistant on a win98 machine too. This project is being developed for the Federal Aviation Admisintraion (FAA) for Windows98 first edition based machines.
Well i developed this project with 4 activeX components and compiled this program and then used install shield to make a distribution of this program. When i installed this program on the WIN95A and Win98 machines they did not put the proper icon on the desktop. They inserted the MFC icon for its executable. That gave me an idea that soemything was wrong. After that i tried to run the program with double clciking on the icon and the hour glass ran and nothing happened. I found out that that machine had a 16 bit FAT partition so i tranformed that into 32 bit on the Win98 machine with its utility. Win95a u dont have this option ofcourse. I also used REGSVR32.exe to register the COMDLG32.OCX object. But this object in my instalation file was there without the DLL file. So i went ahead and registered that and it was succesful in registering. I rebooted as usual and nothing was working again. But the icon was correct this time. Well after that i decided to install VC++ compiler on that machine and saw that the project hada problem registering the AvctiveX Components. So i couldnt recompile the project on that machine to get this thing to run.
Well i am pretty much running out of options. I read afew articles that were online but i am a little puzzled. I need a little bit more insight and someone to tell me what exactly the problem is.
Thanks for your help
|
|
|
|
|
Without knowing a lot about the differences in Win95/Win98 versions, my biggest problem with OCX registration failing has always occurred when the OCX relies on DLLs that don't exist or are different versions in the system.
Have you used Depends.exe to have a look at what DLLs the OCX expects to find and made sure they are installed on the target systems?
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hello,
I could use a little help with a CListBox class I'm writing. I've been putting all sorts of code in the DrawItem function to make the List Box nice and pretty. Unfortunatly, I can't seem to change the background of the list box unless there are items in it. I.e., I've got three items in a list box that holds 10. The first three items will be my modified background color, but then the rest of the list box which isn't holding any items is just the default white. Another problem, probably related, is that I wanted to make the ListBox display the disabled color even when it contains no items (you'll noticed the default CListBox class gives no indication it's disabled unless there are items in it). Any thoughs/ideas?
-Dave
|
|
|
|
|
I think you can achieve this by handling (reflected) WM_CTLCOLORLISTBOX in CYourListBox.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks Tomasz, that's exactly what I needed. Just swap out the brush in there and it works perfectly...
Dave
|
|
|
|
|
Hi,
I've been writing application for Windows 95/98/Me which loads private DLL. In that DLL, I need to call functions in oleacc.dll that is not supported in Windows 95. To let single binary work on 3 different Windows, I tried Delayload option.
/delayload:oleacc.dll option seems worked, since dependency walker didn't show oleacc.dll is used. Though, when I tried to load my private DLL by LoadLibrary(), it failed. (I'm using LoadLibrary() and GetProcAddress() to control my DLL to handle any error regarding to this DLL.) And of course, it worked fine on 98/Me.
I'm quite sure any function belongs to oleacc was not called in DllMain(). If I commented out those functions, linker warned me that /delayload:oleacc.dll had no effect (which is supposed to be), and I could load my DLL.
So, for me, it looks like Delaylod won't work for DLL itslef. Thinking about a background of this mechanism, I can't understand why it didn't work.
Can anyone help me out? (Please forget about installing some optional kit on Windows 95, since my target is Japanese version and no one is available for that.)
I love Code Project, do you?
Kurotora
|
|
|
|
|
Hello, the codegurus around the world.;)
Actually, I can't understand your question very well.
However, if you try to use DelayLoadProfile.exe from Matt in MSJ,
DelayLoadProfile can't hook DLL calling from LoadLibrary as
some ppls pointed out DLL site of this CodeProject.
DelayLoadProfile only works for import table defined *.def to DLL.
But, we can hook LoadLibrary and GetProcAddress from kernel32.dll by DelayLoadProfile.exe.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Masaaki,
I'm not interested in Delayloadprofile.exe at all.
My question is, can DLL load another DLL when needed by using /delayload linker option as we do with EXE.
Getting idea?
I love Code Project, do you?
Kurotora
|
|
|
|
|
|
I'm quite sure any function belongs to oleacc was not called in DllMain().
Maybe there are some global objects with c'tors calling oleacc functions? What's the error code after LoadLibrary?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz,
o No, there is no such objects related to oleacc.
o LoadLibrary() returned zero.
I'm mostly giving up to make single binary work on 3 different Windows.
I love Code Project, do you?
Kurotora
|
|
|
|
|
LoadLibrary() returned zero.
Check the value returned by GetLastError. BTW: below you'll find the Win95-related note from LoadLibrary docs.
Windows 95: If you are using LoadLibrary to load a module that contains a resource whose numeric identifier is greater than 0x7FFF, LoadLibrary fails.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz,
GetLastError() returns 0x1f (ERROR_GEN_FAILURE).
Same code works on Windows 98 (but it could be loading oleacc).
Thanks.
I love Code Project, do you?
Kurotora
|
|
|
|
|
There's a KB article Q200767 dealing with ERROR_GEN_FAILURE and LoadLibrary. However, it applies to both Win95 and Win98.
Last idea: try adding /delay:nobind to linker options.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Tomasz,
/delay:nobind option didn't work.
Thanks anyway.
I love Code Project, do you?
Kurotora
|
|
|
|
|
Is it possible to subclass the CListCtrl in a CListView?
When I try it from CListView::OnCreate(), it fails while inside the Attach() function. The error indicates that the control has already been subclassed?
I have seen many articles on the web that say you need to derive from CView instead of CListView (and add a CListCtrl member), and move the CListCtrl to cover the view. Is this really the only way to use your own CListCtrl in a CListView?
|
|
|
|
|
CListView is a wrapper over Win32 list control, the control is already subclassed for you by MFC. Just handle the messages in a CListView derived class. You don't need a child CListCtrl, unless you plan to reuse it as a control (not a view) in the future.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hello,
I have a tree control that I would like to do in-place editing of the labels. But, I only want to be able to edit certain levels. I currently have a context menu that gets enabled when on the appropriate level and calls myTree.EditLabel(sHItem) which is exactly what I want. However, when I check "Edit Labels" on the tree control in the resource tab, everything is editable. If I don't check this, then I crash when I call EditLabel(). Is there a way around this?
Assuming I get everything working, I have a couple more questions. How do I capture once the user is done editing. I may want to prevent them from renaming or provide a warning message if they proceed. The problem I see is each level has different contraints that I have to handle. Do I have to provide all the logic for each level in the OnEndlabeledit() handler?
Thanks in Advance!
Derek
|
|
|
|
|
However, when I check "Edit Labels" on the tree control in the resource tab, everything is editable.
Handle TVN_BEGINLABELEDIT notification. Return TRUE to cancel label editing.
How do I capture once the user is done editing.
TVN_ENDLABELEDIT, wrapped by OnEndlabelEdit handler. Return FALSE to reject the edited text and revert to the original label.
Do I have to provide all the logic for each level in the OnEndlabeledit() handler?
Yes.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Thanks - I worked through some of that, but you confirmed my suspicions!
I have a new problem related to this. If I only want to allow in-place label editing from a right-click context menu - say "Rename", how do I do this and not allow the tree to do the in-place editing as well. What I'm looking for is the same functionality as in regedit.exe and the right-click "Rename" command on a key, value, etc.
You've helped me in the past and I truly appreciate it!
|
|
|
|
|
how do I do this and not allow the tree to do the in-place editing as well.
Just handle TVN_BEGINLABELEDIT. Check the HTREEITEM and decide if editing is OK - if not, return TRUE to disable it.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I'm already enabling/disabling the appropriate tree levels in the OnBeginlabeledit() method, so what would the HTREEITEM structure give me? I only want the right-click menu to allow the in-place editing.
I'm wondering if I should set a flag (kludge) in my OnRename() method and then check for it in the OnBeginlabeledit() method.
|
|
|
|
|
What is meaning of the "X" in "AFX"?
Thanks.
Maer
|
|
|
|
|
"Application FrameworX" AFAIK
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Thanks my pal.
What I do not understand is the meaning of "X"?
Can you help?
Thanks.
Maer
|
|
|
|