|
As part of a macro, I need to copy the formatting, formulas, and buttons with their assigned macro's of one worksheet on a new sheet.
I've got most of the way there, but when it comes to duplicating the macro buttons (I have been copying and pasting them) the visual code says
ActiveSheet.Shapes("Button 15").Select
but this creates a problem because the future buttons won't always be number 15.
Any ideas so that the macro will apply to all future buttons?
|
|
|
|
|
Im working in a dialog based MFC application in visual studio. And i need some way to check to see if the main window is maximized, filling the whole screen or restored, like a normal window.
Is there some way i can like a if (Window.Restored == 1) etc?
P.S. Im used to working in visual studio 6.0, but sometimes i work in .NET 2003, when in .NET 2003 how do i like open the wizard thingy, where i can like add events (like PreTranslateMessage etc)
thanks!!
//Johannes
|
|
|
|
|
if (IsIconic(hwnd))
{
}
else if (IsZoomed(hwnd))
{
}
else
{
}
|
|
|
|
|
Try using
BOOL GetWindowPlacement(<br />
HWND hWnd,
WINDOWPLACEMENT *lpwndpl
);<br /> .
Regards,
Paresh.
|
|
|
|
|
Thanks Hans and Paresh, i belive this has solved my problem (not sure yet, my program is kinda complicated )
Thanks!
//Johannes
|
|
|
|
|
Hi all,
I have made a SDI application. I have written a function on toolbar button. Now what i want to know is after it finishes executing that function where the control passes to as i m geting a abort error after i finshes up my code in that function.
can anybody help me in this
thanks in advance
|
|
|
|
|
It will go in run loop (for new msg)
what you are doing in your function.
|
|
|
|
|
The control will end up back in CWinApps message loop.
Have you tried putting a break point near the end of your function, and see exactly where the fault occurs?
*What* is the error?
One fault I had with message functions is getting the parameters wrong, and this gave me no error in debug, and a stack over flow error in release builds.
If you use ON_COMMAND, then make sure your command handler is:
void OnMyButtonPressed ();
otherwise you can have problems.
Iain.
|
|
|
|
|
Hi
I am making an application in vc++ (a modal dilog based app...)
but in my form focus is not set by enter key.
I am using tab key for moving focus from one edit box to another.
can any one tell be how to set the focus by enter key. So when we press
enter key focus move to another object automatically
Regard's
Kaushik
|
|
|
|
|
Do you understand that this is not compatible with how Windows programs work in general? The Enter key is not a navigation key - it is a selection key, which (on a dialog) will result in the automatic selection of the default button (usually the OK button).
Doing this will be very confusing to your users. Microsoft has detailed guidelines specified for the Windows user interface - see MSDN for more details.
Here is link for PDF download: ux guide.pdf.
|
|
|
|
|
Hello..
This is very simple question but i dont know how to solve it.I am just beginner in this field so please help me.
In my application..I want some input(binary)..
like..
Enter Input Value:<br />
<br />
SEL Cx0 XOR D1<br />
1 1 0 1
Here how i can enter 1101 so it will automatically enter Tab button??ie after entering 1(input for SEL),next cursor will be at Cx0( after 8 tab from SEl) and same way for all other input.
Second question is..How can i enter input as a only "Single char"..ie after entering single char(for exam.. 1) then next cursor point will be at Cx0 input point..
Thanks
-- modified at 4:04 Monday 11th June, 2007
|
|
|
|
|
Dear
Enter Input Value:
SEL Cx0 XOR D1
1 1 0 1
please mention it.
you wants to take input in Edit Box.
if you are using the Edit Box then two ways
1. create your Control dervied from CEdit and handle all input in EN_CHANGE there bcoz u have to take care of binary
also.
2. handle EN_CHANGE od Edit control in Dialog Box.
|
|
|
|
|
What is the difference between map and set AND multimap and mutiset
|
|
|
|
|
Hey, are you collecting info for the enemy?
From MSDN multimap reference:
<br />
Unlike template class map, an object of template class multimap does not ensure that key_comp()(x.first, y.first) is true. (Keys need not be unique.)<br />
The same diffrence holds for set, multiset pair.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
But, what is the difference between map and set?
|
|
|
|
|
excerpt of MSDN documentation for map:
<br />
The template class describes an object that controls a varying-length sequence of elements of type <big>pair<const Key, T></big>. The first element of each pair is the sort key and the second is its associated value.<br />
excerpt of MSDN documentation for set:
<br />
The template class describes an object that controls a varying-length sequence of elements of type <big>const Key</big>. Each element serves as both a sort key and a value.<br />
Why don't you make a little effort to read documentation, before posting?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hello! can n e one tell me how can i highlight any text present in a web page, after it has opened.....(i m opening a web page in my VC++(MFC) code).
|
|
|
|
|
Hi,
How you openned the web page using CDHtmlDialog/ CHtmlView, ...?
You can use MSHTML COM objects(IHTMLDocument, IHTMLElement, ..) and change the HTML Text to <Strong> or change the color of text or change the html style of the html element in runtime to highlight the Text. This requires you have to use IE controls in any mean (CDHtmlDialog, WebBrowserCtrl, ...)
|
|
|
|
|
hello...i hav used MFC's method to execute a web page....now whts the method to highlight any word present in the page????
|
|
|
|
|
Hi,
I can't understand "MFC's method to execute a web page".
My method will work only if you have hosted the IE web control in your application.
You "execute the web page" ? Does it uses Internet Explorer window.
Is this Web page is shown in your application.
Sorry I can't understand your setup. Are you showing the web page? in your application window.
|
|
|
|
|
I have almost finished developing a software with vc 6. Then my leader suddenly told me that this software should be also be able to run under Vista. I know it is hard to accept, but it is the fact. I think the fastest way maybe convert it to vs.net 2005. But it is not such easy. It showed a lot of errors.Could onebody give me any suggestion. To write a new software with vs.net 2005, or convert it, or some other good idea.
|
|
|
|
|
VC6 is rubbish, you shouldn't use it anyhow, if you have the option.
If you get a lot of errors, you should work through them, you will, in the process find out ways in which your old code is not standards conformant.
I would, however, just test to see if the app runs on Vista. I don't see how moving to VC2005 would magically cause this to occur.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
why do you say VC6 is rubbish?
I've had nothing but problems with VS2005, even though I applied the service pack 1 and then the vista pack as well. I still can't get add member variables to work properly, and miss the old right click class wizard in VC6.
I can still get to the class wizard/add variable but when I click control type variable all the other fields still stay empty and are unusable.
|
|
|
|
|
Peter, Chan wrote: I think the fastest way maybe convert it to vs.net 2005
That may not make your application to run as expected[edit]on vista[/edit]. As there are other platform issues involved there, like , way to deal with registry.
VC6, is not strictly adheres to C++ standards, and no longer supported by Microsoft. So , better migrate to higher version of compiler.
Peter, Chan wrote: But it is not such easy. It showed a lot of errors.
It should not take long time to fix those.
-- modified at 3:03 Monday 11th June, 2007
Prasad
MS MVP - VC++
|
|
|
|
|
Peter, Chan wrote: I think the fastest way maybe convert it to vs.net 2005. But it is not such easy. It showed a lot of errors.
Those errors have nothing to do with Vista. They are the result of VS2005 being more C++ compliant.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|