|
My application has one usercontrol which act as drawing canvas. Here's how it works.
First user selects bitmap to be loaded, which gets painted in usercontrol hosted on form. Then, User draws basic shapes like rectangle, circle on drawing canvas to specify :-Dcertain areas of bitmap. Now, the problem is when user draws first shape after selecting shape type from toolbar, form shifts a bit up. After doing a bit of google I found that autoscroll propertly is bit tricky, and I have this propertly set to true (bcoz user may load a larger image than a drawing canvas).....So, Do I need to set some code in UserControl_Paint event or Form_Paint event....
Any help regarding this would greatly be apprciated...
REgards.
MaulikCE
Life is a game, full of surprises.
|
|
|
|
|
I HTML there is character representation in form xx. I can get hex value of the character but how to replace xx with character.
|
|
|
|
|
Hi,
I am researching the ability to build an IE toolbar that will allow IE to block a user from loading a site based on the IP address of the domain the user is browsing to.
I have found a variety of information relating to IE toolbars, but nothing really about this topic. I tried popup blockers, but this just prevented new windows.
Anybody got any tips on this or links to articles/source?
Thanks
Mark
|
|
|
|
|
Hi
You can filter web content either at your proxy/gateway (by installing some 3rd party content blocker) or try to prevent it on the client (which sounds more like what you're trying to do).
The first option is (in the standard internet kiosk scenario) the better of the 2 - relieves the client app from content filtering - ie. do you want to re-compile/-configure the clients when filter rules change or just the central server.
With the second option, I assume you're talking about general hosting of the IE control (???) With this I've found that implementing IInternetSecurityManager (and accompanying interfaces - see Security Zones in MSDN) in the host application is the most comprehensive - gives you not only facility to inspect URLs as they are visited, but control activating scripts, etc - ie. programmatic control of all the standard features available in the IE Security Options.
HTH
Martin
|
|
|
|
|
Cool, thanks for the "link".
What I'm actually trying to do is develop a IE toolbar control that will sit inside the standard IE interface [i.e like the GoogleBar], and each time IE requests a URL, it matches to domains IP address against a list of banned addresses, if it is on the list the request is denied.
Hence, I cannot use proxying, as the client must continue using its standard proxying mechanism.
I read up about TInternetSecurityManager in MSDN. It seems to be I can only implement a custom handler when I host MSHTML in an application of my own, like on say a dialog in an MFC application. For BHO's in IE itself, I can only ask the SecurityManager to authorize an action using IInternetHostSecurityManager::ProcessUrlAction.
Is one able to do filtering at a BHO level?
|
|
|
|
|
OK - I see what you're doing.
I'm not familiar with BHOs - but would guess they don't get much vote - on the basis that since the hosting environment is customizable through IInternetSecurityManager, it implies you're pretty blocked-out from anywhere else - as you've found out by being on the wrong side of the ProcessURLAction method.
Maybe setting the zone as a whole when the toolbar is active will give you what you want - the zone is customizable and can be published to the Registry I believe. Using IInternetSecurityManager::SetZoneMapping ?
Even more hacky, would be to trap DWebBrowserEvents2::BeforeNavigate2 and cancel the navigation (...I'm going to wash my mouth out immediately for saying that...).
Martin
|
|
|
|
|
Hi,
My question is really two-fold, I'm more looking for direction that actual code answers!
First, I want to use display a clock in my applicatio that uses an atomic clock to sync its time with. What is the recommended way to do this/links to useful info?
Second, I also need to display the time of other timezones, say I'm in LA, and want to diplay the time for London and NY. Does any body have links to information on how one would go about determing the time in other timezones,area. My biggest issue is with how the user can pick his location and how the software knows the timezone/etc at that location?
Many thanks in advance,
Mark
|
|
|
|
|
Hi
I'll only comment on the second part of your question. You'll have to enumerate the time zones and their offsets from a reference zone (eg. US Pacific time is -8 hours from GMT) and then apply that to what you believe the time to be in the reference zone - eg. if it's thought to be 10:23am in London (GMT being your reference zone for example), assume it to be 10:23am - 8 hours in California, and so forth.
Roughly it means that if you change the time on the London machine, the times in all the other zones change.
HTH
Martin
|
|
|
|
|
At the moment I have a Menu Resource with a "Languages" so when a user clicks it, it will change the language to whatever they select, However its all typed in the resource.
What i've been trying to do is get it to scan the /languages/ folder and add item's to the menu acordingly..
I'm not sure if this is possible with WTL or not? and if it is how would handle the clicks?
Thanks..
|
|
|
|
|
I Have two buttons on a form, when i click one i want the other one's style to change to WS_EX_STATICEDGE
I've tryed using:
CButton m_Ok;
m_Ok.Attach( GetDlgItem(IDC_TEST) );
m_Ok.ModifyStyleEx(0,WS_EX_STATICEDGE, 1);
m_Ok.Detach();
On the click of the first button, but it doesn't work.. How would you do this (if you can?)
Any Help would be greatly appreciated, Thanks.
|
|
|
|
|
|
|
Hi,
I am building a simple deskbar.
The deskbar consists of a toolbar as its main window.
On this toolbar is a edit box window, and next to that a toolbar with a single button with the combo-box drop-down style.
The toolbar window class is:
class CMyBar: public CWindowImpl<cmybar>
{
public:
DECLARE_WND_SUPERCLASS(TEXT("MYBAR"), TOOLBARCLASSNAME)
...
}
The problem is when the mose is not hovering over this toolbar button, its background is always rendering black. In practice of course I want it transparent, so one sees the toolbar below it.
I tried applying the style
DWORD dwStyle =
/*Window styles:*/ WS_CHILDWINDOW | WS_CLIPSIBLINGS | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP |
/*Toolbar styles:*/ TBSTYLE_TOOLTIPS | TBSTYLE_FLAT | TBSTYLE_TRANSPARENT | TBSTYLE_LIST | //TBSTYLE_CUSTOMERASE |
/*Common Control styles:*/ CCS_TOP | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE ;
but this makes no difference what so ever.
Does anybody have any ideas how I could stop this from happening?
Thanks in advance,
Mark
|
|
|
|
|
i had added the button in outlook Express but the button turns invisible when New Button( for New Mail Message) is clicked on second menu bar in outlook.I want the button to remain visible as before.
Plz help
Thanks in advance
devom
|
|
|
|
|
I am having a database application which talks to any kind of databse. I tried to fetch the data from a table and insert into another. I am new to OLEDB. I am able to insert a interger value but not a string value. I am using CDynamicAccessor class. I read in MSDN that there shud be a special handling for string data which am nt able to do. Please help me out.
Thanks in advance
Chitra
|
|
|
|
|
Serach FOR Browser Helper Object or BHO in you LOCAL copy of MSDN.
or read more about IHTMLElement2
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
|
Can somebody explain the following construct and when would you use it?
GetSize().foo = NULL;
thanks...
Happy New Year...
sun.lcr
|
|
|
|
|
When GetSize() returns a reference to an object, and .foo is a pointer?
--
Weiter, weiter, ins verderben.
Wir müssen leben bis wir sterben.
I blog too now[^]
|
|
|
|
|
Thank your Jorgen,
Could you show me a sample of how you would set that in a class and its use...
Thanks again...
Happy New Year...
sun.lcr
|
|
|
|
|
struct Y {
void* foo;
};
class X {
Y obj;
public:
Y& GetX();
};
X x;
x.GetX().foo = NULL;
--
I got nasty habits. I take tea at three.
-- Mick Jagger
I blog too now[^]
|
|
|
|
|
Who can help me?
#include "stdafx.h"
template<class T>
struct S
{
int qqq;
friend bool operator< (const S<T>&t1,const S<T>&t2);
};
template <class T>
bool operator< (const S<T>&t1,const S<T>&t2)
{
return true;
}
int _tmain(int argc, _TCHAR* argv[])
{
S<int>s;
S<int>s2;
bool uintb = s2<s;
return 0;
}
compler tell me
TestSTL.obj : error LNK2019: 无法解析的外部符号 "bool __cdecl operator<(struct S<int> const &,struct S<int> const &)" (??M@YA_NABU?$S@H@@0@Z) ,该符号在函数 _main 中被引用
Debug/TestSTL.exe : fatal error LNK1120: 1 个无法解析的外部命令
~_~
|
|
|
|
|
|
|
Hi all,
I have developed a ATL in-proc server (dll) that exposes some COM objects, and these have some events. I have to fire events in a separate working thread I spin when the library is loaded. So the event consumer is serviced in another thread. When I use this in a VB6.0 application all works well but if I attempt to debug the event, placing a breakpoint in the event sub, the breakpoint is hit, but then the VB IDE crashes and suddenly disappear.
I registered the COM object apartment as BOTH.
So what is the problem?
Could you please help me?
Many thanks and HAPPY NEW YEAR !!!!
Regars,
Andrea
|
|
|
|