|
Are you wanting to set the window text of the 3rd dialog dynamically? In that case, you could pass it as a parameter to the constructor of the 3rd dialog class and have a string member variable initialized with that value and then call SetWindowText() in InitDialog() . That sounds viable?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
thanks Rajesh it is working now.
|
|
|
|
|
Anjali Patil wrote: ...i want to change title of this dialog(3rd dialog).
Call SetWindowText() from within its OnInitDialog() method.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
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_
|
|
|
|