|
Hi,
I added some buttons to the standard toolbar in my mfc MDI app and want to have tooltips on hovering. Can someone please point me to a link on how to do this (programmatically or manually)?
Also is there any MFC sample code for adding a spinbutton+ buddy edit ctr lto the toolbar? Actually if I can see how to get the spin-edit to work, I can incorporate it with the article on embedding non button ctrls into the toolbar.
Thanks,
ns
|
|
|
|
|
Adding tooltips to toolbar buttons in MFC is damned easy. Let's say you have "Paste" button to paste clipboard contents. The button command ID is ID_EDIT_PASTE. Then you should create a string with the same ID (ID_EDIT_PASTE) and assign it a value "Insert Clipboard contents\nPaste". Note that the string consists of two lines separated by line feed symbol ("\n"). The second line provides information for the button's tooltip.
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them.
Jack Handey, Deep Thoughts
|
|
|
|
|
That was like magic!!!! Thank you so much! WHats the purpose of the first part:
"Insert Clipboard contents".
Does it show up anywhere?
Thnaks a bunch. That was easy like you said!!!
|
|
|
|
|
ns wrote:
WHats the purpose of the first part:
"Insert Clipboard contents".
Does it show up anywhere?
Yes it does. It will be shown in application's status bar.
Thanks a bunch.
You're welcome.
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them.
Jack Handey, Deep Thoughts
|
|
|
|
|
|
Hi all,
I am receiving the following error:
error LNK2019: unresolved external symbol __imp__FindCloseUrlCache@4 referenced in function "public: __thiscall cache_iterator::cache_iterator(void)" (??0cache_iterator@@QAE@XZ)
I am working on WinXP, VS.NET C++. I am trying to compile Win32 project with reference to the WININET.H file.
I have tried the following:
#include <wininet.h>
#include "wininet.h" //copied wininet.h to same directory as file being compiled
#include "D:\Program Files\Microsoft Visual Studio\VC98\Include\WININET" //use full path
none of the above work, I used \VERBOSE:LIB to verify compiler wasn't linking the library
There seems to be something I am overlooking, please help??
Thanks in Advance.
Soliant | email
"The whole of science is nothing more than a refinement of everyday thinking." -Albert E.
|
|
|
|
|
Did you check that you actually linked the library? The error is either missing library in input library list or wrong method decoration (for example, not using 'extern "C"').
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them.
Jack Handey, Deep Thoughts
|
|
|
|
|
It's a linker problem, and therefore not a "#include" problem...
You need to link with Wininet.lib, you can do that either in the project settings, or by typing #pragma comment(lib, "Wininet.lib") in the sourcefile...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
In my neverending struggle to eliminate all overhead, I recently chose to do without the default libraries in my application, resulting in the following errors:
main.obj : error LNK2001: unresolved external symbol ___CxxFrameHandler<br />
main.obj : error LNK2001: unresolved external symbol __except_list
How do I get rid of them? What am I still using that needs these functions? And how on earth am I ever going to replace the recently thrown out *operator new in my application that I use every twenty lines?
Regards,
Georg-Hendrik Haan (.NL)
|
|
|
|
|
Georg Haan wrote:
In my neverending struggle to eliminate all overhead, I recently chose to do without the default libraries in my application
the linker is smart enough to only pull functions that it actually needs to build your app. you can link to every .LIB on your system yet your EXE will still only contain what it needs.
-c
For men use, if they have an evil turn, to write it in marble:
and whoso doth us a good turn we write it in dust.
-- Sir Thomas More
|
|
|
|
|
Hi there,
Is there any BETTER way to empty a lisbox ?
I used of this code:
while( m_List.GetCount() )
m_List.DeleteString( m_List.GetCount() - 1 );
Almost, I added 30,000 strings to the lisbox, and this code works LOW !
And I just NEED SPEEED
Please help me !
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
CListBox::ResetContent ().
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
|
How do i list connections in my program like Netstat does?
Kuniva
--------------------------------------------
|
|
|
|
|
|
Hello, the codegurus around the world.;)
Accroding as Network Programming for Microsoft Windows, P548,
The NETSTAT.EXE utility displays the TCP connection table, the UDP listener
table, and the IPv4 ptorocol statistics on your computer. The function used
to retrieve this information work with Windows NT 4.0 (SP 4 and later),
Windows 98, and Windows Me.
So, check the following functions.
DWORD GetTcpTable (
PMIB_TCPTABLE pTcpTable,
PDWORD pdwSize,
BOOL bOrder
);
typedef struct _MIB_TCPTABLE
{
DWORD dwNumEntries;
MIB_TCPROW table[ANY_SIZE];
} MIB_TCPTABLE, *PMIB_TCPTABLE;
typedef struct _MIB_TCPROW
{
DWORD dwState;
DWORD dwLocalAddr;
DWORD dwLocalPort;
DWORD dwRemoteAddr;
DWORD dwRemoteProt;
} MIB_TCPROW, *PMIB_TCPROW;
DWORD GetUdpTable (...), typedef struct _MIB_UDPTALBE,
typedef stuct _MIB_UDPROW, DWORD GetIpStatistics(...)
typedef struct _MIB_IPSTATS...
Good Luck.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
How do you determine where a safe break point is?
When I placed a break point at this line of code, my computer had a brain cramp and I had to reboot.
void CTPclassDlg::OnAdd()
{
CString sTmp; // break point on this line
// other code here ...
}
can someone explain?
Thanks
|
|
|
|
|
Taking a guess, something higher up in the call tree has corrupted the stack. If you had to reboot, does this mean you're developing on Windows 98/ME? When debugging under Windows 2000/XP, you usually don't have to reboot just because of an application error like this.
Gary R. Wheeler
|
|
|
|
|
Hi Gary,
Yes I am using ME.
If I move the break point down a couple lines to where I declare an int, the debug works fine. I was wondering if it had something to do with the CString. But then again, the program execution should stop befor the line is executed.
Simply moving the breakpoint would have nothing to do with corrupting the stack. Right ?? ??
|
|
|
|
|
Hmmm. When I have odd behavior like this with the debugger, I usually try and do a 'rebuild all'. If the source code and the object code are out of sync, the line you think you've placed the breakpoint on in the source does not necessarily match the place in the object code where the breakpoint instruction is inserted. This can cause all sorts of unusual behavior.
Gary R. Wheeler
|
|
|
|
|
Sometimes even this doesn't work. I've just had a really bizarre one where stepping over 'xor ecx, ecx' in the disassembly of 'char u[10] = "1";' caused an access violation. Access Violation on a register????? Maybe I'm missing something but that's not supposed to happen as far as I know. I ended up having to re-create the .dsw from scratch. Dropping the same source in and setting the same proj options (as far as I know) made it work just fine.
Strange but true.
==========================
i1.2sqrt(u).bcos(ur)sec(c)
but
b4.isqrt(u).ru/16
Navier
==========================
|
|
|
|
|
Just found out what *my* problem was. I had a watch set on one of my vars: 'what.size()'. Removing this makes everything work just fine. Maybe a bug in the VC6 debugger(?) Something for you to try anyway....
==========================
i1.2sqrt(u).bcos(ur)sec(c)
but
b4.isqrt(u).ru/16
Navier
==========================
|
|
|
|
|
Well, since this is probably the simplest sort algorithm, you should be able to figure it out. Otherwise, look here[^]
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
If you're in a war, instead of throwing a hand grenade at the enemy, throw one of those small pumpkins. Maybe it'll make everyone think how stupid war is, and while they are thinking, you can throw a real grenade at them.
Jack Handey, Deep Thoughts
|
|
|
|
|
There is a probelm regarding the compaction of database. I have a database in ms-access on which i have performed some operations programatically. But When i try to compact the database using the compact database utility It is giving me errors such as "Record(s) can't be read; no read permission on <name>" error 3112 . Can anyone suggest some solution for it. I will be grateful .
Samir Sood
|
|
|
|
|
Hi,
I would like to know what happens exactly when you post a form in internet explorer. I mean, i know that internet connects to a server to retrieve webpage data and to send other data but i'd like to know what it does when you post a form. Does it make another connection? How is the data of a form sent, is this a protocol? If anyone knows a place where i might learn this, please let me know.
(the purpose is so my application can send submit forms through a direct tcp connection instead of having to insert an IE active-x control or something)
Thanks
Kuniva
--------------------------------------------
|
|
|
|