|
maybe posting your code will help...
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.
|
|
|
|
|
You can debug your service, and this is the best way to understand what happens.
Install the service with own process and interact with desktop, then place somwehere in code (in control dispatcher, or even service main) a DebugBreak call.
Go in admin tools/services, start the service; when the service will hit the DebugBreak call will invoke debugger, and you have now the chance to enter in Visual C++ debugger and check step by step the troubled piece of code.
|
|
|
|
|
Mh... I made a new project for my windows service and placed my real application code in there, and what shall I say.. it works perfectly. I just made some refactorings to my original windows service code... don't know why it works now. Anyway thank you for your help. I will remember that tip with the debugging.
|
|
|
|
|
When I use this control (AMSCurrencyEdit for example) I don't see the dialog from the class view and intellisense in that dialog.
The project compiles and builds OK, but i´d like to have intellisense in that dialogs.
Any solution for that?
it´s the journey, not the destination that matters
|
|
|
|
|
The intellisense is not very safe... some times it disappears.
First of all copy the entire folder of the project as a backup.
If I do not remember it bad, you should close Visual Studio, delete the .clw file and then try to reopen that project and try to go to the class wizard, as it will fail to locate that file, then you'll be asked to generate it again.
Select all the files in that project again and then try it. The intellisense should work.
PS: I've been a lot of time without touching the Visual C++ environment so this is from some rusty place in my brain... please remember to make the backup previously.
Hope this helps.
|
|
|
|
|
Thanks for your fast response!!!!
Unfortunately, I'm using VS2005. There's no .clw file.
And the problem is exactly with that component.
I change the name from CAMSCurrencyEdit to CEdit, save the project, and the dialog appears in class view, I change it again to CEdit and it dissapears.
It's not a big deal, but it's annoying.
it´s the journey, not the destination that matters
|
|
|
|
|
uuups... sorry, I'm beginning to be a dinosaur... I hope to be able to switch to VS2005 this year 2007...
ErnestoNet wrote: It's not a big deal, but it's annoying.
It always becomes annoying...
Well, I hope that somebody that will know better than me the VS2005 environment will be able to help you soon.
Good luck.
|
|
|
|
|
hi i m using this code i on windows XP and visual studio 6,i receive error mentioned above
i had include these two lines as well,in stdaxh.h
#define _WIN32_WINNT 0x0500
#include <windows.h>
the code is below
<br />
MENUITEMINFO mii; <br />
memset(&mii, 0, sizeof(MENUITEMINFO));<br />
mii.cbSize = sizeof(MENUITEMINFO);<br />
mii.fMask = MIIM_ID| MIIM_BITMAP |MIIM_DAMFT_BITMAPTA; <br />
error is describled as below
D:\_RCProj\_VC6\live desktop\Source code\WinScreenAnotator.cpp(684) : error C2065: 'MIIM_BITMAP' : undeclared identifier
D:\_RCProj\_VC6\live desktop\Source code\WinScreenAnotator.cpp(684) : error C2065: 'MIIM_DAMFT_BITMAPTA' : undeclared identifier
Error executing cl.exe.
Creating browse info file...
WinScreenAnnotatorVC6.exe - 2 error(s), 0 warning(s)
Regards.
Tasleem Arif
|
|
|
|
|
well, MIIM_BITMAP is not defined in old versions of the winuser.h header file (maybe you'll need a Visula Studio service Pack, I'm not sure). On the other hand, I cannot find any reference to MIIM_DAMFT_BITMAP inside MSDN online, where did you get it?
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.
|
|
|
|
|
It seems you need to include header file for 'MIIM_DAMFT_BITMAPTA'
|
|
|
|
|
Hi All
I have miles of old code that looks like this:
CString csString = "hello World";
Having just installed VS2005, I get the error:
'initializing' : cannot convert from 'const char [3]' to 'ATL::CStringT<basetype,stringtraits>
I know that I can get around this like this:
CString csString = _T("Hello World");
But want to know if there is a single switch somewhere that will let my code compile as it was?
I also don't understand why it's using ATL and not MFC - I craeted a new MFC project
Many thanks for any help offered
|
|
|
|
|
John Strudwick wrote: if there is a single switch somewhere that will let my code compile as it was?
Possibly; it sounds like you're set up for a UNICODE build. Take a look at your stdafx.h file. If the symbol UNICODE is #define 'd, try commenting it out and rebuilding the solution.
John Strudwick wrote: I also don't understand why it's using ATL and not MFC - I craeted a new MFC project
Back in MFC 7.0 (Visual Studio 2002) they switched from separate CString implementations within ATL and MFC to a single, common implementation. As part of that, they improved the type-safety of the various constructors and assignment operators.
Software Zen: delete this;
|
|
|
|
|
Thanks Gary - that has solved the problem
I went into the properties dialog and changed from unicode to not set - works a treat
Thanks again
|
|
|
|
|
You're welcome. I believe I remember reading that the wizards in VS2005 changed from a default of building ANSI applications to UNICODE.
Believe it or not, there are advantages to building apps as UNICODE. They are much easier to translate to other languages (which may not be a concern for you). They also have something of a performance advantage. Windows itself uses UNICODE. With ANSI applications, there is an implicit conversion from ANSI strings to UNICODE with strings you pass to Windows, and the reverse when Windows returns strings to you.
Software Zen: delete this;
|
|
|
|
|
and where should I call it?
Hello all,
in the PostNCDestroy overriden function of the main dialog I want to kill the timer that is running there, I'm calling something as simple as KillTimer(0); and this should work, but it makes the entire application to close suddenly.
Any idea?
Thank you in advance.
|
|
|
|
|
PostNcDestroy() is called after the corresponding window has been destroyed, which is why the KillTimer is failing. You don't need to call KillTimer in this case, because the window destruction takes care of it for you.
Software Zen: delete this;
|
|
|
|
|
Thank you, I'll remove that commented line now.
|
|
|
|
|
hi.I wanted to "benchmark" some sorting algorithms I learned from a book .
The problem is I cannot reserve into memory more than 16383 long variables.
That means 64kB .
I've made some research and understood that in real mode a segment is limited to 64 kB.I changed the compiling mode to large , but for nothing.
_/||||\_
/|- -|\
\--/
|
|
|
|
|
It sounds like Borland C 3.1 is an MS-DOS compiler that generated 'real mode' executables. In real mode, no single data structure could be larger than 64K bytes. There were several memory models that specified the sizes of code and data supported. IIRC, the 'large' model specified code and data pointers that were four bytes; a two byte segment and a two byte offset. This let you have more than a total of 64K code and 64K data. Individual data elements (like your array) were still limited to 64K each, but you could have more than one of them.
There are more modern C and C++ compilers out there that are free for the download. Microsoft has Visual Studio 2005 C++ Express, I believe Borland makes a free version of their compiler available, and there's the open source 'gcc' compiler.
Software Zen: delete this;
|
|
|
|
|
Use another compiler...
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.
|
|
|
|
|
CPallini wrote: Use another compiler...
Exactly my thoughts
|
|
|
|
|
Hi!
I have a few problems to add combo box within my dialog box and add the strings to that combobox using "AddString()" function within the "OnInitDialog()" function.
my coding like...
Cdialogex::OnInitDialog()
{
................
................
m_Combobox1.AddString("vc++");
.......................
......
}
Debug Assertion Failed!
Program: ...
File: f:\rtm\vctools\vc7libs\ship\atlmfc\include\afxwin1.inl
Line: 248
For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.
But when i remove the code " m_Combobox1.AddString("vc++"); " ,program run successfully....
Now i am using VS. 8.0
Can anyone help me!!!
|
|
|
|
|
Taking a guess, the m_Combobox1 variable isn't properly associated with a combobox control in the dialog. You can do this in one of two ways.
The first method: Add a combobox control to the dialog with the resource editor. In your OnInitDialog function, call m_Combobox1.SubclassDlgItem(IDC_MYCOMBOBOX,this); , where IDC_MYCOMBOBOX is the resource identifier for the control.
The second method: Create the combobox control directly:
CRect rect(10,10,100,200);
m_Combobox1.Create((WS_CHILD | WS_VISIBLE | WS_TABSTOP),
rect,
this,
IDC_MYCOMBOBOX); rect is the location in the dialog where you want the combobox, and IDC_MYCOMBOBOX is the ID you want assigned to the control.
After you've done either of these, you can call the AddString method to add items to the control.
Software Zen: delete this;
|
|
|
|
|
How to do you declare m_Combobox1 ?
|
|
|
|
|
Thank you very much......
|
|
|
|