|
hi,
how to make check box control transparent when windows xp visual style is applied, i tried the following code but its work only if manifest is not included in application.
.
.
.
case WM_CTLCOLORSTATIC :
SetBkMode( (HDC)wParam , TRANSPARENT ) ;
return (LRESULT)hollow_brush ;
break ;
.
.
.
Thanks & Regards
|
|
|
|
|
Hi........
I have query.. How can i change the color of ToolBar Button controls at runtime.
|
|
|
|
|
For the 3D edges there's the TB_SETCOLORSCHEME message.
For the button bitmaps you need to change the bitmap associated
with the button or use TB_SETBUTTONINFO to set the button's image
to a bitmap with different color.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
On msdn2 website, when you search for a topic like Custom Draw,
then on the left tree, it will expand to the location CustomDraw.
Can MSDN installed local doing the same thing?
I can't find this function anywhere.
|
|
|
|
|
There is a button [Sync with Table of Content] on the toolbar. It only display the icon without text. The icon contains two green arrows, one pointing left and the other right.
Maxwell Chen
|
|
|
|
|
dear all
fatal error C1083: Cannot open include file: 'Centroids.h': No such file or directory;
the above problem occurred under compilation, i have already put header file "Centroids.h" in .cpp file, so what problem caused this case happened?
thanks a lot
Li Zhiyuan
4/01/2008
|
|
|
|
|
It should be in double-quote marks ("centroids.h").
You should also add the file(s) into the project.
Maxwell Chen
|
|
|
|
|
i added header file already,
Li Zhiyuan
5/10/2006
|
|
|
|
|
And what about another question of mine previously? (About the paths)
Maxwell Chen
|
|
|
|
|
How did you insert header file to your project?
|
|
|
|
|
i inserted header file in solution explorer, right click header files tap..and then choose add item..then choose .h file..i think this is no problem, it is right?
Li Zhiyuan
5/10/2006
|
|
|
|
|
1) Can you list the path of project, and the path of that file?
Example:
Project is at C:\Tmp\MyTest
Header file is at C:\Include\myheader.h
2) Any special characters in the path?
Maxwell Chen
|
|
|
|
|
li zhiyuan wrote: fatal error C1083: Cannot open include file: 'Centroids.h': No such file or directory;
What file is centroids.h being referenced from? Is this header file in a path that the IDE knows about? Have you tried using a fully-qualified path in the #include statement, like:
#include "c:/program files/microsoft visual studio/.../centroids.h"
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
centroids.h is just a class what i created in header file, it is very simple
Li Zhiyuan
5/10/2006
|
|
|
|
|
Hi
In my system not installed languagepack.when i paste chinese characters in rtf ..
In sending i wrote this code...
m_chattext.GetWindowText(m_Text);
AfxMessageBox(m_Text);
here m_chattext is rtf object.
in messagebox the chinese characters are not displaying..its coming ???? how i can solve this problem ...plz tell...
#sanroop#
|
|
|
|
|
Define UNICODE in the preprocessor definitions of project settings to make it support Unicode.
Maxwell Chen
|
|
|
|
|
First of all, make sure the appropriate language is installed on your machine. Next to it, make sure that you are making an Unicode build and not an ANSI build. Remove the _MBCS preprocessor directive and add the preprocessor directive:
#define _UNICODE //with the underscore.
This will implicitly add the preprocessor directive:
#define UNICODE //no underscore. (this is for windows api functions)
So, the compiler will make wide calls for both CRT functions and windows api functions and your application will be able to understand Unicode.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
modified on Friday, January 04, 2008 11:26:44 AM
|
|
|
|
|
This blog is even interesting!
(Sorry that my system is having problem to paste texts onto CodeProject. I can only type raw URL without a hyperlink.)
http://blogs.msdn.com/oldnewthing/archive/2004/02/12/71851.aspx
Maxwell Chen
|
|
|
|
|
Yes, I've read that years ago. If I remember it right, Jeffery Ritcher's book has a very detailed explanation of this very interesting stuff.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
Hi all,
First I create a dynamic buffer and set all element to zero. Then add a int value first to the buffer. Then after that int value add a string to the buffer, actually at the end of int value. But seems my code overwrite each other.
Here is the code,
char* tmpBuffer = new char[10];
::memset(tmpBuffer, 0, 10);
::memcpy(tmpBuffer, &iReq, 4);
::memcpy(tmpBuffer, &strGetName, 6);
How can I avoid this.
I appreciate your help all the time...
Eranga
|
|
|
|
|
memcpy(&tmpBuffer[4], &strGetName, 6);
Maxwell Chen
|
|
|
|
|
You mean like this,
::memcpy(&tmpBuffer[0], &iReq, 4);
::memcpy(&tmpBuffer[4], &strGetName, 6);
Great.........
I appreciate your help all the time...
Eranga
|
|
|
|
|
a good idea would be to use sizeof, ie:
::memcpy(&tmpBuffer[0], &iReq, 4);<br />
::memcpy(&tmpBuffer[sizeof(int)], &strGetName, 6);
|
|
|
|
|
Haroon Sarwar wrote: a good idea would be to use sizeof, ie:
::memcpy(&tmpBuffer[0], &iReq, 4);
::memcpy(&tmpBuffer[sizeof(int)], &strGetName, 6);
Refined as below:
memcpy(&tmpBuffer[0], &iReq, sizeof(int) );
memcpy(&tmpBuffer[0 + sizeof(int)], &strGetname, 6);
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: Refined as below:
memcpy(&tmpBuffer[0], &iReq, sizeof(int) );
memcpy(&tmpBuffer[0 + sizeof(int)], &strGetname, 6);
Further refined as
memcpy(&tmpBuffer[0], &iReq, sizeof(iReq) );
memcpy(&tmpBuffer[0 + sizeof(iReq)], &strGetname, 6);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|