|
Are you checking ::IsWindow(someobjecthandle) before calling the function? OnSize can get called before child windows are created.
|
|
|
|
|
No What exactly do i need to check here then whether the window i am trying to reziz has been created?
Peter
|
|
|
|
|
Usually I do something like this
if (::IsWindow(m_wndEditControl.m_hWnd))
{
bla.bla.bla.
}
OR
if (GetDlgItem(IDC_SOMECONTROL) && ::IsWindow(GetDlgItem(IDC_SOMECONTROL)->GetSafeHwnd()))
{
bla.bla.bla.
}
|
|
|
|
|
Dear Friends
In a List view following command is not working properly
This is to autosize the column widths
m_CList.SendMessage(LVM_SETCOLUMNWIDTH,x,LVSCW_AUTOSIZE_USEHEADER);
width of column 0 is not right. any way to fix this without updating
COMCTL32.dll.
Gau.
Gaurika Wijeratne. www.gaurika.com...
|
|
|
|
|
I don't think you need to modify COMCTL32.DLL . See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Gaurika Wijeratne wrote:
width of column 0 is not right.
How is it not right?
--------
I'm not sick, but i'm not well
And i'm so hot, 'cause i'm in hell... Harvey Danger, Flagpole Sitta
|
|
|
|
|
See the following in msdn
PRB: LVM_SETCOLUMNWIDTH Special Values Set Incorrect Column Width
any way problem is now ok
Thanks.
Gaurika
|
|
|
|
|
GET filename HTTP1.0\t\.... is the command for downloading from a HTTP server, but how to download from an FTP?
------------------------------------
Rickard Andersson, Suza Computing
ICQ#: 50302279
I'm from the winter country SWEDEN!
------------------------------------
|
|
|
|
|
RFC 959
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hello.
I'm executing a console application from my program, and is there a way to get information about what was an output of this program?
I know that porgram wich I'm executing using fprintf(stdout,...) to make an output to console.
Or how can I redirect its ouput to the file?
To lunch the program I'm using CreateProcess As it's described in
A newbie's elementary guide to spawning processes on this site (URL : http://www.codeproject.com/useritems/newbiespawn.asp)
Thanks.
Alexander
|
|
|
|
|
This article may help you...
http://www.codeproject.com/atl/redirect.asp
|
|
|
|
|
Thanks a lot. It helped )
Alexander
|
|
|
|
|
Check out this thread. It'll do what you are looking for, but it's in VB. It's not much to port it though.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
<nobr>
Homepage : Sonork = 100.16311 01000010011011110110001000100000011101110110000101110011 00100000011010000110010101110010011001010010111000000000
|
|
|
|
|
Thanks for attention! I solved the problem.
Alexander
|
|
|
|
|
Go to this site and download the pipe demo. I got this yesterday and it is great!
It will get the output of any console command.
http://sloat.bradsoft.net/c.php
Aoife
|
|
|
|
|
Hey Guys
This will probably be answered in 2min and make me look like an idiot but i just can't fiqure this out. I am writing my first SDI project and i can't fiqure out how to get a FormView i have designed to be displayed inside the CFrame for my project. What do i need to do to initalise this.
Peter
|
|
|
|
|
I'm assuming you are using MFC.
First, you need to derive a view class off of CFormView (through the Dialog editor or ClassWizard).
If so, in your app class (usually InitInstance), you need to set that new CFormView derived class in the code where your CSingleDocTemplate* object is being created. You will see it is using CMyAppView, change if to your CFormView derived class created earlier. (Be sure to include the view's header file.)
|
|
|
|
|
Hi guys - this is my first ever posting here so I'll start with an introduction. I'm Wilhelm Svenselius, I go by the nickname of "W2k" (not related to the operating system) and I enjoy C++ programming using Visual C++ .NET (7.0) as a hobby.
I've now put together my first MFC app worthy of distributing (as in, publishing for download on my personal website) - but I quickly realized that unlike the good old days of writing console apps that run in text-only mode, there are quite a few DLL's I need to include if I want people without the full range of MFC dependencies installed to be able to use my program.
Obviously, my installer will need to include at least a few of these DLL's. I looked at my EXE in Dependency Walker and there were a massive amount of system DLL's referenced, no way can I determine which (may) need to be updated on any potential target user's system for my app to work. MFC70.DLL and MSVCRT70.DLL are apparently not sufficient.
In my search for answers I found the pages
MSDN: Redistributing Microsoft Visual C++ 6.0 Applications and MSKB: Vcredist.exe Installs the Latest Run-Time Components for Visual C++ (Q259403). Neither is what I need; both are aimed at Visual C++ 6.0, the DLL's for which will clearly not do when I'm using Visual C++ 7.0.
However, a utility which automatically installs all the latest runtimes like the one found in the KB article, except for VS7.0, would rock. Sadly, I haven't been able to find one.
I have tried various installers: InstallShield is payware and it has funky copy protection which messes up my floppy drive, so I can't use that. NSIS is excellent but it can't figure out what DLL's I need to include on its own. Visual Studio.NET has a built in Setup Wizard which includes all the neccessary DLL's automatically, but the installer generated by that is massively ugly and I'd rather not use it. Anyone know how to use those .MSM "Merge Modules"? They seem to hold the files I need to include but I can't figure out how to open them. I have been strongly recommended against merely copying DLLs out of my windows\system32 folder.
My question all put together into one sentence (for those of you who can't be bothered to read all the above, or seek clarification):
How can I determine what DLL's to redistribute with my MFC application, and where can I get them?
Thank you for any help you might be able to provide.
[ PlanetCPP ][ home of the n00blist ]
|
|
|
|
|
Gee guys, thank you for all the help. I found a solution at last:
There is a file in the Visual Studio.NET root folder called "redist.txt" which contains a comprehensive list of what DLL's I must include.
Hope this helps others who might have the same problem as me.
[ PlanetCPP ][ home of the n00blist ]
|
|
|
|
|
Before I write my own....I need something to auto-magically cleanup resources such as HMODULE, new'd data, GDI objects, etc. Is there a template lib that can handle all these different data types?
For instance, for an HMODULE I need it to call FreeLibrary, for regular new'd memory I need to call delete pData or delete [] pArray.
I've looked through STL, ATL and WTL but they don't seem to have anything that does the trick.
I want to be able to write something like
AutoThingy<hmodule> hLib = LoadLibrary("some.dll");
or
AutoSomething<char*> pData = new char[123];
and not have to worry about the call to FreeLibrary or delete [] before I exit the function.
Todd Smith
|
|
|
|
|
|
Does that class make a distinction between a HGDIOBJ and a HMODULE and a pointer allocated with new , because all three of these types of objects need to be deleted in different manners?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Well, you instruct it how the delete semantics goes for your
kind of resource, via a destructor-policy (that is a template
parameter which takes a class that sole purpose is to implement
a Destroy(T) member function.
Now you can write things like this:
template <>
inline void CAutoDestructor<HANDLE>::Destroy(HANDLE hFile)
{
_ASSERTE(hFile != INVALID_HANDLE_VALUE);
::CloseHandle(hFile);
hFile = INVALID_HANDLE_VALUE;
}
typedef CAutoPtr<HANDLE, CAutoDestructor<HANDLE>, INVALID_HANDLE_VALUE> CFileHandle;
or something like:
template <>
inline void CAutoDestructor<HINSTANCE>::Destroy(HINSTANCE hLibrary)
{
_ASSERTE(hInstance != 0);
::FreeLibrary(hInstance);
hInstance = 0;
}
typedef CAutoPtr<HINSTANCE, CAutoDestructor<HINSTANCE>, 0> CLibraryHandle;
I seem to recall that boost has got a similar design, which
you might be interested in. Please check it also there.
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
Looks interesting, Thanks!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I have a CEdit derived class, which has to do the following
1. Whenever user types something, it highlights the text.
2. Remove the highlight, when the user presses Enter key.
The problem is:
I am not able to get a keydown or WM_CHAR message for the Enter key. The Edit box is on a dialog. So (1) works, but the edit box does not know that (2) happened.
Any suggestions?
Thanks
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|