|
So it appears as if it's remembering the previous size in the registry or somewhere. Since it's your app, you should know where (or at least be able to find out). So go there and clear those settings.
Regards,
Alvaro
Well done is better than well said. -- Benjamin Franklin
(I actually prefer medium-well.)
|
|
|
|
|
Hey Alvaro,
Can you please elaborate on the settings you are talking about that I need to clear???
The problem comes, once I minimize the window and then I click it to restore, the icon turns into a pressed/highlighted icon but window doesn't come up then I have to right click and select maximize from the menu then only I can view it.
This problem is there in XP and works fine on all other windows versions.
My feeling is that it forgets it's previous size. I am not able to figure out whether this my programming bug or Windows problem.
Both the ways I do not have any clue as what to do
It's our customers requirements and have to fix it urgently. I am stuck I would appreciate if someone can help me on this or point me to some mailing list/discussion forum etc.
Thanks
Prateeti
|
|
|
|
|
I have developed an application using VC6.0.Its a dialog based application when I run this on XP it never resizes my dialog it can only be in two modes either maximized mode or minimize...what could be the problem...If somebody has some idea please do let me know.
Thanks in advance
|
|
|
|
|
how to get motherboard serial number using vc++.
I want to generate a unique hardware id using vc++.
can anyone help me..
|
|
|
|
|
have a look at this[^] article.
Cheers
Kannan
|
|
|
|
|
hello,
My English is not so good but i try.
How kan i use DISTRICT in vc++? My Database is a Sql Server and i use ODBC .
My Code:
CString strSQL = "SELECT DISTINCT [taetigkeit] FROM [ProjektDetails]";
if(! pProDet.Open(CRecordset::dynamic,strSQL))
return FALSE;
thank for help
|
|
|
|
|
Get rid of the square brackets, I reckon.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks for your Posting but this is not the Problem
|
|
|
|
|
The SELECT statement looks fine to me. What exactly is the problem?
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
The Problem is that i always get this error "Restricted data type attribute violation"
|
|
|
|
|
Check the datatypes you are using for the returned value.
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|
|
Why use ODBC? Ado simplifies life so much.
You'll need to supply more details of the actual error message as the SQL string looks fine.
Have you thought about using a stored procedure and ADO command object instead.
Michael
Fat bottomed girls
You make the rockin' world go round -- Queen
|
|
|
|
|
Hi,
I have developed an application where I want to display something in tree control using system font. I dont know how to get the system font and then how to display it in tree control..anyone has some idea..please do let me know.
Thanks in advance
|
|
|
|
|
Mmmh ...
I don't really understand what you mean by 'system font', but if you mean the current font in your control, there's several possibilities :
CWnd::GetFont will give you a handle to the font in the win. You can then use a CFont object, and assign it the font with CFont::FromHandle .
To get the font used in your tree control, add a member variable
CFont m_Font; .
Then if you have a CTreeCtrl, put it that way in your OnInitDialog() or whatever:
m_MyTreeCtrl.SetFont(m_Font);
Or, if you do only with the IDs,
CTreeCtrl* pTree = GetDlgItem ( IDC_TREE_LABEL );
pStatic->SetFont( &m_Font );
~RaGE();
|
|
|
|
|
Thanks for the reply. By 'System font' I mean to say is window's default font.
For example in browser when we type some url it displays that url in window's default font which we can change by right clicking on desktop settings.
Anyways thanks for the help.
|
|
|
|
|
I'm not sure to understand, however you may have a look to
GetStockObject[^], using as parameter DEFAULT_GUI_FONT.
HTH,
I hurt so bad inside
I wish you could see the world through my eyes
It stays the same
I just wanna laugh again
|
|
|
|
|
It worked... Thanks a lot.
|
|
|
|
|
Hi,
I have developed an mfc application and I want to run it as service...Is it possible? Please help me if anyone has some idea.
Thanks in advance
Deepesh
|
|
|
|
|
I reckon the easiest way is to start the ATL wizard, create a service, and move your code into it.
I dunno how hard it is to replumb an app as a service. I thought a service ideally had no GUI though.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Thanks for the reply..but I am not able to understand what you are trying to say. I got one exe called Sc.Exe from microsoft which is used to make an application as service. When I used this I got the entry of the application in services but not able to start it gives error msg saying "Error 1053:The service did not respond to the start or control request in a timely fashion."
Do you have any idea why its happening?
|
|
|
|
|
Anonymous wrote:
Error 1053:The service did not respond to the start or control request in a timely fashion."
This usually means that your service hasn't been written properly i.e. it is not responding to commands that you give it from the service control panel e.g. stop and start.
I would really recomment that you get a skeleton service working first that does nothing more than log something to a file saying that it has started, stopped, etc., get that working and *then* transfer your real code into it.
You really need to be careful when transferring MFC code as well. Even if you do not do any UI stuff like show a dialog or message box, MFC still does some stuff behind the scenes that require you to be logged on. Check the MSDN.
he he he. I like it in the kitchen! - Marc Clifton (on taking the heat when being flamed)
Awasu v0.4a[^]: A free RSS reader with support for Code Project.
|
|
|
|
|
After being savagely “beaten” for posting this message in the Lounge, for which I’m sorry, here it goes again.
I’m performing a lengthy whenever the user logs off or shuts down. Currently I’m trapping WM_QUERYENDSESSION, and mimicking the request after the operation is finished.
This as the nasty effect of leaving some applications opened that could require the user intervention to save unsaved work as an example.
Is there another way to do this?
Thank you
Artur Jales Moreira
|
|
|
|
|
jales wrote:
This as the nasty effect of leaving some applications opened that could require the user intervention to save unsaved work as an example.
Normally, an application will respond to the WM_QUERYENDSESSION (or some WM_CLOSE related ) message and behave itself in a good manner. You should'nt have to do nothing about that; except if you trap the message and ditch it, so that no one else can receive it.
If you handle the WM_QUERYENDSESSION message in your application ( which I assume you are doing ), the OS should wait until your application is done before continuing with the shutdown/logoff process; It might show the "wait/cancel" dialog if the application is not responding for too long.
Max.
|
|
|
|
|
Maximilien wrote:
If you handle the WM_QUERYENDSESSION message in your application ( which I assume you are doing ), the OS should wait until your application is done before continuing with the shutdown/logoff process; It might show the "wait/cancel" dialog if the application is not responding for too long.
The reason that I'm not doing the work in the handler is to avoid that dialog from ever being shown. I also need to do a similar task on logon, and I solved that by registering the application in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Isn't there a way to register an application to run on shutdown?
Thank you
Artur Jales Moreira
|
|
|
|
|
I'm glad you decided to post this after your savage beating.
From looking at the help on this message, it seems all you need to do is return something other than 0. Maybe your should allow other apps to handle this message while you continue to process.
Jason Henderson start page ; articles
henderson is coming
henderson is an opponent's worst nightmare
* googlism *
|
|
|
|