|
the icon is on the view .I draw some icon load from file.
I draw some text on the view also. when I select the text,the text's backcolor changed ,and the text is selected.
|
|
|
|
|
You can simply catch the event when mouse is moved on the icon and simply load another icon :P.
|
|
|
|
|
It's a good idea,but I think the icon look like selected when I click it .such as when I click the file folder icon in the WINDOWS XP ,the folder icon's backcolor is changed and it looks like selected.how do I do it?
could you help me?
|
|
|
|
|
Its a all drawing ... I mean if u have any bitmap/icon showing selected status ... You have to create such icon or search .. This is thing out of my scope .. Once u find it whatever way u choose, then u simply load that icon on click.
|
|
|
|
|
I draw some icons into view ,the icon is from a file.I also draw some text in the view . the view inherit from CSrollView.
but the icon can't be output at the end.
thank you .
|
|
|
|
|
Is it a displaying problem or printing problem? I don't know the solution if it is a printing problem.
void OnDraw(CDC* pDC)<br />
{<br />
HICON hi;<br />
hi = (HICON)LoadImage(NULL,"d:\\asd.ico",IMAGE_ICON,0,0,LR_DEFAULTSIZE | LR_LOADFROMFILE);<br />
pDC->DrawIcon(10,10,hi);<br />
}
this is this.
|
|
|
|
|
I tried,your solution is not able to resolve my question.
this is my code:
.....
hIcon=(HICON)LoadImage (NULL,iconPath,IMAGE_ICON,48,48,LR_LOADFROMFILE|LR_DEFAULTSIZE);
DrawIconEx(pDC->GetSafeHdc(), x-24, y+50, hIcon, 48, 48, 0, NULL, DI_NORMAL);
how should I do ?
could you help me
|
|
|
|
|
Your code works just fine. Just make sure that x-24 , and y+50 will be inside the client area.
Also make sure that LoadImage(...) does not return NULL .
this is this.
|
|
|
|
|
The x-24 and y+50 is in inside the client area.
The loadImage(...) returns a hIcon,I use this hIocn draw icon on the view ,and the icon can display while printing preview,but the icon is not able to print ,why? how can resolve this question?
I also draw text,but the text could be print
thank you.
|
|
|
|
|
See my first response. I never tried printing icons. Of course they show well in the print-preview, but I have no ideas about printing them, so I hope someone else can help you.
this is this.
|
|
|
|
|
|
What u get the HICON when u are printing ?. My sixth sense tells me that u might not storing HICON and when u call printing it it will be NULL. Either load it again when u r printing(which is a bad soln.) or store the HICON object and use it for printing.
|
|
|
|
|
I need to map network drives in Borland c++. I need an object or a function that takes the username and password as parameters.
many thanks
|
|
|
|
|
Use NetUseAdd() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi David.
I'm actually very new to C++ Builder. I did not really understand how to use this function. if you could please elaborate on its use or give me a complete piece of code.
Many Thanks,
Priya
|
|
|
|
|
Priya..k wrote: I'm actually very new to C++ Builder.
But this is a Visual C++ forum.
Priya..k wrote: if you could please elaborate on its use or give me a complete piece of code.
See here, here, and search CodeProject for more examples.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi there.But do you at least know someone who could help me or a message board where i can post this question. I badly need help regarding this issue.
Many thanks,
Priya
|
|
|
|
|
Priya..k wrote: I badly need help regarding this issue.
I provided you with three references, some even with examples. What more do you require?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
When I close a Dialog Window by the close windows cross, Its perfom a KillFocus, How can I avoid the code in the KillFocus or detect if the user did a click on close windows and do not perform the Killfocus code... Thanks
|
|
|
|
|
I think you can handle the WM_CLOSE message, which comes before any WM_KILLFOCUS message.
this is this.
|
|
|
|
|
Ok, I undersand. But the dialog that has the controls is a child and I close by the parent. Any Suggestion?
|
|
|
|
|
WM_DESTROY
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Ok, Thanks, but WM_DESTROY perfom after KILLFocus, I need to detect that the user is going out before the control run killfocus, thank you, and I think like you about Jesus....
|
|
|
|
|
I have been reading that use Container classes
insted of Array's .It also says that we can
insert inbetween a vector array. Can anyone
say me how ?
Its good if we can see and example .
Do mean that a vector can be used for functions like
ADD, DELETE,INSERT ,POP ,PUSH
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Here is a little example of class vector -s usage
do not forget to #include < vector >
...
template <class T>
void printVector(const std::vector< T > &integers2);
int _tmain(int argc, _TCHAR* argv[])
{
std::vector< int > integers;
cout<<"First size of array - integers : "<<integers.size();
integers.push_back(2);
integers.push_back(3);
integers.push_back(4);
integers[1] = 7;
integers.pop_back();
cout<<"\nElements of - integers in normal order : ";
printVector(integers);
cout<<endl;
return 0;
}
template < class T >
void printVector(const std::vector< T > &integers2)
{
for(int i = 0;i< integers2.size();i++)
cout<<integers2[i]<<" ";
}
...
Look in MSDN for details.
See deque and list classes also
Look here also
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
-- modified at 7:55 Thursday 29th December, 2005
|
|
|
|