|
I have a dialog in a DLL that I need to set to the system tray. Is that possible and if o how can I do that?
|
|
|
|
|
You mean real dialogs? Like quicklaunch bar?
Don't try it, just do it!
|
|
|
|
|
Yes a real dialog.
I have a dialog window in my DLL file and I want to send that dialog do the system tray is that possible?
|
|
|
|
|
Do you want a tray icon which activates a dialog on click, or a deskband? It's not clear what you mean.
--
Arigato gozaimashita!
|
|
|
|
|
For your information guys ,
Quick launch bar is not in system tray , it is on taskbar. System tray is the area where system time is displayed.
You need to add just one icon there and your application will get notified when user clicks/dblclicks on that icon. Then you can display a dialog box.
See Win32 API called Shell_NotifyIcon in MSDN for more help.
|
|
|
|
|
Here's an article[^] that covers this. Try using the search function (available on every page of Code Project) using "system tray" (including the quotes) as the search phrase.
Software Zen: delete this;
|
|
|
|
|
Is there a way to capture the pressing of a KB key in a CDialog item? The usual handler (ON_WM_KEYDOWN) don't work at all. Thanks!
|
|
|
|
|
By default, most keypresses within a dialog are going to be processed by the control within the dialog that has the focus. For example, if you've got a check box, an edit control, and a button within the dialog, one of those controls will process keypresses if they've got the focus.
Software Zen: delete this;
|
|
|
|
|
Yes, I know that but I thought that there's a direct way. I don't know how to send the message from the control to the dialog. I tried with SendMessage() (in OnKeyDown() of my control) but I'm not sure for the way to refer to the dialog and the right set of parameters. Could you give me some example? Thanks in advance!
|
|
|
|
|
Hi everyone, I have a problem with linking COM interface and class ids from my own COM server dll.
The class is called CLSID_TestInterface.
It is declared in a machine generated header file called atlcom.h:
EXTERN_C const CLSID CLSID_TestInterface;
The definition is (also machine generated .c file):
MIDL_DEFINE_GUID(CLSID, CLSID_TestInterface,0x50DC50D4,0xAE1E,0x4B05,0x84,0x99,0xF2,0xFE,0x2F,0xEF,0xA8,0xD2);
When I include atlcom.h in the client app and use the class id for CoCreateInstance then there will be this linker problem:
... unresolved external symbol _CLSID_TestInterface ...
My question is:
Where does the compiler get the class id of a client server dll from? / What am I doing wrong?
Don't try it, just do it!
|
|
|
|
|
You'll also need to include the .c file too, as this is the file that defines the value of the CLSID.
Sorry talking crap.
From MSDN
SUMMARY
A GUID must be initialized exactly once. For this reason, there are two different versions of the DEFINE_GUID macro. One version just declares an external reference to the symbol name. The other version actually initializes the symbol name to the value of the GUID. If you receive an LNK2001 error for the symbol name of the GUID, the GUID was not initialized.
You can make sure your GUID gets initialized in one of two ways:
If you are using precompiled header files, include the INITGUID.H header file before defining the GUID in the implementation file where it should be initialized. (AppWizard-generated MFC projects use precompiled headers by default.)
If you are not using precompiled headers, define INITGUID before including OBJBASE.H. (OBJBASE.H is included by OLE2.H.)
Although personally, I'd recommend using the COM smart pointer method via #import as I find it a much cleaner way of using COM
Michael
CP Blog [^]
|
|
|
|
|
|
In my application I trap the end of entering text in an edit control with an OnKillfocus... function. When I press the ENTER key the commands in the OnKillfocus... function are executed but then my entire application terminates. I use GotoDlgCtrl(...) to set the focus to another control which works but then the application terminates. Do I need to trap the ENTER key and do something else? Thanks.
|
|
|
|
|
Is it a dialog-based application ?
If so, then pressing Enter is the same thing as clicking on the default button, which generally is Ok. What happens is that when you press Enter, the focus first moves from the edit box to the default button (thus firing the OnKillFocus event) and causes a click on the default button, thus terminating the application.
To fix this, change the default button of your application to something else. Alternatively, you can trap the enter keypress (WM_KEYDOWN event) or override the default OnOK handler, omitting the call to CDialog::OnOK, which will terminate the dialog.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Thank you very much. That's kinda what I thought was going on but wasn't sure how to deal with it. Thanks again.
|
|
|
|
|
Dear:
I wondering what is the best technique to do with ISAPI filter to determine user trends when visiting web site .
so I can determine if user scraping my site or s/he just observing normaly.
Regards
|
|
|
|
|
Dear all,
I am looking for .DBF file format descriptions. I want to write an empty DBF file header, which contains only column informations (how many columns does a record contain, what is the type of each column). I am wondering where can I find descriptions for each field (bit/byte) of .DBF file. And where can I find free and open source libraries which can be used to generate .DBF file according to column informations. I am using .DBF for Visual Foxpro 6.0.
Thanks in advance,
George
|
|
|
|
|
Hi,
I am using ClistCtrl in my project, I use a large icon (100 x 100) pixel,
I want to draw a text on the icon.
Can any one give me a manner to do this.
Thanks in advance.
|
|
|
|
|
Hello friends,
Whenever we Click an Image present in the ListControl, the image will be shown as selected by selecting the whole image and displaying in some color. But I want to display on Border to be displayed whenever I click the image. Somewhat like the ThumbNail View in the Windows Explorer. there if we selected any directory then only the directory will be focused by displaying the border in blue color.
Thank you,
Bye
|
|
|
|
|
I want to create MDI app which is going to start with dialog, not with child frame on start up. If I use the Wizard to create the MDI app, and start the application, I get the child window opened on start up and I don't know how to remove it.
I want to go to the File menu, chose New option and start the dialog, not the child window.
Help me please!!!!!!!!!!!!!!!!!!!1
Thanks in advance!!!!!!!!!!!!
|
|
|
|
|
Try
cmdInfo.m_nShellCommand = CommandLineInfo::FileNothing;
after
ParseCommandLine(cmdInfo);
within the InitInstance()
MfG
Gérard
|
|
|
|
|
Thanks for answer.
I'll try it, and I'll see if it works.
Thanks again!!!!
|
|
|
|
|
Hi Guys,
i've derived a class from CRecordset like so
=========================
class myrec : public CRecordset{
myrec():CRecordset(&MyDatabase){/*do stuff etc*/}
============================
lets say I have a member function called AddCustomer(); //yes i know
the function needs to call CRecordset::AddNew() or CRecordset::Edit() (inherited from CRecordset) like this:
===========================================
BOOL myrec::AddCustomer(Customer & xr_Cust){
//for clarity
if(CanAppend()&&IsOpen()){
TRY{
AddNew(); //on some systems folowed by Requery()
this->Number = xr_Cust.Number();
this->Name = xr_Cust.Name();
etc etc
=========================================
BOOL myrec::EditCustomer(Customer & xr_Cust){
if(CanUpdate()&&IsOpen()){
TRY{
//put curser at right record, then:
Edit();
this->Number = xr_Cust.Number();
this->Name = xr_Cust.Name();
etc etc
==========================================
in all the examples i've seen are like this:
CRecordset x(CDatabase * bla_bla);
x.AddNew(); //or .Edit()
x.field_in_database = "hello";
i'm not sure how it does this since x does not have a member field_in_database, the database does!
so how are we accessing it using the dot operator? (no it's not overridden, i think);
and even if it did work in their examples it certainly does not in my derived class when i try this:
==============================================
this->Number = xr_Cust.Number();
==============================================
it simply tells me that "Number" is not a member of CRecordset or my derived class (and quite rightly so!)
so if anyone can tell me how to use Edit || AddNew in functions of a derived class please post or e-mail me at:
psycode@webmail.co.za;
please please please!!!!
Consistency is the last refuge of the unimaginative.
Oscar Wilde
|
|
|
|
|
Hello 0100110110,
when you derive a class from CRecordset (or CDaoRecordset) using the Class Wizard it automatically implements the so called DFX mechanism for the exchange of field data between the database table and your recordset class. For each field of the record on the data source the DFX mechanism creates a member variable in the recordset class. I think thats what you are searching for.
Hope this helps
MS
|
|
|
|
|
Hi,
In my application, I've got a multiline edit control, and I would like to be able to dynamically remove/add the horizontal scrollbar. I tried by simply changing the style:
SetWindowLong(hLog, GWL_STYLE, GetWindowLong(hLog, GWL_STYLE) & ~WS_HSCROLL);
Unfortunately, the scrollbar disappears but the space it was using is still there (looks like a disabled area). I've tried to call RedrawWindow() but that doesn't work.
I would just like the edit control to looks like it was created without the horizontal scrollbar.
Any idea?
|
|
|
|