|
Well, my guess was a possibility too!
I'd have bowed down before your magnificence [*] if I'd seen your post before making mine.
Iain.
[*] Not meant to sound rude.
|
|
|
|
|
Rude? Why rude? It's my title, after all.
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]
|
|
|
|
|
Thanks to all for posting.
The answers:
1. I'm not getting any errors, code execute correctly only the font doesn't change!
2. nmc is filled with sensible values.
3. MaliFont is an member variable of my dialog class('OnInitDialog()'), not created in the member function.
Thanks again guys
|
|
|
|
|
In your first post you say this button is owner draw. If so, and you are drawing it yourself, then it is up to *you* to draw with a changed font.
Try turning off the owner draw stuff, and using setfont as previously described. If that works, then the problem is in your owner draw code.
Or maybe you're forgetting to do:
pOldFont = pDC->SelectObject (&MaliFont);
pDC->DrawText (...);
pDC->SelectObject (pOldFont);
(or similar) in your drawing code.
Iain.
|
|
|
|
|
I have complied an application with Visual Studio 2003. It works well with 32 bit os on a 32 bit machine.
But it crashes when run on Vista 32 bit os on a 64 bit machine.
Any clues on how we can debug our application on Vista 32 bit. (As we cannot install Visual Studio 2003 on Vista).
Any help on this is highly appreciated
|
|
|
|
|
Member 3988038 wrote: Any clues on how we can debug our application on Vista 32 bit. (As we cannot install Visual Studio 2003 on Vista).
The problem might be due to UAC. Turn off UAC[^] and try to debug.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Debugging Tools for Windows[^].
This includes WinDbg (which in many ways has a better debugger than VS). Build your app with debug information (either in Release or Debug mode - you can have debug info in either - Release/Debug really implies 'Optimised' or 'Not optimised'!) then run using WinDbg.
The UI is pretty good, having most of the debug & source windows that VS has.
HTH!!
|
|
|
|
|
I am writting idl file for my project. It is not allowing me to use FILETIME. if I include the windows.h , then it gives me the compiling error like:
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(280) : error MIDL2003 : redefinition : INT
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2003 : redefinition : Int64ShllMod32
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(684) : error MIDL2025 : syntax error : expecting ; near "{"
1>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\winnt.h(686) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
If i am not including windows.h , compiler giving me the error:
1>.\TestRPC.idl(178) : error MIDL2025 : syntax error : expecting a type specification near "FILETIME"
1>.\TestRPC.idl(178) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
can anyone tell me how can i resolve this error ?
Thanks
Vijay_k
|
|
|
|
|
Hi Vijay_k,
it's hard to answer this without looking at your code, but is sounds like you are missing a #pragma once or #ifdef ...
Marcelo
|
|
|
|
|
I'm not surprised - header files can't always be #include 'd into IDL files. You could try...
- Copy & paste the definition of
FILETIME into your IDL file. - FILETIME is really just a 64-bit integer (but defined using a struct because Microsoft C didn't used to have 64 bit integers. IIRC). So, just use an IDL 64 bit integer - I think that's called a
hyper ? You could then convert to and from FILETIME when calling the functions defined in your IDL.
|
|
|
|
|
Hi
I have an MDI application developed in VC++. We make a build using Install Shield. We are installing build on XP m/c on client sites. The build gets install properly. But while running on some m/c one of my application (this does injetction in processes) is crashing. But the same is running fine on other m/c.
Can anybody provide any suggestion on this.
Thanks
SNI
|
|
|
|
|
SNI wrote: Can anybody provide any suggestion on this.
Find out where / why it is crashing?
What is the difference in the eco system?
Does it not run at all, or does it only crash when you do something?
What is that thing? Does it depend on network settings? etc.
Have a look at www.sysinternals.com (redirects somewhere on msdn) and dig up debugview. Then litter your suspect code with OutputDebugStrings to
narrow down your search.
Or you could build your release code with symbols (should be able to google this) and use remote debugging to catch the crash in action.
Iain.
|
|
|
|
|
Thanks for you reply. It was a problem of anti virus. we have uninstalled anti virus and it runs properly. It was giving "R-6025 pure virtual function call" error and crashing. Can pls let me know how any anti virus creates problem to any application.
SNI
|
|
|
|
|
Hi All
I have a Application which have two dialog.I am calling login dialog on Main dialog in OnInitDialog().It's running Successfully.My Dialog application is running in background.when i click on exe of application then login dialog is open.But problem is when i click on Cancel button of login windows(i am useing this function on cancel button OnCancel()) then my main dialog is open.Then i try to write exit()in Cancel button then application is closed.
I want to set option like this,when i use cancel button then only login windows will close.No effect on main dialog.
Plz help me
|
|
|
|
|
Then don't bring your login dialog up from your main dialog's OnInitDialog, do that BEFORE you even try to bring up your main dialog. As far as i know if you use DoModal to display a dialog it will be shown after OnInitDialog (and i guess some other message handlers) has exited.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for reply
i am also try to use in .cpp file before CWinApp::InitInstance(); but result is same.If give me some tips to solve that problem.Thanks in advance
|
|
|
|
|
Let me get this straight. What you want is that your main dialog is created, and IF your login dialog is closed with OK, you want your main dialog to appear on screen, but if it is closed with CANCEL you want your main dialog to still exist BUT not be shown on the screen?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
You can call EndDialog() and return immediately from OnInitDialog(), instead of calling exit()
|
|
|
|
|
Can you describe me with some example? I am calling login dailog on like this
Clogin dlg;
dlg.domodal();
OnInitDialog.
Plz help me
|
|
|
|
|
Like this, if my understandings are correct...
BOOL CMainDlg::OnInitDialog()
{
CDialog::OnInitDialog();
...
...
CLogin dlg;
if( dlg.DoModal() == IDCANCEL )
{
EndDilaog( 0 );
return FALSE;
}
...
}
|
|
|
|
|
Thanks for vital information but still problem not solve.When i click the cancle button then main dialog is open.Plz help me
|
|
|
|
|
Are you sure that you are getting the IDCANCEL when you click the cancel button? And how/where are you creating the main dialog and the login dialog? I wonder how the main dialog exists after calling the EndDialog... most probably it is not getting called.
|
|
|
|
|
How can i check [code]getting the IDCANCEL when click the cancel button[/code] Plz help me
|
|
|
|
|
Try to put a break point at the if( loginDlg.DoModal()... statement and check control flow.
If it is not going to the EndDialog statement, then check the login dialog code. If you are using the default cancel of the dialog then IDCANCEL will be the return value of the DoModal.
|
|
|
|
|
yes i check it as your step.Control is going to the EndDialog statement.But Application is close.
|
|
|
|