|
How are you confirming that resource leaks are happening?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
|
I have a Windows application programmed in C (SDK level) using VC6. My Windows 98 and Windows XP (on different PCs) are set up with task bar "Always on top" & "Auto-hide".
With my application window having the focus and maximised, the task bar pops correctly in Win98 when I bring the mouse pointer to the bottom of the monitor, but on XP, the task bar does not popup.
I register the window as:
memset(&wc,0,sizeof(wc));<br />
wc.style = CS_BYTEALIGNWINDOW | CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;<br />
wc.lpfnWndProc = MainWindowProc;<br />
wc.cbClsExtra = 0;<br />
wc.cbWndExtra = 0;<br />
wc.hInstance = hAppInst;<br />
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);<br />
wc.hCursor = LoadCursor (NULL, IDC_ARROW);<br />
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);<br />
wc.lpszMenuName = NULL;<br />
wc.lpszClassName = szAppName;<br />
<br />
RegisterClass (&wc);
and I create the window as:
hwndPrimary = CreateWindow(szAppName,
szPrimaryTitleBar,<br />
WS_POPUP | WS_BORDER,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hAppInst,
NULL);
and then do:
ShowWindow(hwndPrimary,sw);<br />
<br />
ShowWindow(hwndPrimary, SW_MAXIMIZE);
Note - I use window style WS_POPUP | WS_BORDER because I need maximum size client area. I can't waste space on title bar, thick border, etc.
If I do not maximise the window, the task bar pops up just fine, but the moment the application is maximised (which I need to do), the task bar does not pop up properly. The problem only occurs under Windows XP. When I run the EXE under Win98, the task bar pops up as expected.
Any suggestions?
|
|
|
|
|
Statically linking a project includes all code in dll into exe file, so the dll is no more needed on target machine, how can we do same fo activex controls, ie linking or using in such a way that they are included in exe and no more need for installing/registring on target machines?
|
|
|
|
|
Dll are never statically linked to an exe !! Lib files are statically linked but dll never (a lib file is the same that a dll file, except that here the linkage is static and with a dll the linkage is dynamic).
So, for activeX, you cannot statically link them to your project. You need to install and register them if you want to use them on a target machine.
|
|
|
|
|
i already know how to communicate through th serial port but i am not able to control the CTS, RTS and DTR pins of the Com port.. please tell me how to change the status of these pins in VC++ 6 through API.
syed abdul qavi
|
|
|
|
|
Take a look at the EscapeCommFunction (for setting/clearing RTS and DTR) and at GetCommModemStatus to get the status of the CTS line.
|
|
|
|
|
i m success to setting RTS and DTR but anable to get status of CTS and DSR i m trying GetCommModemStatus but i m not success to get so plz. tell me how to get status of that pins.
thanx
Syed Abdul Qavi
|
|
|
|
|
Hello,
Is there a way to configure the way VC generates the #include statements?
- Keep/Generate header file names case sensitive. (When using the 'Add Variable' wizard to add a member variable to one of your dialogs, the wizard will add the name of the corresponding header file but using lowercase letters)
- Do not use 'Absolute' Paths. (When creating classes, it adds an absolute path to the base class header file when the base class is one of your generic classes)
Is there a way to configure this?.
Is this OS deppendent? (If yes, where to configure it?)
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
I want to combine a lot of .jpg Files to an AVI File,what should I do? could you give me example?
|
|
|
|
|
|
|
Hi All,
I try to create some simple applications using WindowsForms. I use Visual Studio .Net 2003, Academic version.
Lets say I have a form and a button.
When I double click on the button, I create an event for click. Then I can
write all the code to deal with that event, and everything works fine. The
only problem I have is that the code gets written in the header file, instead
of being placed in the cpp file.
I have some experience programming with Borland C++ Builder, and I compare the results with the ones from BCB.
I expect that when I add an event, the function definition should be placed in the header file, and the function implementation, in the cpp file.
Did I miss a setup option, or is there an option set up wrong? I don't consider normal that all the code gets written in the header file. What is the right procedure, so that when someone adds an event for a button, the event function to be added to the cpp file?
I tried to move the function from the header file to the cpp file, and to leave the definition of it in the header, but now I get a lot of errors.
To make it worse, the samples provided by Microsoft don't contain code in C++, only VB and C#. Is C++ dying, should I start learning C# instead?
Regards,
Nicolae
|
|
|
|
|
Did the application run?
Nicolae Fieraru wrote:
Is C++ dying, should I start learning C# instead?
No C++ is not dying. There are times when you need C++ to write an application. But you should learn C#, it`s the future language.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Yulianto AKA goodmast3r wrote:
C#, it`s the future language
maybe it's yours, but i'm not sure i need it absolutely for what i program...
you use a language because you need its advantages, not because it is a supposed language of the future...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
you use a language because you need its advantages, not because it is a supposed language of the future...
It`s language of the future, because of it`s advantages, simpleness.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
but admit you don't need all the C#'s features to program a simple HC-11 for example...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Yes true.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
Yulianto AKA goodmast3r wrote:
But you should learn C#, it`s the future language.
I just have seen some MS-guys marketing the Whidbey compiler saying that C++ will be *the* prime .NET language when it comes to control of the code. It will not be as RAD as VB.NET, but all about control at the coselevel. You can seamlessly go from .NET-Framework to assembler and back to unmanaged C++ in one project.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
|
Thank you Selvam for your reply. I've already seen examples of console applications, my question is very specific, regarding the WindowsForms application. I start to think that actually very few programmers use C++ and WindowsForms at the moment, because I asked twice on the microsoft newsgroups and once in here and still nobody told me if it is normal to implement the events functions in the header or not. I talked to a programmer who is using VS .Net 2003 and MFC and he said that when he creates an event, it creates the body for function in the cpp file (as it should be). Which is not the case with WindowsForms. I don't mind having a tiny cpp file and a large header file with all the code in it, if this is what Microsoft intends to do. If that's the case, we should have been warned about this change of strategy...
Regards,
Nicolae
|
|
|
|
|
Hello,
I get a link error when I compile, is there anyone that now hat it meens and now how I can fix this?
LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library
|
|
|
|
|
Only one version of the CRT library (C Runtime Library) may be linked to an application.
But different versions of the C Runtime Library exist for different application types - i.e single thread vs multiple thread vs DLL, etc.
You need to make sure the correct CRT library version is linked which in turn depends on your application type.
Search MSDN for the following topics:
"HOWTO: Link with the Correct C Run-Time (CRT) Library"
or just do a search on the LNK4098 error.
This will tell you which specific library you need to link based on your application type and how to exclude the CRT libraries that are not valid for your app.
Robert
|
|
|
|
|
Well I have a MFC there I have link a dll. I don't now how I can fix this!.
|
|
|
|