15,896,727 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 10781325 (Top 34 by date)
Member 10781325
16-Mar-16 11:21am
View
Thx for the anwser. Maybe this is true. But if i set up a new mfc project. I see the same behaviour. Why does mfc not take the default printer settings for all of the printers? Or do you know how i can change the settings before calling DoPreparePrinting? Thx for your help!
Member 10781325
1-Jun-15 7:00am
View
Thx for your help! I found (an ugly) solution. In vs10, default dpi-awarness is by default set on true. I set it on false, now my application looks as before;-)
Member 10781325
27-May-15 10:55am
View
hi, when i use setsize, only the toolbar height changes (becomes bigger, as i want)
But the bitmap stays small.... (i want, that it becomes bigger too)
I would take the resolution into account, but i cant even change the bitmap-size;-)
Member 10781325
4-May-15 16:46pm
View
ok, here is a brief summery: the chessboard is a control, which consists of a grid with 8 columns and 8 rows (= 64 fields). In each of this grid-fields is another control, which i called Field. A field consists only of an image. ( the image with the figure, which stays on this field.) It also has a dependency property called FigureNumber.
If this number changes, i load the right image.
In the code behind of the chessboardcontrol, i have an 8x8 array (arrChessBoard) of ChessFigures (which are the figurenumbers, these are extended bytes: INotifypropertychanged, see code). What i now want: if i change byte (chessfigure) in this array, the right image should appear in the chessboardcontrol. I set the figurenumbers of the arrChessBoard in the contructor of the chessboardcontrol, but no figure is showed...
Here is my code:
the first of the 64 fields of the schachboardcontrol (i left out grid.row = 0 and grid.column = 0):
schach:field figurenumber="{Binding arrChessBoard[0][0], Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" removed="BurlyWood">
public class ChessFigure : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
private byte _Value;
public byte Value
{
get { return _Value; }
set { _Value = value; OnPropertyChanged("Value"); }
}
void OnPropertyChanged(string propertyName)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(propertyName));
}
}
I dont know, why this does not function... There simply does not appear an image.
When i debug the program, i noticed, that the handler is always null and the event is never fired. But i dont know why;-)^^
thx for your time!
Member 10781325
29-Apr-15 9:29am
View
Thanks for your anwser, but i do not really understand, what you where writing. Can you try to explain it to me?
What is the strategy you think at?
Member 10781325
29-Apr-15 3:26am
View
Thx for your help! I found the solution by myself. The problem was not that postquitmessage(0) did not work. I had to change a flag in the creation of the new process:
BOOL bCreateProcessSuccess = CreateProcess(buffer, param, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, fileFind.GetRoot().GetBuffer(0), &startup, &info);
WaitForSingleObjectEx(info.hProcess, 2000, FALSE);
Btw: i am doing this, because our application has memory-leaks. It is a big beast and finding this leaks is a biiig task. By just restarting the process, now everything works. (i know not a very good solution:-))
Member 10781325
22-Apr-15 2:32am
View
Thx, was just a typing-error:-) didnt see that yester day evening:-)
thx all
Member 10781325
21-Apr-15 12:16pm
View
hmmm... I think that i know what exceptions are;-)
Its just, that CFile::Open never throws an exception: read this: (https://msdn.microsoft.com/en-us/library/hwbccf8z.aspx)
While the CFile constructor will throw an exception in an error condition, Open will return FALSE for error conditions. Open can still initialize a CFileException object to describe the error, however. If you don't supply the pError parameter, or if you pass NULL for pError, Open will return FALSE and not throw a CFileException. If you pass a pointer to an existing CFileException, and Open encounters an error, the function will fill it with information describing that error. In neither case will Open throw an exception.
Member 10781325
20-Feb-15 7:09am
View
yes, thanks all! i found a way: mouse Messages-> coordinates of click. With this, i can find the Pixel which was clicked. When i create the Picture, i hold a second Bitmap in the Background (not drawn, but same size), whose Pixels tell me, in which Region the click was. (e.g. red Pixels mean in Region 1, black Pixels in Region 2 and so on)
Member 10781325
20-Feb-15 3:14am
View
i am just searching a way of knowing, where to user did the click in the png-image. Do you have an idea, or an approach to achieve this?
What i have is a picture with several enclosed areas. Now i want to invoke different functions, depending on which area the user clicked on.
Member 10781325
19-Feb-15 5:18am
View
i know, its ugly, thats just test code;-)
Member 10781325
19-Feb-15 5:17am
View
Moved to the original question.
Member 10781325
19-Feb-15 4:52am
View
thx very much!! that does it:-)
Member 10781325
19-Feb-15 2:25am
View
Ok, thanks alot for your help! I will solve the Problem with a helper class:-)
Member 10781325
18-Feb-15 11:35am
View
thx for hint!
Member 10781325
18-Feb-15 11:35am
View
thx for you anwser!
Member 10781325
18-Feb-15 11:34am
View
thank's very much! That's exactly what i wanted to know!:-)
btw: by caching the memory you mean allocating memory with e.g. new or malloc?
or is there even a better place to hold it?
thx alot!
Member 10781325
7-Jan-15 7:26am
View
Ok, i have broken down the problem now to the following problem:
how can i set the order in which the external tool converts the included files?
any ideas?
Member 10781325
7-Jan-15 3:48am
View
Deleted
Thx for your Solutions!
I think using MSBUILD Tasks is the key. But i don't understand how i can use the Tasks. (Was reading now about 3 hours the MSDN - sites, but it seems that i am too stupid)
Is it right, that i have to define a Task outside of my other Project files?
I tried the following.
i have a Project mcl.vcxproj.
in this project, i have .def files, which m2cc.exe, an external tool, will convert to .sym files.
so, i defined a .props - file:
<<itemgroup>>
<<none include="*.def;*.mod">>
<<target name="m2cc">>
<<exec command="m2cc.exe m2cc -namelength=8 -log -proto=full -noconst -noenum -void -incl -versionkey -copyopenarray - nopropagate -debug -diag HERE_SOULD_STAY_NAME_OF_ONE_.DEF_FILE">><</exec>>
<</target>>
how can i give the Name of one .def file to m2cc.exe?
then, i include this .props-file in my mcl.vcxproj. But nothing happens...:-)
i am really confused.
can you help me with a simple example?
Member 10781325
30-Dec-14 3:47am
View
i think i found the solution, i downloaded a whole toolkit, then i created many visual Studio 10 Projects, using cmake. There i can set the right path...:-)
i am working on Windows 7 machine.
Member 10781325
20-Nov-14 5:25am
View
thx to you all, i just didnt write the WINAPI:-)
i thougt i was doing something completly wrong...
thank u guys!!!
Member 10781325
19-Nov-14 5:30am
View
ok, Problem is solved!:-)
i had to write externc , when i included the c-Header of the .lib Project in my c++ application
thank you all guys!:-)
Member 10781325
19-Nov-14 4:37am
View
yes, the functions use __stdcall.
it is a c-library, i am using c++, i put now extern "c" { api.h}
(this is the Header include for the imported functions of the .lib)
now i get some other (~20) link-Errors:
msvcrtd.lib(MSVCR100D.dll) : error LNK2005: _printf already defined...
i think These are configurations in the Project...
thank you for ur Responses!!!! you put me on the right way
Member 10781325
18-Nov-14 11:09am
View
thanks a lot!!!!!!! ur anwser solved the problem: i compiled my .c and .h files as lib-project. (There was also a .def file)
you saved my day!
Member 10781325
21-May-14 10:41am
View
an additional question for you:
i have now the inline Image in my emailbody. now, the Receiver of the mail
can rightclick the Image and download it.
this sould not be possible, is there a way to prohibit that?
thx:-)
Member 10781325
20-May-14 11:32am
View
yes, i finally solved it:-)
thank you soooooooooooooo much! you saved my life!!!!:-)
so happy now;-)
Member 10781325
15-May-14 5:30am
View
ok, thank you!
Member 10781325
14-May-14 7:41am
View
Ok, i understand, sorry for my confusion;-)
where do i find the message source to examine it?
thanks for this great idea!!!:-)
Member 10781325
13-May-14 15:58pm
View
what do you mean by creating an email? programmatically? what is the mailer? e.g. outlook?
if yes, how can i use it for examining the message?
my problem is, that always the image is in the attachment, instead of in the textbody...
i did set content-disposition to inline...
Member 10781325
8-May-14 8:34am
View
has someone code, that works?:-)
Member 10781325
7-May-14 16:12pm
View
any idea what is wrong?
i am sooo exhausted...
Member 10781325
7-May-14 9:53am
View
Deleted
haa
Member 10781325
7-May-14 5:39am
View
thx for the quick anwsers!<br><br>
i am using gmail, that should be a good mail Client... or not?^^<br><br>
<br><br>
i am using the send method of MSDN (http://msdn.microsoft.com/en-us/library/windows/desktop/ms740149(v=vs.85).aspx)<br><br>
<br><br>
so i send several strings to a socket. I am sending the following strings:<br><br>
<br><br>
MAIL FROM:<example@gmail.ch><br><br>
RCPT TO:<example@gmail.com><br><br>
DATA<br><br>
Content-Type: image/cgm<br><br>
Content-Transfer-Encoding: base64<br><br>
Content-Disposition: inline<br><br>
--encoded image---<br><br>
.<br><br>
quit<br><br>
<br><br>
what is wrong here...?:-)
Member 10781325
2-May-14 2:52am
View
many thanks! i will try it with your references and i will post further questions/the solution!
i dont need a clickable reference, but just an image to watch at:-)
thank you!
Show More