|
Hi,
I need to implement Span tag with style (overline etc) in vc++ can body help me out plz...
Helping hands are greater than Praying lips
lokesh
|
|
|
|
|
Hi
I want to set span tag with style(overline etc) and all to a text how do i do it? Thanx in advance
lokhes
|
|
|
|
|
|
I wrote an Active X control in Visual C++ using only ATL (no MFC), for use on a web page. When the control ends, it needs to go to another web page within the SAME IE browser window.
I am currently using:
ShellExecute(NULL,"open",NewPage,NULL,NULL,SW_SHOW)
to do this.
The problem is that this opens the new web page (whose URL is NewPage) in the default Browser, which isn't always always IE (it might be Netscape for example). It also opens a new IE window if the user has unselected "Reuse windows for launching shortcuts" in their IE Internet options. The most common problem, however, is that it opens a new "tab" in "Slimbrowser" and other "tab" based browsers.
The only solution seems to be to get a "IServiceProvider" pointer to the current browser window, then I can do a "IServiceProvider::QueryService" to get a "IWebBrowser2" pointer, and then use "IWebBrowser2::Navigate" to go to the new URL in the same window. This technique is described here: http://msdn.microsoft.com/msdnmag/issues/01/06/c/
However, I can't for the life of me figure out how to get the "IServiceProvider" pointer. In the above mentioned article, they said they got the pointer from the "Active Accessibility SDK", but not how. Also, I would prefer not to have to use this SDK.
I'm sure there is an easier way to do this. Remember that I can't use MFC!
Thanks in advance for any help you can give me!
|
|
|
|
|
|
hi !
I was testing out skinmagic demo for one of my apps,and came accross a few problems ..maybe experienced users can help me out on this.
problem 1 :
when i used irregular shaped dialog windows, the edges showed up as having a faint magenta lines ( i used magenta as my transparent color ).I made the image using photoshop 24 bit bmp,without any drop shadow.Can anyone tell me how to get rid of these edges?in the examples i saw dialog boxes with more complicated edges than mine but those didn't have a problem, and i am unable to find out the reason for this.Can anyone exolain why this happens ?
problem 2: i had a pulldown menu in my app, and when i skin it , the pulldown menu dissapears ! the popup menu (right click ) stays though...i mean it;s properly invoked on right click, but not the pulldown menu.
problem 3: As i said before i am using an irregular shaped dialog box in my main window.after skinning , the messageboxes are also assuming the same shape, which i do not one.i want my mnessageboxes to be plainer.Would specifying a control ID for the framedialog or the shapedialog help ?How can use a diff shape for my messagebox than my other dialog boxes?
I would be glad if anyone can solve my doubts.Thanks to all the contributirs in advance
Regards
Kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason, huh ?"
|
|
|
|
|
hello
without using any MFC classes ,
I want to convert a 24 bit color bitmap image to grayscale image.
How to do that ?
Can anybody give me simple code snippets to implement the logic?
|
|
|
|
|
Have you checked this
CP article[^]?
It uses MFC, but you should be able to rewrite it without problems.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
// From www.OpenGL.org - 'Avoiding 16 Common OpenGL Pitfalls' by Mark J. Kilgard
// 'A standard linear weighting for combining red, green, and blue into luminance
// was defined by the National Television Standard Committee (NTSC) when the US
// color television format was standardized. These weightings are based on the
// human eye's sensitivity to different wavelengths of visible light and are
// based on extensive research. To set up OpenGL to convert RGB to luminance
// according to the NTSC standard, you would change OpenGL's default pixel
// transfer state like this:
// glPixelTransferf(GL_RED_SCALE, 0.299);
// glPixelTransferf(GL_GREEN_SCALE, 0.587);
// glPixelTransferf(GL_BLUE_SCALE, 0.114);
//
// From : Postscript Language Ref. Man. 2nd Ed. 6.2.1 pg.304
// '... NTSC viseo standard. This standard determines how a color
// television signal is rendered on a black and white television.'
//
byte b = (byte)(
(R * 0.299) +
(G * 0.587) +
(B * 0.114)
);
e.g.
Given : R = 120, G = 100, B = 200
Grey value = 120*.299 + 100*.587 + 200*.114 = 117.38 (117)
Grey color : R = 117, G = 117, B = 117
...cmk
Save the whales - collect the whole set
|
|
|
|
|
hi , How to access controls of a CFormview class from another CFormview class?
Aparna
|
|
|
|
|
You just don't. You trigger an UpdateAllViews from the document managing both views. If they don't have the same document, you should rethink your architecture both one and two times.
|
|
|
|
|
Aparna,
Have you managed to find a solution for this? I am stuck with this also...
thanks
|
|
|
|
|
Hi there,
I created a checklist which is itself a child view. The items on the checklist have corresponding buttons that allow the user to click on to perform the functions needed to complete the list. Once the user clicks on the button, a dialog box or form view appears. After the user clicks on the OK button to close the function view, how can I reference the checklist image in the checklist view to make it visible? Or should I say how do I refresh the checklist to see that the item has been completed? This is what I have so far:
void CCCheckList::OnSelFruits()
{
//opens up the Select Fruits dialog box
}
void CFruits::OnOk()
{
//do some things
PostMessage(WM_COMMAND, ID_FILE_CLOSE)
}
Where and how do I make the IDC_CHECKMARK image from the Checklist class visible?
Thanks!
|
|
|
|
|
Are any of the following ways of allocating memory faster or more efficient than the others:
malloc, calloc, free
c++ new, delete
LocalAlloc, LocalFree
GlobalAlloc, GlobalFree
CoTaskMemAlloc, CoTaskMemFree
-thanks
|
|
|
|
|
Stick with 'new' and 'delete', unless you have any specific requirements to use the other methods.
|
|
|
|
|
malloc and free are probably the fastest, given that in most heap managers, they are obtaining memory from a pool managed by the C runtime. calloc is inherently slower than malloc, since it calls malloc and then initializes the allocated memory to all zero's.
new and delete are slower than malloc and free, since they allocate/deallocate memory and then call the constructor/destructor for the object.
The remaining functions I would think would be slower than malloc/free/new/delete, since they involve Win32 API or COM calls.
That said, I agree with the other poster. If you are using C++, you should use new and delete wherever possible. Most of the time, the first thing you do with allocated memory is initialize it. The C++ new operator couples the allocation and initialization together, making it more difficult to fail to initialize what your allocating.
Software Zen: delete this;
|
|
|
|
|
With the MS C/C++ library running on W2K etc then I think you'll find that all those end up at the API 'HeapAlloc'. So if you're really after most efficiency then consider going direct.
In general though 'new'/'delete' for C++. And create your own allocators for special cases. For instance if you're allocating large numbers of small constant sized objects then a specialised allocator based on a number of larger allocations from the system is worth looking at.
As in all optimisation the big win is to get the high level aspects of the program efficient before micro optimising. Say you make all your allocations run in 95% of the time, and I tweak my app to do half the number of allocations. Who's won? Who's kept their app maintainable and simple? Etc etc.
Paul
|
|
|
|
|
HI,
Plz tell me How can i get ITem ( item no. or its attribute) by selecting it with mouse..
i means any method for getting seletec item Number
or any thing else like attributes
thanx
|
|
|
|
|
int nIndex = myListCtrl.GetNextItem (-1, LVNI_ALL | LVNI_SELECTED);
while (nIndex != -1) {
TRACE ("Item %d is selected\n", nIndex);
nIndex = myListCtrl.GetNextItem (nIndex, LVNI_ALL | LVNI_SELECTED);
} /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hi all,
I am want to get embedded objects from a powerpoint slide. Then I want to handle the actions of each of those objects from each buttons of my application.
If anyone can please help me ASAP.
Best regards,
Faisal
(al.faisal@vmclbd.com)
Faisal
|
|
|
|
|
can someone point me to an example of using the Tab control which changes content when the tab changes
i really dont want to go through 20 controls and hide them just to change the content
|
|
|
|
|
Put your controls in one or more modeless dialogs - then just show the appropriate dialog (and hide the others) when the tab selection changes. Alternatively, you could use a modeless property sheet (and property pages).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
ok, i found this artical -> http://www.codeproject.com/dialog/embedded_dialog.asp
its exactly what i needed, bit i dont want the dialog to have a border when its embedded in the main dialog, so how do i take away the border?
|
|
|
|
|
The border is a property of the dialog, just turn it off.
--
Joel Lucsy
|
|
|
|
|
Set the dialog's border style to "None" in the resource editor.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|