|
Hi Art,
I am trying out the solution that you suggested...
But what r the parameters that i pass into the function and where do u think it is appropriate that i must call this function at?
I cud think of OnKillFocus() of CMainFrameWnd as one option.
Now the function is of the following type..
void SetActiveView( CView* pViewNew, BOOL bNotify = TRUE )
what am i to send as the fist argument? The client view is a runtime class called CMyView, so... how will i do it? please help.
|
|
|
|
|
arunbooboo,
After looking at some of my old code (before I became grey haired) I realize I was working with CSplitterWnd class. When the user clicked on a button on the left pane it would deactivate certain menu options/toolbars that were unique to the right pane (CHtmlView based). So what I did was call CSplitterWnd::SetActivePane(..) setting the right pane as active to take care of the problem.
Your problem has a slightly different twist. You've apparently got this "HtmlBar" that is taking focus when you click on it. The toolbars are disabled probably because they are tied to the view. What class handles the events that are picked up by the selections in this "HtmlBar". If you are in the view class you might try calling CView::SetActiveWindow() at the end of each handler.
Art
|
|
|
|
|
Hey Art,
Thank you for writing back.
I made some progress regarding the problem but all is not well!!
The HTML bar that i was referring to is derived from CHtmlView class.
Okay, so when i click on it the focus is set on this. Now all i need to do is reset the focus back on to the main view. unfortunately the pOldWnd parameter that is passed into the OnSetFocus function of my CHtmlBar class is that of either CMainFrame or CListCtrl or CMyView (THE VIEW). I can only use SetActiveView() function if it pOldView is referring to CMyView, else it gives me an error at IsChild() which is called in SetActiveView() of CFrameWnd class.
Now i think i need to use SendMessage(WM_KILLFOCUS, , ) from OnSetFocus() function of CHtmlBar. But I need to fool the application in beleiving that this message is from CMyView.. how do i do that? HELP PLEASE ?!!
Wud u tell me how the remaining two parameters of SendMessage can be used to send this kind of a message.
Okay! hope i am not bugging you.
I'd/I am really appreciate/appreciating the help you are giving me.
Luv Arun.
|
|
|
|
|
Try using (WM_KILLFOCUS, 0, 0) and see what happens. I really can't help any more since I can't see your program.
Art
|
|
|
|
|
please give me some ideal about how to develop a software just like ACDsee ,that don't need power function, thank you !!
|
|
|
|
|
There are several apps on CP that use GDI+ to do exactly that, and the FAQ explains how to load multiple image formats without GDI+ if you don't want to use it.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
Where the default toolbar images comes from in SDI/MDI applications?
I mean, what is the dll name that holds that images in its resource?
|
|
|
|
|
They're usually compiled into the executable as BITMAP resources.
If you open the file "as resources" in the IDE you should be able to see them.
Anna
www.annasplace.me.uk
"Be yourself - not what others think you should be" - Marcia Graesch
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
|
|
|
|
|
I know that. However, the images are copied from somewhere else.
Someone in codeguru site told me that i can find them in the graphic folder
under in Visual Studio folder.
I am looking for print-preview icon like in MS office.
|
|
|
|
|
I believe they are stored in User32.dll .. A MSJ article by Paul eons ago demonstrated writing an application to extract RIFF file types from resources.. I believe the same article explains that opening a resources (in this case.. I believe User32.dll) as a "resource" in the IDE you can broswe the icons and bitmaps.. they should be stored as bitmaps in there.. or you could just use app wizard to create a SDI project and browse over to your res directory and open toolbar.bmp .. should have the basic ones in there.
C# a poor attempt at bringing C++ to the VB masses
|
|
|
|
|
I have already checked in User32.dll, but i couldn't find the toolbar images their.
You can find them under Graphic folder in Visual Studio's folder.
In order to have print-preview image, i opened the Word application,
copied to screen to the clipboard, paste it to the paint brush and cut the
print-preview image.
Thaks anyway.
|
|
|
|
|
Hi all,
I am brand new to VC++. I an always having problems with paths when compiling. For instance, the MIDL compiler does not compile if the path of directories include blank spaces (e.g. c:\Program Files\.....). So, I am always compiling with include files in non blank spaces directories (c:\temp\include). What is wrong?
Thank you in advance
|
|
|
|
|
Are you try to do something like
#include "C:\Program Files\Microsoft Visual Studio\VC98\Include\stdio.h"
by any chance?
This is where the difference with include "file" and include <file> comes in.
If you're including a standard system header, just do
#include <stdio.h>
and the compiler will find the header for you.
If it's a header you've written yourself, then it should either be in the same directory as the project, or a "near by" folder, in which case you can just do
#include "myheader.h"
or
#include "../commonheaders/myheader.h"
for example (though in this case, it'd be better to add the "commonheaders" folder into the VC include folders settings, then it'll find it without needing to specify the path)
If you have a common header that's used in multiple projects, you can use source control (i.e. SourceSafe) to share a single file across multiple projects and keep them in sync for you
Hard coding exact directory paths into sourcecode is very bad, as it locks down the code to your specific PC. If you hand the source to someone else to work on, they'll have to have their directory layout identical to yours in order to be able to compile the code, which isn't particularly desirable
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
I try to make the following:
Has created SDI application and has connected to database through OLEDB
Has put on form Static1 ("name") and Static2 ("surname")
, Editbox ("name" from base), and it would be desirable to make so
That when I enter in Editbox "Alex" in statics showed (or specified) this line in the table (the table is sorted)
Also has then thought how to make so that the cursor (I have connected base to help AppWizard, and it creates four buttons First, Next..) there was at row which I have achieved through Editbox.
Any helps / comments are welcome.
|
|
|
|
|
If I have four variables in an optimization system, each with their own lower/upper bound defined and a step increment, is there any elegant way to distribute the search space across several nodes, and cover the entire search scope?
The system that is being optimized is defined in a script developed by the end user. It would be very difficult to derive which optimization components are independent/dependent upon each other, so I guess we assume the worst, that they are all dependent.
Jim
http://www.qtextender.com
|
|
|
|
|
|
This is less of an optimization issue, and more of a distributed issue, so exploring a GA may not necessarily help. I need a way of splitting up my search space so that each segment is independent of each other *and* the entire search space is covered.
I do not see a solution without some sort of interdependence between search agents, which greatly complicates the architecture.
Jim
QTExtender - The OFFICIAL addon for QuoteTracker.
|
|
|
|
|
Firstly I apologise for such an awful question...
I have just purchased Visual C++ 6.0 after a while not programming. I used to use Gnu C++ on Unix.
My question is, where in Visual C++ can I activate line numbers for code I have written? Ummm, if I have 200 lines of code, where is the option, like in the Unix compiler I used to use, to list the number of the line of code down the side. Eg, every 5 lines the compiler, in the source coede window, writes 5th line, 10th line etc.
I hope this question is not something impossibly obvious, but it something I never used to have to think about.
Any help would be great.
Thx.
JD
|
|
|
|
|
I just looked through the options and cannot see it, but the current line number is shown on the status bar, and you can hit CTRL-G to goto the line number of your choice.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
|
|
|
|
|
Thanks for the help, that will make me happier.
JD
|
|
|
|
|
...and if the reason you want line numbers is to find errors, you can use the F4 key (F8 key in VS.NET) to go to a file and line in the output window.
|
|
|
|
|
hi,
i have express edition i can insert line number using following option
tools->options->text editor->all languages-&>line numbers
|
|
|
|
|
hi,
i have express edition i can insert line number using following option
tools->options->text editor->all languages->line numbers
|
|
|
|
|
Not sure exactly what it is called. But in MSVC 6.0 when you are working with classes and what not the . and -> bring up your little handly window with all class variables and functions and what not... However I noticed that sometimes they stop showing up. I appreciate this little window because it lets me know that name I am typing is correct. Sometimes I might declare a class or what not, and forget exactly how I declared it.. was it MaxVolume or VolumeMax .. so this window is great because it shows it right there.. anyways sometimes it disappears after a while.. usualy after typing a lot (I get to typing fast, and sometimes I hit crazy windows combo keys like the ALT-S Win95 key on the keyboard on accedient).. so once it leaves I have to close out of the IDE and completly log off and log back on to get my popup window back.. is there any easier way?
|
|
|
|
|
ROK_RShadow wrote:
is there any easier way?
probably not. the best way to fix the Intellisense problems is to delete the project's .NCB file, but the IDE locks that file while the project is up.
-c
When history comes, it always takes you by surprise.
|
|
|
|