|
Hi,
I have MDI application, which loads office files (word,excel,ppt) but while loading excel doc I was unable to user "Freez Panes" functionality. This is bcoz when we open any document thru MDI application, this MDI application will have its own "Window" menu with default sub menus ("New Window", "Cascade","Tile", "Arrage Icons") but it does not have "Freez Panes". I would like to know is there any way to implement such functionality.
I have tried to add another menu called "Freez Panes" but need to add functionality for it. Pls help.
Thanks
SNI
|
|
|
|
|
How to load bitmpas dynamically?
When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)
|
|
|
|
|
If you're using Win32 API , you may use LoadImage [^], for instance
HANDLE hMyBmp = LoadImage(NULL, _T("res\\image.bmp"), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
On the other hand, if you're using MFC/ATL , have a look at CImage class documentation [^], the Load method looks promising.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
|
You can use of CImage class:
#include AtlImage.h
CImage m;
m.Load(_T(""));
....
...
|
|
|
|
|
I have a dialog-based app which runs loads at windows startup, but problem is i don't want to showing up this dialog at every startup so i need it to start hidden.Plz help me
|
|
|
|
|
What kind of a program is that? What does it do? Perhaps you don't need a windowed application then?
However, to answer your query, you may use ShowWindow(SW_HIDE);
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thanks for reply but i want to hide only at the time of loads at windows startup.
|
|
|
|
|
You never answered any of my questions. Why can't you send your app to tray instead, if at all it has an UI? If it doesn't need an UI, then why a dialog based app?
Again, to answer your query, with windows start-up, you could invoke your app with a command line parameter and check for it in the InitInstance() and then use ShowWindow(SW_HIDE);
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Ok i am trying to do that.Thanks
|
|
|
|
|
I understand your problem as this - how to identify whether the application is started during windows startup.
I think you've managed to start your application on startup, by adding under - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run . Well, in that case just pass a commandline argument /startup or something like that. So that when started, by checking the command line arguments, you can identify whether its started during windows startup or manually and can hide your main window accordingly.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks Jijo raj
My problem is how to set commandline argument for hide application?
|
|
|
|
|
May I politely ask you to use Google?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Well, let me ask you how do you manage to start the application during windows startup? via registry or by creating shortcut in startup directory?
in both cases, you could pass the command line together with exe path. for instance,
c:\hello\hello.exe /startup
Well, in your application, you have to parse and check for the command line string - /startup. You could use the function GetCommandLine() to read the command line string. This link[^] will be useful.
[Edit]
Check out this link[^] too for parsing command line.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
i am useing via registry.
|
|
|
|
|
MsmVc wrote: i am useing via registry.
okay, then you have to specify the your exe path in registry, like this
c:\Hello\Hello.exe /Startup
then, /Startup switch will be sent to your application as command line. Well, I've already explained about how to read the command line from your application.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Thanks a loat Jijo raj
I am able to do that but my problem is command line argument.How can i pass command line argument can you give me some line of code.Plz help me
|
|
|
|
|
Commandline arguments are the parameters that we pass to application while starting it up. You don't need to write any specific code for sending commandline argument to application.
Well, did you modify your registry startup entry as i suggested? Just do it and call GetCommandLine() from you application. And you'll be able to see the "/startup" in debugger.
Don't hesitate to ask, if you have more doubts about it.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
i have placed a buttons using Cxskinbutton.i want to remove a focus rectangle while pressing tab key.how i do that.
|
|
|
|
|
check whether the focus rectangle is drawn somewhere explicitly in the code. BTW someone did ask about getting the focus rectangle on the button yesterday but he was not able to get it... may be you to can exchange ideas..
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi All,
I am currently making a VC++(MFC) app which will act as additional login screen. It will come up when user logs in to Windows XP machine and user has to use a username/pwd combination which will be given to him.
The business idea is for a Cyber Cafe where users login with their account details, and they can browse till they have "browsing time" in their accounts. Once they logout or their "browse time" is over, the login screen again appears facilitating the next user to login with his credentials.
I have created the MFC login screen(starting it as a windows service) and when user logs in successfully, I am placing the MFC program in the systray where user can login and see his remaining time, etc.
What I wanted from community is couple of design suggestions -
Q1. Is the idea of placing the app in the systray appropriate ? Can you advise some other approach which could come handy ?
Q2. Also, I am looking forward to have the authentication being done via a machine(a server) - which has all authentication info as well as browse time information stored in it. I was looking fwd to use Winsock API for this purpose. The client application(installed on all machines) will contact server app in following cases -
1) while logging in - to get authentication info, browse time info.
2) while logging out - to record time spent in browsing.
Is this network design appropriate - using client/server architecture and winsock API or can their be any improvements in the design ?
Thanks for the help!
Regards
Cage
|
|
|
|
|
I wanna make cursor IDC_HAND when mouse hover in my CMyButton(derived from CButton).
In CMyButton I deal with ON_WM_MOUSEMOVE message, see code below:
void CMyButton::OnMouseMove(UINT nFlags, CPoint point)
{
ASSERT(m_hWnd);
TRACKMOUSEEVENT tevent;
tevent.cbSize = sizeof(tevent);
tevent.dwHoverTime = 0;
tevent.hwndTrack = m_hWnd;
tevent.dwFlags = TME_LEAVE;
_TrackMouseEvent(&tevent);
SetCursor(LoadCursor(NULL, IDC_HAND));
CButton::OnMouseMove(nFlags, point);
if (FALSE == m_bHovered)
{
m_bHovered = TRUE;
this->Invalidate(TRUE);
}
}
Hope I state my problem clearly!
modified on Tuesday, December 2, 2008 1:43 AM
|
|
|
|
|
Did you try handling WM_SETCURSOR? This is much easier than trying to deal with mouse messages.
|
|
|
|