|
Use the CB_SHOWDROPDOWN message
SendMessage(m_combobox.m_hWnd, CB_SHOWDROPDOWN, 1)
SendMessage(m_combobox.m_hWnd, CB_SHOWDROPDOWN, 0)
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Very simple question how do you invert (or NOT) the bits in say a char .
e.g. char x = 0xCF;
<br />
Invert(x); From what I can see ther are only AND, OR and XOR that work on bitfields.
I am sure I am missing something!
Not too rude please.
|
|
|
|
|
use the ~ bitwise operator.
<br />
char x = 0xCF;<br />
char NOTx = ~(x);<br />
I Dream of Absolute Zero
|
|
|
|
|
Thanks, could not find it in my reference book or help.
|
|
|
|
|
http://www.codeproject.com/cpp/bitbashing.asp[^]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
if you want to reverse them you can use the Binary XOR (^) by 0xFF //(255)
example:
0xCF ^ 0xFF = 0x30
0x30 ^ 0xFF = 0xCF
|
|
|
|
|
Hello
I am developing an application with DLL support. I selected an MFC shared DLL accordingly and everything goes on fine, when I run the application from the Execute tool bar in the Visual Studio. But when I run the application independantly, by double clicking the executable in the Debug folder, I cannot load the DLL. Help me with a solution to this.
Regards,
Sreekanth Muralidharan,
Hyderabad
|
|
|
|
|
Check the working directory within VS. The DLLs must be in there.
Generally when an application looks for its DLLs it start by looking in:
* The working directory.
* The windows directory.
* The windows system directory.
You can either create a shortcut so that the working directory is the same. Build the application into the appropriate working directory or move/copy the DLLs the applictaion needs into its working (DEBUG) directory.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
When I import 32 bit icons into the resources, VS.NET removes the alpha layer from the 32x32 icon, thus making it into a 24 bit icon. Is there any way to make VS.NET stop doing that?
The only workaround I know so far is to add the icon resources manually by editing the .rc as a text file.
--
...Coca Cola, sometimes war...
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is how to change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi, I have done it, you must use DirectSound API and enumerate your sound card devices, then you can use their GUIDs to select each one separately.
I will take my program in codeproject as soon as possible.
|
|
|
|
|
Hi,can u send the program to me directly at xiayi@ustc.edu or max_xiayi@hotmail.com?
It is urgent for me.Thanks a lot.
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi
I have a problem where I want to retrieve data from an ASCII file(containing grid points) an sort it into another file(in this case VTK file format). The thing is that my source file contains alot of text and I want to be able to jump to a certain place for instance "Number of points = ". I have not found a suitable way to adress this problem. I know how to go to a certain position using the usuall operators fstream and so on where I only can go to a specif position. I have looked around but found nothing. Would be grateful for any help!
/M
|
|
|
|
|
Why you've not given the input file format? If you provide think it will be easier to answer your question.
Tomorrow is a blank page
Let me know if I am wrong with the information above
|
|
|
|
|
Thanks for pointing that out Manir.
The file is from a preprocessor called NASTRAN(Fintite Element calculations on mesh). It's a file in ASCII format called f06.
|
|
|
|
|
I am not sure if I really have understood your problem. But if you are trying to go to a location containing a predefined string you can use Knuth-Moris-Patt method to find it from a stream.
Tomorrow is a blank page
Please let me know if I am wrong with above information
|
|
|
|
|
Hello !
I need to know all the available COM ports on my computer. How can I do that ? Is it a function for doing that ?
Thanks
|
|
|
|
|
here is small code snippet,i found it from CSerrailPort clas at CP
// prepare port strings
sprintf(szPort, "COM%d", portnr);
sprintf(szBaud, "baud=%d parity=%c data=%d stop=%d", 19200, 'N', 8,1);
// get a handle to the port
m_hComm = CreateFile(szPort, // communication port string (COMX)
GENERIC_READ | GENERIC_WRITE, // read/write types
0, // comm devices must be opened with exclusive access
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTING
FILE_FLAG_OVERLAPPED, // Async I/O
0); // template must be 0 for comm devices
if (m_hComm == INVALID_HANDLE_VALUE)
{
// port not found
delete [] szPort;
delete [] szBaud;
return FALSE;
}
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi !
Thanks for your response but this is not what I'm looking for. I don't want to open every port to test if it exists. I'm lloking for a function (or maybe something in the registry ?) that gives me all the ports available on my machine.
|
|
|
|
|
You can detect all installed com ports by looking in the registry under HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM"
Forever Developing
|
|
|
|
|
Not sure if this will help but if you look in the registry
HKLM\SYSTEM\CurrentControlSet\Services\Serial\Enum
Gives a list of serial devices and a count!?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I think I've found another key that may help me:
HKEY_LOCAL_MACHINE\Hardware\deviceMap\SerialCOMM
and there is a list of (I think) all the serial port of my machine (virtual or not). Do you think this is a valid key (present on all computers) ?
Know, I want to retrieve the names (COM1, COM3, ...) but I don't know how to do this ? I can retrieve the number of 'values' but how can I retrive their values (I don't know the names of these keys...)
Any idea ?
Thanks
|
|
|
|
|
You can enumerate the registry by using
RegEnumValue
Check you local MSDN help files for more info
Forever Developing
|
|
|
|
|
Ok thanks, I will take a look.
This is the first time I use the registry so if you can point me to an article or something that describes how to use it correctly that would be nice
(In the MSDN, there is no doc about that, just the different functions and what they do )
|
|
|
|