|
In the list box double-click handler, call CDialog::OnOK(); .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
ravi's right.
call OnOK() if you want you program to behave as if OK button where pushed (or the button with IDOK id if OK is not its name),
call OnCancel() do close the dialog as if IDCANCEL id's button were pushed.
you can also call EndDialog() to close the Dialog without calling one of the two functions below...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I want to know external definition model of VC++.
but I can't find that information in the web.(probably my mistake...?)
I know 4 external definiton model.
-commonmodel
-relaxed reference/definition model
-strict reference/definition model
-initializer model
Somebody help me please....TT
fksdljflkvmxlcvxcv
|
|
|
|
|
I've never heard, let alone used, any of these terms before. What are they for?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
I am new to driver development and I will apreciate if you could help me with my small project.
I am rebuilding ramdisk from known microsoft sample and my interest here is:
1) to get file/directory name which is send or requested by the system
2) process those files by redirecting buffer to another location
3) Showing those file names on a virtual drive as it was actualy copied on it (wonder if its possible to show file names and its size which might not exist at all)
I found a function RamDiskReadWrite within MS Ramdisk sample which is DispatchReadWrite routine, but it reads and writes on very low level ( if I am not mistaken ) like it showen below:
_________________________________________
PIO_STACK_LOCATION irpStack;
PDEVICE_EXTENSION devExt;
...
devExt->DiskImage + irpStack->Parameters.Read.ByteOffset.LowPart
_________________________________________
Is it correct to get file/directory names in code above like this:
irpStack->FileObject ......
if it so could you please extend little bit this code for me.
When I want to read from virtual drive how can I pass buffer from CRT function fread to the system or if its not possible is there any other solution for this?
Thank you very much in advance.
|
|
|
|
|
i have try our the tutorial for diolog n window from the website, but the program just can run 1 time only , the next time i try to run it again it can't work , y is it like tat . n there is some code tat i dun understand for the engine type,after click for the search button
here is the code:
void CSearchDlg::OnSearch() <br />
{<br />
CString strEngine;<br />
int nReturnValue;<br />
<br />
UpdateData();
<br />
m_strSearch = m_strSearchFor;<br />
nReturnValue=GetDlgItemText(IDC_ENGINE, strEngine); <br />
<br />
UpdateData(FALSE);
<br />
if(nReturnValue>0)
{<br />
if(strEngine=="Yahoo")<br />
{<br />
m_strSearch = "http://search.yahoo.com/search?p=" <br />
+ m_strSearch;<br />
ShellExecute(NULL, "open", m_strSearch, <br />
NULL,NULL,SW_SHOWDEFAULT);<br />
}<br />
<br />
else if(strEngine=="Altavista")<br />
{<br />
m_strSearch = <br />
"http://www.altavista.digital.com/cgi-bin/query?" + "<br />
pg=q&what=web&fmt=.&q="<br />
+ m_strSearch;<br />
ShellExecute(NULL, "open", m_strSearch,<br />
NULL,NULL,SW_SHOWDEFAULT);<br />
}<br />
<br />
else if(strEngine=="Excite")<br />
{<br />
m_strSearch = "http://www.excite.com/search.gw?trace=a&search="<br />
+m_strSearch;<br />
ShellExecute(NULL, "open", m_strSearch,<br />
NULL,NULL,SW_SHOWDEFAULT);<br />
}<br />
<br />
else if(strEngine=="Askjeeves")<br />
{<br />
m_strSearch = "http://www.askjeeves.com/AskJeeves.asp?ask="<br />
+m_strSearch;<br />
ShellExecute(NULL, "open", m_strSearch,<br />
NULL,NULL,SW_SHOWDEFAULT);<br />
}<br />
<br />
<br />
}<br />
}
This is where when i execute it , come out error said tat cannot contain 2 pointer.....
- else if(strEngine=="Altavista")
|
|
|
|
|
Hi!
I posted here once more to hope that somebody can help me.
I included in my application a DLL which waits for key press. I realized the questioning (hook) of key press in the DLL. So, when I start my application the
DLL will be started too. The DLL works well. But conditioned that the DLL can register the key press without focusing to my application, I do not know how to
set the focus automatically to my application when the DLL registers a special key press as like as 'F9'.
Here is the code snippet in the DLL I tried to realize:
#pragma data_seg .....
HWND g_hWndServer = NULL;
#pragma data_seg()
#pragma comment(linker, ....
LRESULT CALLBACK KeyboardTracker( int code, WPARAM wParam, LPARAM lParam )
{
if (code==HC_ACTION)
{
if ( wParam == VK_F9 )
{
PostMessage(g_hWndServer, VK_F9, 0, 0);
}
}
return ::CallNextHookEx(g_hHkKeyboard, code, wParam, lParam);
}
__declspec(dllexport) BOOL TrackerInit(HWND hWnd)
{
if ( g_hHkKeyboard == NULL )
{
g_hHkKeyboard = SetWindowsHookEx( WH_KEYBOARD, KeyboardTracker, g_hInstance, 0 );
}
_ASSERT(g_hHkKeyboard);
if ( !g_hHkKeyboard )
{
return FALSE;
}
else
{
g_hWndServer = hWnd;
return TRUE;
}
}
In my application I call the DLL by calling the Dll-function in the event 'OnInitDialog':
BOOL CMyApplicationDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
HWND hWnd = NULL; <<<<<<<========
TrackerInit(hWnd);
return TRUE;
}
How can my application valuate the information of the PostMessage of the DLL????
Is that way upon correct or not?
Where can I place this code to my application?
In hope that anyone know what I mean: Thank you in advance!
|
|
|
|
|
nne-vitamin wrote:
I do not know how to
set the focus automatically to my application when the DLL registers a special key press as like as 'F9'.
Have a look at hot keys. Lookup RegisterHotKey() or WM_SETHOTKEY in MSDN
"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! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I have been using the M$ techniques given in "How to determine when a page is done loading in webbrowser control". This works most of the time but when I go to www.s1jobs.com it doesn't detect the end of downloading. I get the following messages in my prog
OnBeforeNavigate2 is going to http://www.s1jobs.com
OnDownloadComplete
OnBeforeNavigate2 is going to http://www.s1jobs.com/nav_universal.shtml
OnBeforeNavigate2 is going to http://www.s1jobs.com/welcome_signedout.html
OnBeforeNavigate2 is going to http://www.s1jobs.com/tracker.html
OnBeforeNavigate2 is going to http://www.s1jobs.com/main_home.shtml
OnDownloadComplete
OnDocumentComplete with URL http://www.s1jobs.com/tracker.html
OnDownloadComplete
OnDocumentComplete with URL http://www.s1jobs.com/nav_universal.shtml
OnDocumentComplete with URL http://www.s1jobs.com/welcome_signedout.html
Does anyone know of a better way of detecting the end of a download?
|
|
|
|
|
Is it possible to use OLE DB technology to access DB by a data access class derived from CRecordSet ? Or is it sure the class derived from CRecordSet always use ODBC technology ?!!
And is it safe for ATL COM dlls to use the DLL using the above class(CRecordSet) for data acess.
Thanks in advance.
|
|
|
|
|
Hello .
I need in MFC application that multiple CStatic control blinking simultaneous.
If you can please guide me . Note that by "CreateCaret" in a time one control can blink just.
Thanks .
|
|
|
|
|
Hello,
You mean by blinking text or image?.
If the blinking is to be an icon (or several icons at the same time), you could use my (CLedButton[^]) control together with the use of a timer that blinks them.(Calls SetLedState(...) )
Hope it helps.
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
|
Hello Friends,
I am a just begineer in vc++.Since vc++ is very vast field , I have started to learn MFC programming.
Can any one tell me in which area in MFC programming I should concerte for becoming a better MFC programmer. The areas I mean is networking programming , Graphics programming,Database programming or System based or embbed based programming.
I have started to learn from the very base of MFC programming after finishing. I do not know the area of application should I concentrate.
Hoping for a favorable reply on this regard.
Phijo
|
|
|
|
|
You already wrote a number of fields you'd like to learn, why don't you start with the first and go from there....
Knowning a bit of each is easy, but knowing enough that you can say that you know how to program databases, graphics or embbeded system is another big step in learning.
depending on your career decisions, what you want to do, will determine what you will learn more deeply.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
After I installing "SDK WinXP SP2"(Febuary 2003), I got LNK1103 error in VC++6! My OS is WinXP (Without SP).
I had seen the following question:
Debugging Information Corrupt[^]
I can NOT dowload older version (because it is NOT good solution).
Can anyone help me?
|
|
|
|
|
Have you tried deleting the entire debug folder and doing a rebuild from scratch?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Yes, I deleted Debug and Release folders and *.opt, *.ncb, *.aps and any temporary files.
But I have problem still.
|
|
|
|
|
I think the only place to find usernames and their hashes is SAM. in the registry ro in system32\config.
which is access denied to all users including admin
but Cain 2.5 can Dump user names and their password hashes and it is written with vc++.
u can download Cain at http://oxid.it
I want to know how does it do it.
|
|
|
|
|
When I follow the documentation program, I cannot compile the mex program successfully. It has the error:
mexLapack.cpp(20) : error C2065: 'dgemm' : undeclared identifier
I have followed all the procedures for this section. ie. include the lapack library, include "mex.h",
what's wrong of my program?
Is that I need to install lapack in matlab setup stage? Or I need to install the lapack downloaded from the internet?
Thanks
|
|
|
|
|
Hi,
i have a problem using the OnHotKey-event. I'am using CTRL+F1 as a Hotkey. My problem is
that i want to know if the CTRL button has been released. How can i check if the CTRL key is released in the OnHotKey-event? I tried GetKeyboardState, GetKeyState and so on. Can anyone post a short code to check a state of a key in the OnHotKey-Event.
e.g.
OnHotKey()...
if (wParam = 100) //CTRL+F1 has been pressed
{
//here i need to check if the CTRL key has been released!
//if not: repeat until we have the release signal!
//something like a wait for event... only if the real CTRL key at the keyboard
//has released we go on here...
}
and that little problem: how can i detect which window is in foreground? GetForegroundWindow of course but it seems not to work with PC Games. I need to know the active application who is currently running the focus.
THX to all!!!
JR20
|
|
|
|
|
Can I set break points in th COM project and use the debug mode?
I want to trace for values of some variables and memory bindings.
|
|
|
|
|
Yes. One way is to insert a break point with _asm int 3; . This will cause (uless you catch it, I suppose) an exception, and allow you to opt to debug (retry) from the usual exception dialog. (This dialog can be configured to no allow the debug option, but the default usually has a retry/debug button.)
Your PDB should load when VC attaches to the process, et voila.
|
|
|
|
|
write a program that accepts 4 integers and incrypt it as ff:
-replace each digit by (the sum of that digit plus 7) modulus 7.
swap the 1st digit with the 3rd, swap the 2nd with the 4th
then print the ecrypted integers.
pls help me solve this problem...or just give an idea on how to
create this prog...thanks a lot!
godspeed!
|
|
|
|
|
If there are any Crypto++ V5.x dev's out there I sure could do with some help. I've used V4.x but am having trouble wrapping my head around using V5.x to encrypt and decrypt strings.
In essence I want:
bool Encrypt( string& sencryptedb64, const string& splaintext, const string&
skey );
and vice-versa.
I've read the Wiki/FAQ and so far have this:
byte key[AES::DEFAULT_KEYLENGTH], iv[AES::BLOCKSIZE];
memset( key, 0, AES::DEFAULT_KEYLENGTH );
memmove( key, (unsigned char*)skey.c_str(), min( skey.size(), AES::DEFAULT_KEYLENGTH ) );
AutoSeededRandomPool rng;
rng.GenerateBlock( iv, AES::BLOCKSIZE );
CFB_Mode<AES >::Encryption cfbEncryption( key, AES::DEFAULT_KEYLENGTH, iv );
string cipher;
StringSink* sink = new StringSink( cipher );
Base64Encoder* base64_enc = new Base64Encoder( sink );
StreamTransformationFilter* aes_enc = new StreamTransformationFilter( cfbEncryption, base64_enc );
StringSource source( splaintext.c_str(), true, aes_enc );
for Encryption, but the cipher result doesn't look right (it ends in a 0x0a) so I suspect I'm off track.
Not sure how to go about Decryption and my attempt so far certainly isn't right.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Hey all.
I had a DLL project (using MFC) that I recently decided to convert to a statically-linked library. Everything seemed to go smoothly, but when I try to use my library in a test application, all the resource-loading calls in the library fail.
That is to say, the library project has a resource file containing some resources used in the library; a string table, a couple of bitmaps, a dialog box or two, etc. Elsewhere in the library code, there's a routine that, say, wants to get a string from the string table. So I have something like this:
CString str;<br />
VERIFY(str.LoadString(IDS_STRINGID);
When I run an application that uses this part of the library, the LoadString() function fails (returns 0). The same seems to apply for dialog boxes, bitmaps, and all other resources. A quick debug trace revealed that it was passing the correct numeric value for the resource ID; it just seemingly could not load the resource.
I've never tried making a static library containing resources before, so I really have no idea what needs to be done. I'm assuming there is something in particular that I need to do so that the resources can be loaded correctly from the library. Does anyone know what I could do in this situation? Any help would be greatly appreciated.
|
|
|
|