|
This is when the control is first displayed, so there is no previous item. Anyway, it appears that by default the first item is selected when the first expansion happens. It happens after the expansion is handled because there is no selection during the handling of the TVN_ITEMEXPANDED message. At any rate, I fixed the problem by adding a root item without any text. That root item gets selected, but because it has no text, it doesn't appear selected.
Thanks for your help,
Royce
|
|
|
|
|
This is when the control is first displayed, so there is no previous item. Anyway, it appears that by default the first item is selected when the first expansion happens. It happens after the expansion is handled because there is no selection during the handling of the TVN_ITEMEXPANDED message. At any rate, I fixed the problem by adding a root item without any text. That root item gets selected, but because it has no text, it doesn't appear selected.
Thanks for your help,
Royce
|
|
|
|
|
Hello,
I am still stuck on something I posted a question about a couple of weeks ago (I thought I figured it out but that isn't the case). I am using VC++ 2003 .NET. I believe that I did install the Windows 2003 Server SDK but I am not sure how I can tell, I don't see it listed in add-remove programs nor under updates.
Anyway, I have tried to use both CFileDialog and GetOpenFileName and both cause a First-chance exception. The exception doesn't happen the first time the file dialog is displayed but it will always happen the 2nd time its displayed. The error is listed below. I have done tons of research on the net and it appears that a lot of other people are having the same problem but I havent seen any resolutions that actually work (most suggest its a problem caused by the Windows 2003 Server SDK).
Heres the error:
First-chance exception at 0x7ca51406 in SiteConsole.exe:
0xC0000005:
Access violation reading location 0x016d4980.
Debugging hasn't lead me anywhere...
Heres the code: it's pretty straight forward.
void CExcludeDlg::OnBnClickedBImport()
{
UpdateData(TRUE);
static char BASED_CODE szFilter[] = _T("Text File (*.txt)|*.txt||");
CFileDialog m_ldFile(TRUE, _T(".txt"), NULL, OFN_HIDEREADONLY, szFilter);
if (m_ldFile.DoModal() == IDOK)
{
}
UpdateData(FALSE);
}
On a side note how can I uninstall windows 2003 server SDK? This may fix the problem.
Thanks!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Does this happen on all machines or just one in particular? Does it happen if you statically link with the MFC libraries?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
This is an administration application and we only run it on 2 workstations both are Windows XP and it's failing on both.
In debug mode I see the exception but in release mode it just closes the application with out any errors.
My application is currently statically linked with MFC.
I did just find this on the MSDN forums http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=154126&SiteID=1
They claim this problem was fixed with version 7.1 but I am running v7.1.3088 and I still have the issue... I went into afxdlgs.h and OPENFILENAME is currently defined as __declspec(property(get=GetOFN)) OPENFILENAME m_ofn;
Strange.
[Had to edit the URL]
Whoever said nothing's impossible never tried slamming a revolving door!
-- modified at 12:30 Wednesday 26th April, 2006
|
|
|
|
|
I just found out Microsoft release a 2nd revision of the SDK that is causing a lot of issues. I am going to try that now... Man I hope they fixed this.
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
The R2 SDK didn't help.. I have narrowed this down though... It only crashes when I mouse over a file name it crashes right before it displays the tooltip... Very weird...
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Finally I found out what is causing the issue!! Now to try to figure out a work around...
After tons of searching on the net people were saying there is a shell bug with Adobe Reader 7.0 and to uninstall it to see if the bug goes away and IT DID!
Now is there a way to force the application to not load the acrobat dll? In the debugger I would see the CFileDialog load pdfshell.dll and then unload, on the second load if I do a mouse over to display the tool tip it would crash my app.
Whoever said nothing's impossible never tried slamming a revolving door!
-- modified at 14:34 Wednesday 26th April, 2006
|
|
|
|
|
By chance have you posted your question to the microsoft.public.vc.mfc newsgroup?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
See if this helps.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Yeah I found that one the other day too... Didn't make any difference... Microsoft has a patch but you have to call their support line to request it. I'm going to have work call and get the patch I think they have a support contract.
Thanks again for helping!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I was able to get a patch from Microsoft and it did fix the pdfshell issues. Thanks for all your help!
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
"5 out of 4 people have problems with fractions." - Albert Einstein
|
|
|
|
|
Hi,
I'm trying to max the volume of the system sound (the one you access through settings) programmatically. I can use waveOutSetVolume to set the volume of specific sound device to max but this doesn't seem to work if the sound is set to min in the settings panel.
Is there some separate way to set the system sound on WinCE? Specifically, the "system sound" being the noise that the PDA makes when you tap the buttons and such, the "master" volume setting.
Thanks!
Kelly Ryan
|
|
|
|
|
Hi
Does anyone knows where I can find some library, or any way, to display JPEG images with C++?
Thanks
|
|
|
|
|
You could use the CImage class
|
|
|
|
|
GDI+ works well. You can find documentation for it on MSDN.
Kelly Ryan
|
|
|
|
|
CImage m_Image;
m_Image.Load(m_String);
m_Image.BitBlt(0,0,800,600,&dc,0,0,SRCCOPY);//CPintDC dc(this) in Onpaint function
m_Image.Detach();
|
|
|
|
|
I need a free font editor.
I do find several trial and free software by google, but I don't have any experiences about them, could you suggest a freeware for me?
cheers
|
|
|
|
|
I want to draw a clear thin line on paper by printer (or both on screen) for barcode purpose - the thiner, the better.
My questions are:
1.which MapMode I should use? I guess MM_LOENGLISH is not good enough.
Do you know if MapMode is changed by font file while printing font?
2.If line is black, how to draw it with anti-aliasing?
thx
|
|
|
|
|
1) You can use whatever mapping mode makes sense for your application and state of mind.
Obviously, if you're using MM_LOENGLISH , you won't be able to specify a pen width of less than 1/100 of an inch, so it won't work if you plan to draw lines thinner than that. Otherwise, just make sure you take the mapping mode into account when creating the pen you intend to draw with.
2) Don't. Anti-aliasing is helpful for CRT displays, as it allows them to make up for their relatively low DPI by using their ability to display a wide range of color and luminance values - it's essentially a trick. By contrast, most printers can produce much higher DPI, while having little or no ability to vary the darkness of a given dot. Attempting to anti-alias a printed line will at best have no discernible effect, and at worst make the line look sloppy. Just draw the line, it'll look just fine.
|
|
|
|
|
This is the array program I made last night.
<br />
<br />
#include iostream <br />
using namespace std;<br />
<br />
int main()<br />
{<br />
const size_t arsize = 27;<br />
int a[arsize] = {0,1,2,3,4,5,6,7,8,9,10,<br />
11,12,13,14,15,16,17,18,<br />
19,20,21,22,23,24,25,26,};<br />
<br />
a[0] = 'a'; a[1] = 'b';<br />
a[2] = 'c'; a[3] = 'd';<br />
a[4] = 'e'; a[5] = 'f';<br />
a[6] = 'g'; a[7] = 'h';<br />
a[8] = 'i'; a[9] = 'j';<br />
a[10] = 'k'; a[11] = 'l';<br />
a[12] = 'm'; a[13] = 'n';<br />
a[14] = 'o'; a[15] = 'p';<br />
a[16] = 'q'; a[17] = 'r';<br />
a[18] = 's'; a[19] = 't'; <br />
a[20] = 'u'; a[21] = 'v';<br />
a[22] = 'w'; a[23] = 'x';<br />
a[24] = 'y'; a[25] = 'z';<br />
a[26] = ' ';<br />
<br />
int input; <br />
string cool;<br />
int end = 99;<br />
<br />
cout << "Programmed By Cody Rentschler\n" << endl; <br />
cout << "Alphabit Array testing." << endl;<br />
cout << "Numbers 0 - 26 only." << endl;<br />
cout << "Input 99 to exit out of loop." << endl;<br />
<br />
for (int can = 0; can != 1000000; cool.push_back(a[input]))<br />
{<br />
cin >> input;<br />
cin.ignore(100,'\n');<br />
if (input == end)
{<br />
break;<br />
}<br />
<br />
if (input > 26)<br />
{<br />
cout << "Error: Number to big" << endl;<br />
cin.get();<br />
system("cls");<br />
return main();<br />
}<br />
<br />
if (input < 0)<br />
{<br />
cout << "Error: Number to small" << endl;<br />
cin.get();<br />
system("cls");<br />
return main();<br />
}<br />
++can;<br />
<br />
}<br />
<br />
cout << "\n\n\n\n" << endl;<br />
cout << cool << endl;<br />
cin.get();<br />
<br />
<br />
return 0;<br />
}
Is this and example of how an array works or am I
using this function wrong.
Just wondering because i'm trying to figure out how arrays work.
Or is there an easier way to do this same program?
|
|
|
|
|
|
#hackC++ wrote: ...am I
using this function wrong.
What function?
#hackC++ wrote: Or is there an easier way to do this same program?
First you need to explain exactly what it is that you are trying to do.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
What function?
The array function or whatever an array does (I don't understand arrays)
What I'm trying to do is that when I type the number that corresponds to it's place in the alphabit it will print whatever letter coreesponds to the number, to a string.
for example if I input 6, 4, 11, 11, 14 the program will output "hello".
Just wondering if this is the ideal way of doing this. (by ideal I mean using an array).
|
|
|
|
|
#hackC++ wrote: (I don't understand arrays)
Then I would suggest familiarizing yourself with them. See here.
#hackC++ wrote: What I'm trying to do is that when I type the number that corresponds to it's place in the alphabit...for example if I input 6, 4, 11, 11, 14 the program will output "hello".
That should be 7, 4, 11, 11, and 14.
#hackC++ wrote: Just wondering if this is the ideal way of doing this. (by ideal I mean using an array).
Not really. I would opt for something like:
int number;
std::cin >> number;
std::cout << (char) number << std::endl;
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|