|
Hi,
Try ShowWindow(SW_HIDE).
With Regards,
Selvam
|
|
|
|
|
Hain Buddy,
This Trick is provided with courtesy From Nishant S
Overide WM_WINDOWPOSCHANGED Message then Use Mr Selvam technique of
this->ShowWindow(SW_HIDE);
or Visit http://www.voidnish.com for more detail about this
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
pubududilena wrote:
I want to hide the opening MFC Dialog ,when open the Application
What "opening MFC Dialog" are you referring to?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi!
i wanted to add multiple items toa list box, and tried using LBS_MULTIPLELSEL. Yet only one item is added. how do i do it? -V.G?
|
|
|
|
|
hi,
If u are doing this using Visual C++/MFC ,It is very easy to set Multiple selection to the ListBox.
Go the properties of the added List Box change the selection to 'Multiple'.
That's all.
|
|
|
|
|
V.G wrote:
how do i do it?
Like this:
m_listbox.AddString("Item 1");
m_listbox.AddString("Item 2");
...
m_listbox.AddString("Item N");
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
yes.. but how do i retrieve all the selected items.. i mean even though i select the items and store them in a buffer, only one item is added if i use AddString()
|
|
|
|
|
V.G wrote:
but how do i retrieve all the selected items
By using GetSelItems() .
V.G wrote:
...only one item is added if i use AddString()
How many times are you calling this function?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
HI!
i wanted to color a listbox, tried using WM_CTLCOLORLISTBOX as follows:
case WM_CTLCOLORLISTBOX:
{
SetBkColor((HDC)wParam,RGB(255,0,0));
return (LRESULT)hstaticbr;
break;
}
but it dosen't work. Please help me! -V.G
|
|
|
|
|
|
Hello,
I would like to know if anyone can help me out in generating an algorithm which gives alphanumeric characters.
Regards,
Mythri
|
|
|
|
|
That doesn't make sense...
Give an example of what you want. Do you want a random alphanumeric character? Or does this have to do with Keyboard Input?
|
|
|
|
|
Something like:
char RandomNumber( void )
{
return (rand() % 10) + 48;
}
char RandomUpper( void )
{
return (rand() % 26) + 65;
}
char RandomLower( void )
{
return (rand() % 26) + 97;
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
what is DDK. From whre could i get it.I have to develop a device driver.
pls help
|
|
|
|
|
That would cost you about $200. I don't think the DDK itself is downloadable without a MSDN subscription. The DDK reference however is available for everyone, like the content of the MSDN CDs.
I was also looking for the DDK to make a device driver for a virtual webcam, but I don't have any tools either to make device drivers.
|
|
|
|
|
Hello ,
I have a ownerdraw button on a dialog box which is created in an SDI application where buttons are members of dialog class and when evet i click the button i want the keyboard key event to be generated and that caracter should be displayed on the client area what should i do in sent message for this
for example if i have A on my button when ever user clicks that button keyboards keyevent should generate and that should be passed and displayed on editview area
i have a the function
void MyDialog::OnButton49()
{
/* unsigned char arr[256];
int i= GetKeyboardType(1);
GetKeyboardState(arr);
GetKeyNameText(49,"a",1);
//GetKeyboardLayoutList(
GetLastError();*/
// this->GetParent()->SendMessage(WM_PAINT,nRepCnt,nFlags);
//SetKeyboardState(;
//Get
// int i=GetKeyState(49);
// if(i==1)
GetParent()->SendMessage(WM_CAPTURECHANGED,49,1);
//n_butFlag=49;
}
like this for displaying 'a' on in my dialog class
Request to all to continue this
|
|
|
|
|
Take a look at MSDN - Keyboard Input[^]. There you can find messages you can pass to the window
that must think that someone pressed that specific key on the keyboard. You can send WM_KEYDOWN or WM_SYSKEYDOWN when the button is pressed, and WM_KEYUP or WM_SYSKEYUP when the button is released.
For instance, you could do
void MyDialog::OnButton49()
{
GetParent()->SendMessage(WM_CAPTURECHANGED,49,1);
GetParent()->SendMessage(WM_KEYDOWN, VK_A, NULL);
GetParent()->SendMessage(WM_KEYUP, VK_A, NULL);
}
I'm not sure about those VK_A (I'm at school now and I don't know the Virtual Key list by heart). You can also replace those NULLs by control codes that indicate if CTRL or AltGrp is pressed in addition.
By the way, don't include too much commented lines. It looks nasty and it makes it unreadable. There is also a way to use one single function for all buttons (with a custom WindowProc), so that you don't have to make a function for each button on your virtual keyboard.
|
|
|
|
|
I have a file in which data is entered in the below format
[KEYS/90]
CAPKLEN = 512;
CAPKEXP = 03 ;
CAPKMOD = C26B3CB3833E42D8270DC10C8999B2DA18106838650DA0DBF154EFD51100AD144741B2A87D6881F8630E3348DEA3F78038E9B21A697EB2A6716D32CBF26086F1 ;
SHA = B3AE2BC3CAFC05EEEFAA46A2A47ED51DE679F823
I need to create an application in VC++ so that the user who is unaware of this format will be able to enter data in to the file.
The Application requirement is that the user should be able to select one of the keys using a selection box.once the the key section is selected the corresponding fields will be dispalyed along with the original data and also the user will get an option for entering the new data.for eg:
the user selects section key/90 then the screen should display
CAPKLEN
CAPKEXP
CAPKMOD
then the user selects CAPKLEN and it's original value will be displayed along with an option for new value.
I hope the requirement is clear for you.if you have any doubts you can ask me.My PL needs this work to be finished very soon and i don't have much exposure in VC++.so i request you to please help me in this regard or please let me know where i can get some info on this.
|
|
|
|
|
Hi
From what I understand I feel its very easy task.
All you need to know is how to read and write from a file and display those values, right ?
For this what I suggest is some thing like this.
The file should be as [length in byte][data].
Hope this would help..
regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
You might want to look at WritePrivateProfileString and GetPrivateProfileString. Tbey will handle this format very easily.
Good luck.
Karl
|
|
|
|
|
As has already been mentioned, this is the format of a standard .INI file. Several functions exist for processing files of this type.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi,
Thank you very much for your valuable reply.I browsed some articles and i got to know what an INI file is and it is matching with my File format.Thanx a lot for the information.
Now my requirement is that i should read the file from the disk and display it.But the user should not be able to edit it directly.I have to give some options for adding a section or key.when a user selects add section option a combo box should be diaplayed populated with all the section in the file.can u pls guide me in this reagrd.ie,How to populate the combo box with the sections?
|
|
|
|
|
shanil80 wrote:
Now my requirement is that i should read the file from the disk and display it.
This is where GetPrivateProfilexxx() comes in.
shanil80 wrote:
But the user should not be able to edit it directly.
You'll need to hide the file, or change its permissions at the OS level. Whatever you do, however, will not keep the most determined person from altering the file.
shanil80 wrote:
How to populate the combo box with the sections?
TCHAR szBuffer[1024];
GetPrivateProfileString(NULL, NULL, "", szBuffer, sizeof(szBuffer), ...); Now make multiple calls to CComboBox::AddString() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi david,
Thank You very much for your valuable reply.I am taking about an application similar to DoneEx file manager.So if you can help me more in this plase do that.....I will be very thankful to you...
Can you suggest me some books or online documents where i can get some information on PrivateProfileString() and adding data to combo Boxes.
|
|
|
|
|
shanil80 wrote:
I am taking about an application similar to DoneEx file manager.
I'm not familar with it.
shanil80 wrote:
Can you suggest me some books or online documents where i can get some information on PrivateProfileString()...
Here.
shanil80 wrote:
...and adding data to combo Boxes.
Here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|