Well, I tried searching for lots of things. I searched for "C++ Under the Hood", "Paul DiLascia", "Paul DiLascia taskbar", "taskbar", and "taskbar replace", as well as all the other searches I have tried in recent days, but have come up empty handed. Any other info you can give me to help me find it? Thanks
Diarrhio
Posts
-
Mimicking system tray -
Mimicking system trayI'm trying to write a plugin for a freeware taskbar replacement application, which would duplicate the functionality of the system tray. i.e. I need to know whenever icons are added/updated/removed from the system tray, and ideally whenever tool-tips appear. I've snooped around here and MSDN a bit and can't find anything related to how to do this. Closest thing I've found is http://www.codeproject.com/shell/ctrayiconposition.asp, but it's of no help. I am guessing some sort of system hook is what I will need to resort to, but I'm not quite sure if that is the case. Does anybody have any experience with this? Thanks, D
-
VC6 Project dependencies and project configurationsIn case anybody is interested... i figured this out (it wasn't easy). VC tries to do a name match between project configurations. If one project is dependant on another, and the other project doesn't have a configuration with an exact name match as the dependant one, it will do a "best guess" name match. In my case, my main project configurations were: Main - Win32 Main - Win32 External Main - Win32 Eval Sub - Win32 Sub - Win32 Eval When compiling, Main - Win32 External, it looked at all the configs in Sub to try and find a match. Since it couldn't, it picked the closest match, which was Sub - Win32 Eval, and tried to compile it (which is not what I wanted). So I changed the names to: Main - Win32 Exec Main - Win32 External Main - Win32 Demo Sub - Win32 Exec Sub - Win32 Demo and everything worked beautifully. Now when compiling Main External, it will find that the config name matches more closely to Sub Exec then Sub Demo. One of those undocumented features, I guess.
-
VC6 Project dependencies and project configurationsHi Michael. The way I have it set up is my main project (Main) has 3 configurations: Internal, External, and Eval (internal is a private build for our company, external is the version we sell to the outside world, eval is a demo/trial build). Main is dependant on Sub (a dll/lib pair). Sub only has 2 configurations: Full and Eval. It doesn't make a distinction between Internal and External because there is no need to. So, Main-Eval should link with Sub-Eval, and that is working just fine. And Main-Internal is linking properly with Sub-Full. The problem is that when I go to build Main-External, VC thinks it is dependant on Sub-Eval. In Main-External's project settings, I have it linking with the Sub-Full.lib, which I don't think VC is paying any attention to... it is just taking a guess at which of the two Sub configurations Main-External is dependant on. I was hoping that the "Allow per-configuration dependencies" check box in the project settings would alleviate this, but it doesn't. If it is not possible to do something like this, let me know. It would be a bummer, but at least I would stop cursing MS up and down as I have been for the past week. Thanks. D
-
VC6 Project dependencies and project configurationsI am having difficulties getting VC 6 to honor the dependencies between projects with different configurations. Here is what I am running into: Project Main has 3 confugrations * C1 * C2 * C3 Project Sub has 2 of the 3 Main configurations * C1 * C3 When I go to build Main project C2, which is trying to link with Sub project C3, VC insists on building Sub project C1 instead of C3. I have searched high and low for a way to specify this, w/o any luck (obviously). I have the dependencies set up properly using the dependencies dialog. In the project settings, there is a check box for "Allow per-configuration dependencies" but that seems to operate on files, not on projects. Please help :doh:
-
DLL questionWell, I finally got it figured out, in case anybody is curious. The compiler directive should be dllexport when compiling the dll, and dllimport when compiling the exe. #ifdef _DLL_ #define DLL_GLOBAL __declspec(dllexport) #else #define DLL_GLOBAL __declspec(dllimport) #endif
-
DLL questionI am creating a dll (non-MFC). I am getting linker errors from the .exe that is trying to link with it. The linker is complaining about the static class variables, unresolved external symbol. How am I to "decorate" them? I've tried using __declspec(dllexport) but haven't had much luck. Thanks
-
San Francisco and YosemiteAlso be sure to check out Golden Gate park, which has nice botanical, rose, and tree gardens. Cheesecake Factory is a chain restaurnt. The food is good and the portions are big. If you want some food that is more local (i.e. no tourists), be sure to check out: Thai/Asian food: Citrus Club (in the Haight) Neecha: (Thai food, on corner of Sutter and Steiner) Nirvana: (Asian fusion, in the Castro - the gay part of town). Italian: Any restaurant in North Beach. I'm sure others can chime in with their favorites. As for Yosemite, it is about 3-4 hours away, and it will be cold. I've never been there in the winter, so you should check out their website to see if any part of the park is closed. You can also go to Lake Tahoe, which is also 4 hours away. Tahoe has some world class ski resorts. Have fun :)
-
Tool Tip WeirdnessI am experiencing a very strange problem. When my MFC app is run, all of the Tool Tips in our program, as well as all Windows Tool Tips show the tip of the *last* tool that was hovered over. Here is what happens upon program launch. * The first toolbar button that I hover over doesn't get drawn. Actually, it's shadow gets drawn, but the tip itself doesn't draw. * The next toolbar button that I hover over gets drawn with the text of the first button that I hovered over. * The width of the Tool Tip is wide enough for the text of the "correct" text, not the width of the "incorrect" text which is being displayed. * This goes on and on until you hover off of a button onto some dead space, and then hover over it again, in which case, it will show the correct tip, but goes wacky again once you hover over another button. * All Tool Tips on the system get screwed up like this until the app is shut down. Thus, there seems to be a "lag" or mismatch bewteen what is being displayed and what the correct tip should be. To try and get to the bottom of this problem, I have commented out all Tool Tip related code from my app, including Tool Tip flags passed to controls such as Tree controls, etc. I have also tried commenting out any other "non-standard" things that I am doing. All of my users are experiencing this. I have tried creating a new blank app using AppWizard, but could not duplicate the problem. Does anyone know what this might be related to, or what I might have done wrong to screw things up? If not, does anyone have any info on how to debug something like this, or where I can even trace/step through the code to find out what is going wrong and where. Thanks Dario
-
Placing a control in an edit control's NC areaI've looked all around CP and MSDN for a way to place a control (e.g. a button) within an edit control's non-client area, but haven't had any luck. All of the implementations I have seen haven't really placed controls there, but have just mimicked the control by resizing and painting the NC area. Like this: http://www.codeproject.com/editctrl/fileeditctrl.asp[^] I tried just placing the control in the client area, but it gets painted over as soon as the user clicks in the edit box, which is ugly. Can someone point me in the right direction? Thanks.
-
Getting the Display Name of a file ExtensionThanks, Shog.
-
Getting the Display Name of a file ExtensionDoes anyone know how to get the Display Name (e.g. "Microsoft Word Document") from a given extension (e.g. "doc"). I can't use ShGetFileInfo, because that requires a file you want information for. I won't have a file, just an extention. Thanks!
-
Outlook syncronizationHey all, I am writing a little utility which will syncronize data with the Outlook Task folder. I am using MFC. I have done some searching on how to do this, but most of the info I have found on the net and on MSDN is using VB, which I can't use for my purposes. Can any of you point me in the right direction, please? Thanks!
-
How to programmatically disable screen saver?Look up SystemParametersInfo in MSDN. There is a section on screen savesr.
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCExactly. That is a great book. It's where I got most of my MFC knowledge.;P
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCWell, that is what I was gonna ask you. You might want to the dialog to be modeless. You can still do that with a class derived from CDialog. Just call Create on the dialog instead of DoModal. After you call create, you can access all the controls in the dialog from outside the dialog itself (i.e. from the View). Be sure to create the dialog on the heap using new rather than creating it on the stack. You also have to destroy the dialog yourself when you are done with it. Also be sure to override OnOK and OnCancel in the modeless version of the dialog and comment out the calls to the base class version. Dialogbars are also cool, but they don't sound like what you need. A modeless dialog should be just fine. Dialogbars also require a bit more overhead in your code. Good luck
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCYes. There are a number of ways to do this, and most depend on the nature of the work you are computing. The best choice would be to create a worker thread to accomplish the task you want to process, and if they cancel key gets pressed, just kill the thread. This will allow your UI to still be responsive while the task is being completed. But threading is tricky, and it sounds like you are newer to MFC and possibly C++. Another possibility is avoiding creating your own dialog and just use one like Chris Maunder's found here: http://www.codeproject.com/miscctrl/progresswnd.asp This is the simplest approach, but it isn't multi-threaded, and thus, your program will seem unresponsive until the point in your loop where you check to see if the cancel button was pressed. Then all you have to do is just break out of whatever loop you are using to do your work. D
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCOk. I see what you are trying to do. You need to create a class for your dialog (by deriving from CDialog. Use Class Wizard), and do all of this in there. None of the controls for your dialog have been created when you are doing your loop. They don't get created until you call DoModal, and they get destroyed by the time DoModal returns. When I say created and destroyed, I don't mean the object gets destroyed. Rather, the Handle to the control that the progress control object wraps is destroyed. And you the functions that you are calling are thin wrappers to API calls using the Handle. Thus the crash. So, as I said, create a class for your dialog. Add the control to the class using class wizard. Also add a button to the dialog, and add a button clicked handler. Then, when the button gets pushed, add your for loop in the button handler. Hope that helps.
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCWhen do you want to update it?
-
Initializing a CProgressCtrl Object Inside CDialog :: MFCYou don't need to call Create on an object that you added in the Resource Editor, the Framework does that for you automatically. Where are you getting the ASSERT's?