|
I'm sorry that my information is not enough.
More information
1) My computer has 2 OS (Windows 2000 Advanced Server
and Windows 98 SE). I develop on windows 2000 Advanced Server
and It's work. after this I copy my app and the Dependence
to Window 98 and run it.(it's work)
2) The another computer that I try to run is
Windows 2000 Profressional)
3) My Application (Screen Mate) does as following;
- Windowless
- SetWindowRgn
- Draw Bitmap on Window Region
Thanks a lot for your kindness
|
|
|
|
|
Work backwards then - do a build without the draw, see if it crashes. The don't set the region, see if it crashes. Then you can figure out where the problem is.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Remember that amateurs built the ark. Professionals built the Titanic.
|
|
|
|
|
Debug it on the puter where it crashed.
Either install what you need to debug or do remote debugging.
/Magnus
|
|
|
|
|
I'm sorry for posting so much code, but since i really dont have any idea why is isn't working I dont know what to show and what not to.
Using the debug tool I have managed to figure out my app crashes at run-time when it executes this line
int int_mode = 0;
CString str_buffer;
if(int_mode == 1)
im sure there is something I dont know im doing wrong, so please enlighten me its been driving me crazy most of the afternoon.
int format_chars(int int_offset, CString input)
{
int i = 0;
int a = 1;
int output = 0;
int int_mode = 0;
CString str_buffer;
while(true)
{
if(int_mode == 1)
{
if(input.GetAt(i) == ' ')
{
output = atoi(str_buffer);
return output;
}
str_buffer += input.GetAt(i);
}
if(input.GetAt(i) == ' ')
{
a++;
if(a == int_offset)
{
int_mode = 1;
}
}
i++;
if(i > input.GetLength())
return -1;
}
return -1;
}
|
|
|
|
|
if(i > input.GetLength())
should be if i >= input.GetLength(); For efficiency you should also put this value into a const int prior to starting your loop.
The reason for >= is that the string is zero indexed, so a string with a length of 5 has only values up to [4].
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Remember that amateurs built the ark. Professionals built the Titanic.
|
|
|
|
|
if string = NULL or empty so CString::GetAt(0) raise assertion.
So first you need check if it not empty and i < CString::GetLength()
|
|
|
|
|
|
People like me now know how to read these subjectless mails without difficulty.
I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002
|
|
|
|
|
Nice try, a**hole.
--------
Have you hugged your monitor today? --Shog9 --
|
|
|
|
|
Looks like he wanted the page to refresh always. Poor fellow he failed miserably
I have never wasted time worrying about such insignificant things. Keep your eye upon the donut and NOT upon the hole. - Bill Sergio about posting in the right forum. The Lounge - June 23, 2002
|
|
|
|
|
Almost, it was a redirect, trying to send people to another site. I'm glad to see Chris is blocking those now! (that, or the guy was just too stupid to do it right... i'm not going to check.)
--------
Have you hugged your monitor today? --Shog9 --
|
|
|
|
|
|
The website looks cool though.
|
|
|
|
|
I need to write a small app that would manage the Java SDK. but i can't seem to get it to work. The problem becomes bigger since i have to deal with the issue of source files and class files. I think it may have to do with directory.
|
|
|
|
|
Here is what I have so far in the ChildFrm.cpp file(this is an MDI program).
int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
//create the status bar
m_StatusBar.Create(this);
m_StatusBar2.Create(this);
//width of text we want to display
CRect textRect;
CRect textRect2;
CClientDC aDC(&m_StatusBar);
CClientDC aDC2(&m_StatusBar2);
aDC.SelectObject(m_StatusBar.GetFont());
aDC.SelectObject(m_StatusBar2.GetFont());
aDC2.DrawText("Line #: ", -1, textRect2, DT_CALCRECT);
aDC.DrawText("File: ", -1, textRect, DT_CALCRECT);
//set up status bar big enough to take the text
int width = textRect.Width();
m_StatusBar.GetStatusBarCtrl().SetParts(1, &width);
int width2 = textRect2.Width();
m_StatusBar2.GetStatusBarCtrl().SetParts(1, &width2);
//Initialize the text for the status bar
m_StatusBar2.GetStatusBarCtrl().SetText("Line #: ",0,0);
m_StatusBar.GetStatusBarCtrl().SetText("File: ", 0,0);
return 0;
}
I need to display the open file name in the status bar. Right now, I get:
Line #:
File:
Is there a command for this? I haven't found one.
Thanks for any hints.
Best,
John Soares
support@onlinescamreports.com
|
|
|
|
|
Fill a string (maybe use CString::Format) with the text you want to display ("File:" + filename) and then output that. You're setting the text as 'File:' but nowhere are you specifying that you want the filename itself to be output as well.
This reminds me of that song "My boomerang won't come back". The answer "first you have to throw it".
cheers,
Chris Maunder
I spent a minute looking at my own code by accident. I was thinking "What the hell is this guy doing?" - @Logan
|
|
|
|
|
I've been mucking about with screen savers and need to add multi-monitor support to it. How would I go about it? Surely there needs to be a
Switch (<<Some Message>>)
Case <<some keyword>>:
break;
<br>
Case <<other keyword>>:
<br>
break;
Any help would be greatly appreciated.
"If at first you don't succeed.....you must be installing Windows..."
Windoze CP - Windows without the cr*p (Now with automatic bug eliminator!)
Hey so what if I'm a geek! Byte me!
|
|
|
|
|
Use GetSystemMetrics ( or GetDeviceCaps, I forget ) and ask for the size of the virtual screen. Something like SM_CXVIRTUALSCREEN. I'm making this up, but whatever the flag is, that is how I did it and it works great.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Could anyone who is going to get irrational about me quoting their posts here please insert the following notice into their signature:
I am a whiny pussy
|
|
|
|
|
I've used the Multi-Screen code from Ben Bryants screensaver to get the points but I need to know the messages that tell the app what setup the client has at runtime. There must be some message or flag that tells the app whether or not there is more than one monitor and for that message I can implement my point variables.
"If at first you don't succeed.....you must be installing Windows..."
Windoze CP - Windows without the cr*p (Now with automatic bug eliminator!)
Hey so what if I'm a geek! Byte me!
|
|
|
|
|
I don't think so, I never found it. I just queried the system for the virtual desktop and worked out the screen dimensions from that.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Could anyone who is going to get irrational about me quoting their posts here please insert the following notice into their signature:
I am a whiny pussy
|
|
|
|
|
|
I just learned how to create help files using rtf and hcw.exe, but the process seems a bit clumsy to me. A quick check at www.downloads.com reveals that there are many programms to aid in the creation of help files.
My question is what is the best way to create help files for windows applications. Should I use rtf or html help? Should I use notepad or a specialized program? If the latter is the case, what is the best program to use.
Any suggestions would be appreciated.
|
|
|
|
|
I've always used rtf (edit with Microsoft Word or WordPad) and hcw.exe but
for new application, I believe it's neat to use html help. But if you have a
lot of money, you may want to check for RoboHelp Office 2002!
By the way, Microsoft Html help compiler is free. A quick search at MSDN, you will
find everything you need.
Last Article:
Client/Server Socket class
|
|
|
|
|
Thanks I think I will give html help a try.
|
|
|
|
|
i have HBITMAP and destination HDC how use Scretchblt
|
|
|
|