|
Check the value of the pScrollBar pointer passed into your view's OnHScroll() handler. It will be NULL if the scroll message was generated by the view's own scroll bars, otherwise it will point to the control that generated the message (the lparam value in the SendMessage()).
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
|
In the second link, he has a docking toolbar. By defaut its showing up at the bottom of the MDI app, near the status bar> i want it to be near the top toolbar, docked in the remaining space alongside it (my custom toolbar has two controls in it). How do I get this to happen? It looks pretty awful sitting at the bottom...
Thanks,
ns.
|
|
|
|
|
My mfc mdi app has 15x15 or 16x16 toolbar button pictures in it. I'm looking for this size picture for Brightness and Contrast functions. I usually cut and paste from the customize toolbar menu.
Any links or know where I can get it? If its in an ico file, I dont know how to grab it and paste it on the button.
Thanks,
ns
|
|
|
|
|
Why not grabbing such common pictures from other apps? Common icon pictures are not copyrighted. Make a screenshot (press the Print key on your keyboard), paste into a new Paint bitmap, use Zoom, copy the icon and paste it in MsDev.
|
|
|
|
|
I found out how to adda combobox to the toolbar. so its the same to put in a generic class in the toolbar - say a slider. I really want a spin-edit buddied up pair in the toolbar. How do I insert that? I am referring to http://www.codeproject.com/docking/toolbarcombo.asp?
If I cant figure this out I'll have to use a slider which I'd rather not, because it mnight not look so good if its not dockable separately, ....
Any links or ideas?
Thanks,
ns
|
|
|
|
|
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 ?? ??
|
|
|
|