|
See
<br />
CHeaderCtrl* m_Header=(CHeaderCtrl*)m_List1.GetDlgItem(0); <br />
int nCount = m_Header->GetItemCount(); <br />
|
|
|
|
|
WhiteSky wrote: CHeaderCtrl* m_Header=(CHeaderCtrl*)m_List1.GetDlgItem(0);
int nCount = m_Header->GetItemCount();
Or a slightly more readable way:
CHeaderCtrl* pHeader = m_List.GetHeaderCtrl();
int Count = pHeader->GetItemCount();
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
yes,
|
|
|
|
|
Sir,
I want to make the setup of my application in vc++6.0.please help.
Thanks
|
|
|
|
|
|
The Professional version of VC6 came with an optional package for creating InstallShield installation exe's. It will integrate with the IDE and is fairly simple to use for most applications.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
When running my programs in debug mode (not in the debugger) is it possible to ouput strings to the debug window still? Or any other similar function? OutputDebugString() only seems to work when stepping through the code.
|
|
|
|
|
You have to use F5, not Ctrl+F5, to see output from OutputDebugString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I already know that, as stated in my origional question. I am looking for a similar feature which will do the same job without stepping through the code (Ctrl+F5).
I'm thinking a quick way to do this would be to create a new console window and send the strings to that as opposed to the debugger.
|
|
|
|
|
waldermort wrote: I already know that, as stated in my origional question. I am looking for a similar feature which will do the same job without stepping through the code (Ctrl+F5).
Stepping through the code is not required.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
yeah, but only if there are no breakpoints in the path of execution.
I thought that maybe VS++ would have added the feature I am looking for, since I'm building with their tool it's only logical to assume I will also be debugging with it. Sometimes, especially with many loops, it's kinda hard to spot where an error occurs, but if the output is going to the window, like I want, atleast i could narrow it down a little.
|
|
|
|
|
|
I have a picture control on a dialog application.
My goal is to be able to paint the control area say White. Then write some text in black.
I retrieved a pointer dc to the picture control.
Then i did a GetClientRect to get the dimensions.
Now i do a FillSolidRect(pRect, RGB(255, 255, 255))
I figured that this should paint the picture control
This did not.
Then i tried to write the text by Creating a Pen in the color black
Then Using Drawtext from the dc to write out some text on the picture control
This did not work either.
This should be pretty easy so i must be using the wrong api's
Any ideas???
|
|
|
|
|
What are you trying to do exactly ? If you want to draw your own things on the picture control, then it is best to subclass it. Then, inside its OnPaint (or OnDraw, don't know exactly) you must put your drawing code. This function gets called each time the window needs repainting.
What functionalities of the picture control do you need exactly ? Wouldn't it be simpler to derive from a static control or simply from a CWnd object ?
|
|
|
|
|
Without seeing more code I can't say whats going wrong. I will have a guess at saying maybe you have got the wrong DC. Try calling FillRect() instead. Also for the text color, you don't need to select a pen, a simple call to SetTextColor() will do the job.
|
|
|
|
|
Can you show snippet code how do you use?
|
|
|
|
|
Hi
Does anyone knows how can I get the list of applications that appears when you try to open a file with a unregistered extension?
Thanks in advance
Sebastian
|
|
|
|
|
Sorry, I reread your question and realised I pointed you to the wrong location. For the "open with" list, open regedit and navigate to HKEY_USERS. You will see a few unique id strings which makes it hard to give you a specific location. Use the search feature and search for "openwithlist", it should bring up a list of file extensions and details for each program to use.
-- modified at 12:03 Friday 29th September, 2006
|
|
|
|
|
The problem, is that I dont have an specific extension to look for.
Maybe I could check all the file extensions, and get all the exe files
filter the duplicated ones, and that will give me all the apps list.
I hoped Microsoft already have some kind of funtion to do that.
Thanks a lot mate , I think I have a lot of work to do
|
|
|
|
|
no, all the open with's relate to each file type. So really you must know the file extension in order to know how to open the file. There is no such tool capable of doing what you want.
If you are trying to build a list of every instance of an "open with", you will need to parse each users account since one extension may not always be the same. Ie, I use UltrEdit for .txt files, but my wife uses Notepad (YuKK!!).
|
|
|
|
|
I needed a list of the main computer applications to authorize or deny the access of the application to a real time encripted disk.
|
|
|
|
|
I wouldn't rely on all the applications requiring access to be listed in the registry. For your type of application I would be more inclined to halt the process and prompt the user before allowing access, your own app can then store it's own list. Something similar to how a firewall works.
|
|
|
|
|
I found the solution to my problem.
To get a list of all the installed apps like the one you see when you select "Open With" after trying to execute a file with an unregistered extension.
You need to list the contents of the following registry key
Hope it helps someone in the future
HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
Windows
CurrentVersion
App Paths
|
|
|
|
|
if(i==SE_ERR_NOASSOC)
WinExec("rundll32.exe shell32.dll, OpenAs_RunDLL " +str, SW_SHOWNORMAL);
code for this
|
|
|
|