|
Maximilien wrote: but all of there are still enabled when the dialog appears.
Do you have other staments where EnableWindow(TRUE) is called?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
no, not that I can see, I put breakpoints everywhere ( running in debug mode ), and they never get called before I actually want them to be called.
I went this way, I disabled all my controls in the resource editor, and enabled them as needed ( instead of disabling them in the code ) ; my problem is when I initialized the dialog, not when using it.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: no, not that I can see, I put breakpoints everywhere ( running in debug mode ), and they never get called before I actually want them to be called.
Just to verify, temporarily change all EnableWindow(FALSE) calls to EnableWindow(TRUE) . Even though a breakpoint is not being hit, this will at least eliminate the debugger as masking the problem.
Maximilien wrote: I went this way, I disabled all my controls in the resource editor,
Again, temporarily change all the controls to be enabled via the resource editor. Now your dialog should come up with all of the controls enabled. Yes? If so, start changing one statement at a time, or one control at a time in the resource editor, until the problem shows up.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Are you suspecting a resource ( ID related ) mixup ?
I will look at this tomorrow ... will launch a full rebuild when I leave tonight, to remove all possible conflicts.
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
Are you suspecting a resource ( ID related ) mixup ?
No, but don't dismiss that either. I'm trying to rule out the possibility that a EnableWindow(FALSE) statement is actually being called even though the breakpoint in the debugger is indicating otherwise. I've seen it happen a few times.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I need help in trying to code a report using Crystal Reports in C++. I can not find any examples using this capabilities. I find some using VB and C# but not C++. I could use anybody's help. Either an example or direction.
Thanks
Dick Willms
(WillmsDick@hotmail.com)
|
|
|
|
|
Are you trying to run the report, display the report, or programmatically modify the report (you use different things for each)? By the way, you'll want to use their COM objects in C++, which aren't hard to use, and the VB and C# examples somewhat translate. By the way, which version of Crystal are you using?
|
|
|
|
|
I will be doing all of the above. I am using the one that comes with .Net 2002 and or 2003. I have both. Currently I have finished the data collection phase and now I neeed to do the reporting phase against the data being collected.
|
|
|
|
|
In MSDN, under "Crystal Reports for Visual Studio .Net":
When you are creating a C++ project to host Crystal reports on the Web or Windows, you should choose the Managed C++ Application template.
Procedures that involve design view operations and automatic code generation to incorporate Crystal reports generally apply to Visual Basic and Visual C# projects only. You should use the Report Object Model, the Web Forms Viewer class description and the Windows Forms Viewer class description to incorporate Crystal reports in Managed C++ projects.
It looks like the only portion of Crystal Reports they distribute with .Net is the .Net version, not the ActiveX controls or COM interfaces. So, is your C++ app a managed app?
|
|
|
|
|
What I plan to do is to creat a managed app and perform the nessary sql to build a file containing the data and execute this managed app passing a report number. The approiate report will then be created using the file built and display the report. Do you have a better idea I will look into it.
|
|
|
|
|
Hi,
My software is a highly interactive application that uses lots of windows with sub windows (a few hundred windows is not an exception). Not all windows are visible at the same time, but at certain moments the user must be able to quickly switch to another window so I keep the relevant windows invisible and make them visible when needed.
Due to the structure of the software, it is not possible to decrease the number of windows.
Nevertheless I have succeeded to decrease the used pens, brushes, .... Cleaning up the used menu handles and icon handles is planned for the medium- to long-term.
To prevent my application from starving the available GDI and/or User Handles, I want to check the amount of free GDI/User handles (both for the process as for the global system).
I found out that there is a function (GetGUIResources) where you can get the number of used resources, but there does not seem to be a function to get the number of free resources?
Does such a function exist or is there another way of obtaining that value?
Or is there a simple trick to minimize the number of used resources (or to increase the number of available resources)?
Thanks in advance.
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Simple Trick - Install video card with more Video RAM.
Avoid using DDB, use DIB bitmaps isntead (they can reside in regular memory).
'Share' handles to objects - instead of duplicating a 1-pixel wide black pen 200 times, etc.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
I'm developing a Win32 Console application with Visual C++ 6.0.
When I've created the project, I've addeed the MFC support.
All MFC classes works fine in my project except CSocket.
I can create a new instance of that class (operator new),
but when I call the Create metod, this call generates an exception
in the method AfxRegisterWndClass.
Can someone tell me how to solve this problem ?
Thanks a lot to everyone!
|
|
|
|
|
Include afxsock.h Maybe it'll help...
--------------------------------
Human stupidity is infinite.
|
|
|
|
|
I've already done it !!!
|
|
|
|
|
I may be wrong, but I am not sure why this function will even be called.
AfxRegisterWndClass().
MSDN says:
The Microsoft Foundation Class Library automatically registers several standard window classes for you. Call this function if you want to register your own window classes
It could be some windows you are creating in the console app.
this is this.
|
|
|
|
|
I don't directly call this method.
It is called by the method Create of the CSocket class
(or by the other functions called by Create).
|
|
|
|
|
I think you may already have done it, but did you call AfxSocketInit() before creating the socket ?
If yes, then it is some other error.
And by the way, CSocket does create a window "Socket Notification Sink". (just seen it)
this is this.
|
|
|
|
|
Hi,
You probably forgotten to call AfxSocketInit(); ;
This initializes all the classes for socket support
codito ergo sum
|
|
|
|
|
Greetings,
The CSocket class uses a window to manage the socket(timers and messages);
It sounds like it is having problems creating the socket window; I cannot recall if it uses the main window of the current app thread or creates its own;
1. can you create windows in a console app?
2. use the find in files function and search the source code for the create function for Csocket then breakpoint and find the problem;
|
|
|
|
|
Hello,
Short question:
How to get physical drive number, where specify volume letter i.e. C: is assigned ?
any idea ?
Mila
|
|
|
|
|
int a;<br />
a = PathGetDriveNumber("c:\\");
You also need to include "shlwapi.h" and link with shlwapi.lib
this is this.
|
|
|
|
|
Not that fast
This function returns ... quote: "0 through 25 (corresponding to 'A' through 'Z') if the path has a drive letter, or -1 otherwise"
In fact, returned value corresponds an logical drive number and doesn't correspond with physical drive number.
Mila
|
|
|
|
|
I remembered it the moment I had hit the submit button.
You could still get all the drives in the system, and check if it is a logical or physical drive, maybe.
this is this.
|
|
|
|
|
I have an input stream which consists of a length marker and then data of the specified length, there can be any number of blocks and of any size. I am currently waiting until the complete data has been sent and then parsing but I now need to do it as the data comes in, any ideas how I might go about it, the method I have is:
BOOL DataRead(string szRequest)
The data is passes in via szRequest and returns TRUE when I reach the end of the data input, I need to parse the blocks and add to some sort of buffer if possible.
|
|
|
|