|
Why don't you ask on the forum at the bottom of the article ?
|
|
|
|
|
Hello everyone,
I am new here and also new to vc++.
I am making a dialog application using vc++. in one dialog, i have removed the "OK" and "CANCEL" button, only left the "red cross" at the right upper corner of the dialog. because i only want to use it to close the dialog.
now i add a combo box into the dialog. each time when i select the combo box and press the "enter", the whole dialog close !!!
does anyone know how to disable this feature? i only want to close the dialog by click the "red cross".
Thanks a lot.
neo.
-- modified at 3:05 Friday 18th August, 2006
|
|
|
|
|
You need to override OkOK() and OnCancel in your program
|
|
|
|
|
but i have already deleted onok(); and oncancel(); lines...... could you tell me more explitly what to do as i am quite new .....
thanks
|
|
|
|
|
actually the base class is processing the message.
so you should override it.
|
|
|
|
|
probably i should explain in more detail.
1st, it is a modeless dialog. and i want to limit to one instance of the dialog for one button. thus i reset the one variable( in PostNcDestroy()) each time the dialog closes.
if the dialog closed by "cross", it is no probablem to open it again. if you press "enter" in the combo box, then it wont open again. that means PostNcDestroy() is not called.
i wonder it is the combo box that close the dialog when it receives a "enter" key.
so i am stuck here now....
thanks for the help.
|
|
|
|
|
insert these lines to your program
<br />
ON_BN_CLICKED(IDOK, OnBnClickedOk)<br />
<br />
void CYourclass::OnBnClickedOk()<br />
{<br />
}<br />
<br />
public:<br />
afx_msg void OnBnClickedOk();<br />
<br />
|
|
|
|
|
dear WhiteSky,
thank you so much for the code. it has solved my problem already.
also thanks to all of you for sharing the knowledge with me.
actually i am an analog ic designer, and now i need to make a gui for an IC test program.
nice to meet all of you.
all the best
neo
|
|
|
|
|
|
Hello,
I need to get motherboard serial number in C++ (VS6) environtment without using WMI (need to run under Win98). Does anybody know how to do that?
Thanks
|
|
|
|
|
|
But there is nothing about getting motherboard id
|
|
|
|
|
I redistribute this inside my .msi's so WMI is available on WinNT installations. I don't support 95/98 but it appears that it will work with 95/98/NT. (Already installed on Me/2000/XP)
I have verified that this works on WinNT at a minimum. Be forwarned that the WMI service can be disabled by users who have access to Administrative management GUI's so make sure you check for it's presence before assuming it's running.
Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98/NT 4.0)[^]
-- modified at 11:09 Friday 18th August, 2006
Look up
"Win32_BaseBoard","SerialNumber"
Be forwarned, that sometimes this value is not available (empty or null or numerous space characters) so if your using this to perform some form of software license verification (that's what I use it for) you will likely want to include a few other, rarely modified hardware numbers like
"Win32_Bios","SerialNumber"
|
|
|
|
|
Hi all,
I have explored the MSMQEvent in VC++. But i can't get a Clear Picture, which is used to Capture the Arrival of any Message from the End User to invoke the MSMQ Service.
I want an example on MSMQEvent, Not all other stuff on MSMQ. please help me out.
Uday kiran
|
|
|
|
|
|
hi,.i am using printing class from the following URL
http://www.codeproject.com/printing/printlib.asp[^]
here i am sending my own rect..and MM_ANISOTROPIC instead of MM_TEXT.The table is printed correctly,but the text is not printed in the table,instead it is printed out side the table .
CPage* pPage = new CPage(rect,pDC,MM_ANISOTROPIC);
//create and use a table
TABLEHEADER* pTable = new TABLEHEADER;
pTable->PointSize = 10;
pTable->LineSize = 1;
//default shown only for demo purposes
pTable->UseInches = TRUE;
pTable->AutoSize = FALSE;
pTable->Border = TRUE;
pTable->FillFlag = FILL_NONE;
pTable->NumColumns = 5;
pTable->NumRows = 12;
pTable->StartRow = 0.0;
pTable->StartCol = 0.0;
pTable->EndCol = 8.0;
pTable->ColDesc[0].Init(1.0,"Item #",FILL_NONE);
pTable->ColDesc[1].Init(3.0,"Desc.",FILL_LTGRAY);
pTable->ColDesc[2].Init(1.0,"#Items");
pTable->ColDesc[3].Init(1.0,"Cost");
pTable->ColDesc[4].Init(1.0,"Ext Cost");
pPage->Table(pTable);
//place information in a table
pPage->Print(pTable,0,0,12,TEXT_LEFT|TEXT_BOLD,"123-009");
pPage->Print(pTable,0,1,12,TEXT_CENTER|TEXT_BOLD,"SmallCray Computer");
pPage->Print(pTable,0,2,12,TEXT_CENTER|TEXT_BOLD,"2");
pPage->Print(pTable,0,3,12,TEXT_RIGHT|TEXT_BOLD,"22.10");
pPage->Print(pTable,0,4,12,TEXT_RIGHT|TEXT_BOLD,"44.20");
delete pPage;
delete pTable;
|
|
|
|
|
Did you asked from writter this article
|
|
|
|
|
|
Hello everyone,
I am building a DLL file. But the related import library file .lib is not generated. I am using Visual Studio 2003. What points should I check in order to generate the import library file?
thanks in advance,
George
|
|
|
|
|
|
Very good resource, thank you Sarath!
regards,
George
|
|
|
|
|
Hi all,
To reteive the system time i used
CTime::GetCurrentTime();
When the return value is formatted I got the systm time in HOUR,MINUTES and SECONDS format..is there any function using which i can get 100th of a second also???
Thanks in advance
Rajeev
|
|
|
|
|
you can call GetAsSystemTime function of CTime to get SYSTEMTIME structure used to store the time. from that you can access milliseconds and other information supported
one more.
GetAsDBTIMESTAMP is also there you can get the fraction represents billionths of a second ranging from 0 to 999,999,999.
Note This method is only available when OLEDB.h is included.
See MSDN for more details.
-- modified at 2:14 Friday 18th August, 2006
|
|
|
|
|
Use GetSystemTime(LPSYSTEMTIME lpSystemTime) , which works with a pointer to SYSTEMTIME as argument:
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
SkyWalker
|
|
|
|
|
Hi,
I have developed an application which creates .mdb files in a specific folder named store . This folder is created during installation. But when the program is uninstalled, since there are additional(new) files in the folder store , the folder does not get deleted from the computer.
I thought, maybe I should create a small .exe program that deletes all the .mdb files from the store folder before the uninstall is run.
The problem here is that I do not know the names of the files in the folder. Is there anyway or any function by which I can find and delete all .mdb files from the folder store ?
Thanks.
Fortitudine Vincimus!
|
|
|
|