|
|
jkhasjkhsakjdhaskjlhd l.. is that your language!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It seems you can speak like him.;P can you translate it.
I could found two words on your message "has","ask".
|
|
|
|
|
Hi,
I have a List control and I have to change the border color of it dynamically such as, on mouse hover, on focus etc. So I handled the WM_NCPAINT and draw the border with my own color. But when I have to change the color, how will I invoke the WM_NCPAINT. Can I send that message directly? Or is there any other functions that invokes this message indireclty?
N.B - I need to paint only the non client area.
Thanks
Naveen
[OpenedFileFinder]
|
|
|
|
|
If you're using MFC try something like this:
m_ctl.RedrawWindow(NULL, NULL, RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_UPDATENOW);
For raw Win32:
RedrawWindow(m_hWnd, NULL, NULL, RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_UPDATENOW);
Steve
|
|
|
|
|
But in this case paint message is also generated. I want to invoke only the WM_NCPAINT message.
|
|
|
|
|
Naveen.R wrote: Can I send that message directly? Or is there any other functions that invokes this message indireclty?
Call SetWindowPos with SWP_DRAWFRAME .
|
|
|
|
|
|
Is there a clean way to convert a #define constant like '#define MYNUM 3' to a long string for a parameter like 'SetDlgItemText (hDlg, IDC_EDIT1, MYNUM) ;'
Thanks!
|
|
|
|
|
you'd have to use sprintf or something, just the same as if you had the number 3 inline. Which in fact you do, the preprocessor replaces MYNUM with 3.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks but I am still hoping for something easier.
|
|
|
|
|
Hello Gentlemen,
I have another problem with the same project I was talking about in an earlier post.
This time my error is error C2228: left of '.current_energy' must have class/struct/union.
The code in question is...
caster.Creatures[i].current_energy = nrg[i];
I realize that Creatures[i] indicates a pointer, not an array, however I don't quite understand how to rewrite it to access that curren_energy data that I require at this point.
Any help would be much appreciated.
Thank you.
|
|
|
|
|
I should add more so you know where caster comes from.
Caster is passed by reference to this function ala
void SpellList::Flame_Control(player &caster, player &enemy)
Caster is of class player.
|
|
|
|
|
I apologize, it seems now that my syntax was correct, but I was a getting the error because the
int i;
in
nrg[i];
hadn't been defined in that scope. My apologies.
|
|
|
|
|
That's the number one problem moving from VC6. Once I realised that VC6 was non standard, I'd write loops like this:
int i = 0;
for(;i<10;++i)
knowing that I was writing standard compatible code that VC6 could use.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Using GetDriveType() I can determine that a logical unit is removable. How can I determine that is a CD/DVD unit? Or an USB drive?
In VC6++, please!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
I don't know if this will help, but I found this on MSDN
GetDriveType<br />
<br />
The GetDriveType function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.<br />
<br />
To determine whether a drive is a USB-type drive, call SetupDiGetDeviceRegistryProperty and specify the SPDRP_REMOVAL_POLICY property.
http://msdn2.microsoft.com/en-US/library/aa364939.aspx[^]
______________________
stuff + cats = awesome
|
|
|
|
|
Using GetDriveType() I can determine that a logical unit is removable. How can I determine that is a floppy unit?
In VC6++, please!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
|
Mark Salsbery wrote: Nice grammar in the title there, Microsoft
You know what ? I followed the link just to see the title and I came on the article but which was translated into french. But, the translation was done by an automatic system (like babelfish) and of course it is full of mistakes. And of course you cannot find a link to get back to the original article . What the hell !!
EDIT: just to give you an example for those who understand french, the title of the article is "Comment à obtenir d'informations de type de lecteur correspondant"
|
|
|
|
|
Cedric Moonen wrote: What the hell !!
You're on your own, my friend
I'm just a C++ programmer - I don't understand this interweb thingy.
LOL!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
OK I lied - you're not on your own.
I took a look at the link. On the right is a dropdown listbox under "Article Translations"
or "Traductions disponibles". I selected the French translation, but being a stupid American, I
have no idea if there's mistakes or not
*edit* So I wonder what the ORIGINAL language was
Good luck!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: On the right is a dropdown listbox under "Article Translations"
or "Traductions disponibles"
Yep, I didn't see it first. But if I want to change the language it still "reminds" that you came on the english article and the list is... in english. And of course, there is no english in the list. You first have to select another language and then you'll be able to choose english
Mark Salsbery wrote: Good luck!
In fact I don't care I was just curious about the title and what a surprise when I saw the article in french. I just wanted to rant about it
|
|
|
|
|
Cedric Moonen wrote: In fact I don't care ... I just wanted to rant about it
Exactly!
Cheers
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks!
I'll test!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|