|
The jist of it: I am trying to draw some lines and text over another window (which is actually an ActiveX control).
More details: Since I cant get the ActiveX control to draw to a memory device context so I can add lines in a nice way then blt to screen, I am trying a bit of a no-so-nice way of just drawing over the control. So I created a window that is a child of the ActiveX control window in the hopes that it will be drawn after the ActiveX control, but without erasing the background to effectively form a transparent overlay. Despite my logic, the windows do not seem to drawn in the expected order so I dont see the lines and text drawn in the child!
Q1: Am I just wasting my time trying to do it this way? Or is there something else I should be doing?
Q2: Would drawing the lines and text as a transparent DirectDraw overlay surface do what I want (I have zero knowledge in the area of DirectDraw, so forgive me if I am talking like a crazy man!)
Many thanks.
|
|
|
|
|
http://www.codeproject.com/wtl/splitpane.asp
i have dowloaded a project for splitting my sdi window from thw above url.but when i compile it it gives error
Could not find the file atlres.h
How to remove this error
When i simply comment this line
it gives 4 errors more
thanxs
|
|
|
|
|
|
neha.agarwal27 wrote: Could not find the file atlres.h
Does the file exist on the development machine?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I wanted my exe to be started as soon as the system starts and i have placed its path the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
as value name myexe
and value as g:\myfolder\myexe.exe; .
I made this using CRegKey functions.
Its getting added in the registry well and also getting sarted when my system restarts. But the path which i have specified in the registry is being changed from
g:\myfolder\myexe.exe; .
to
c:\myexe.exe
Can you please tell me why its happening like that?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
What does your code look like that is adding the key/value pair? Are you remembering to use two backslashes?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
yes David. Everything is ok. I am taking care of those all things and the value is also being set fine. and my application is also being executed when my system restarts. but the exe path which i have given given in the registry is being changed only after restart of the system.
KIRAN PINJARLA
|
|
|
|
|
My code is
CString data = app->appPath+"\\"+AfxGetAppName()+".exe";<br />
CRegKey reg;<br />
reg.SetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run",<br />
data,<br />
AfxGetAppName()<br />
);
this is executing fine.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: ...GetCurrentDirectory()
This is likely your problem. Don't assume what the CWD is.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
kiran.pinjarla wrote: app->appPath+"\\"+AfxGetAppName()+".exe"
GetCurrentDirectory will return "C:\folder\blah\etc" not "C:\\folder\\blah\\etc" so your slashes may get mangled
|
|
|
|
|
I haven't seen this issue discussed and I'm hoping its a simple answer. I am writing a new feature for a system that is deployed around the world (mostly Europe and Japan) that will send emails via SMTP based on certain events occurring. I have had no issues in writing the code and getting things to work correctly here in the US. But then something occurred to me...
If I deploy this thing oversees, can I expect to talk to an SMTP in a foreign country the same way I do here in the US (i.e. English commands)?
For instance, will HELO, EHLO (and the repsonses to the EHLO from the server), and the message commands like MAIL TO:, RCPT TO:, DATA:, From:, To:, Subject:, Reply-to:, and Date: be recognized as they are hard-coded English words or do I need to translate to the local languages?
Hoping that the server internals are all English but not sure. It would be OK if the error strings were internationalized, just worried about the actual commands to the server.
|
|
|
|
|
I believe that the RFC that defines the SMTP protocol does not allow for localized changes to the commands used by the protocol, so you should not have to worry about having to translate "HELO" to "HOLA" etc. I think the same goes for headers as well.
I am fairly certain about the first one, not as certain about the second.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I think its implied as well but not explicitly stated as it is an interface definition. I think the only room for localization would be in the message strings returned preceeding the return codes. I just get a little jumpy when doing international programming.
|
|
|
|
|
I would not worry too much about the textual portion of the return codes, only the 3-digit portion to indicate warnings, success, failure, informational messages, etc. and only log the textual portion (and/or show it to a user) when a problem occurs.
IME, today's SMTP servers are quite bad at providing detailed error messages when certain problems occur (spam-check failures usually return not much error information at all other than the 3-digit code), so again, I would not worry all that much about it. Remember that the protocols, while human-readable, are designed for automated use, so paying attention to just the 3-digit error code often works more than well enough.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I have a project with two rc files. Each rc file contain a cursor. When I try to link project, I receive error:CVTRES : fatal error CVT1100: duplicate resource. type:CURSOR, name:1, language:0x0
Build log:
Microsoft (R) Windows Resource To Object Converter Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
adding resource. type:CURSOR, name:1, language:0x0402, flags:0x1010, size:308
adding resource. type:GROUP_CURSOR, name:101, language:0x0402, flags:0x1030, size:20
adding resource. type:CURSOR, name:1, language:0x0402, flags:0x1010, size:308
CVTRES : fatal error CVT1100: duplicate resource. type:CURSOR, name:1, language:0x0402
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
Please help me to solve this problem.
|
|
|
|
|
You "only" got to understand the message. The cursor with the ID 1 is inserted in each file. You got to remove one.
Maybe you do this via including other header files in the *.rc files. Try to comment doubles out.
Greetings from Germany
|
|
|
|
|
I have two .rc files.
The contents of the files are:
resource1.rc:
1 CURSOR "file1.cur"
resource2.rc:
2 CURSOR "file2.cur"
No other contents in files.
And that two .rc file are in my project.
|
|
|
|
|
Look for #include "afxres.rc" string (usualy in TEXTINCLUDE 3 section)
It must be included in one file only
|
|
|
|
|
Hi,
is there an easy way (a function) to test if a CString contains only numbers?
Thanks
|
|
|
|
|
See
isdigit();
How to read your string?
|
|
|
|
|
WhiteSky wrote: atoi(m_Str);//return value is 0
If the string is as 12a3 then Index would be 12 and not 0 inspite of the fact that there exists a character in the third place.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
CString m_Str;
m_Str="123ABC";
Index=atoi(m_Str);//return value is 123
Gives 123 too, and m_Str doesn't contain only numbers...
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
speedy4711 wrote: CString contains only numbers?
CString str="1142654";
int i=atoi (str);
CString str1;str1.Format("%d",i);
if(str.GetLength ()==str1.GetLength ())
AfxMessageBox("string is pure number");
else
AfxMessageBox ("Characters exist");
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote:
if(str.GetLength ()==str1.GetLength ())
Doesn't work with eg.
CString str="0x1142654";
|
|
|
|
|
SilentSilent wrote: Doesn't work with eg.
Since this value you are entering is a string x is treated as a character only, it doesn't represent a hexadecimal number nor did I check for this.So I would try and provide a solution for this...
Thanks for pointing this out...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|