|
I still don't really get it. Have you tried using SHGetFolderPath()?
Does it not get you what you are looking for?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Hello,
In my project, if i click a particular row in the list control, it will open a view. Like that if i click different row it will open different view. But when i try to open the view using click event, that was opened already, the focus is not set to the particular view. It is opening another window using "Openform". Is there any way to set the focus to already opened view.
Regards
Jagannathan
|
|
|
|
|
jagannathan thiruvengadathan wrote: In my project, if i click a particular row in the list control, it will open a view.
If by that you really mean single-click, meaning select, it sounds like a great way to piss-off keyboard based users that are using the arrow keys to move to an item, ot typing part of the label to accelerate to one...
Anyway, I am not familar with Openform , as it is not a function or method that I know about. Sounds like you need to associate the view with a particular item (like via the item's data-item value, and maintain it correctly when the corresponding view is closed), and then use that data item to focus/activate the appropriate already-created view.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Before opening a new view, can't you just search through the list of already-open views?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I am displayed the messagebox using the Messagebox function:
MessageBox("xxxx","EncryptaKey VPN",MB_YESNO|MB_ICONQUESTION);
The x button in messagebox is disabled how to enabled it.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Are you allowed to use MB_OKCANCEL instead of MB_YESNO ?
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
Yes, because there is no "Cancel" option - the [X] is actually treated as a cancel button and since you did not specify a cancel option in your flags...
N.B. the standard MB_OK message box's OK button is really a Cancel button behind the scenes - that is why you can use the [X] button or the <ESC> key to dismiss it.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
thank you
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
James R. Twine wrote: the standard MB_OK message box's OK button is really a Cancel button behind the scenes - that is why you can use the [X] button or the <esc> key to dismiss it.
James, do you really mean that? I don't get it. What am I missing?
AFAIK, When you do not specify a cancel button, that is when you use a style like MB_YESNO, the 'X' button will be disabled and pressing the Esc key will not dismiss the message box!
|
|
|
|
|
I am talking about a message box with a single [OK] button (the MB_OK style bit). If the dialog is showing anything other than the single [OK] button, then the buttons are as you would expect.
The MB_OK style of message box shows a single [OK] button, but it is actually an IDCANCEL button behind the scenes that just has the text of "OK" on it (or its equivalent). Since it is an IDCANCEL button, the [X] remains enabled and can be used to dismiss the dialog, just like pressing <ESC> . (Generally, if you have a dialog that has a button on it with IDCANCEL , pressing the [X] or <ESC> usually activates it.)
When you use other styles that exclude the CANCEL style, like MB_YESNO , there is no IDCANCEL button present, so the [X] is disabled and/or has no effect, just like with pressing <ESC> .
(The things you learn having to install windows hooks to intercept and scrape dialog boxes and then determine which button to simulate activation of in order to dismiss it... Gotta love having to shoehorn GUI-laden code into a server!)
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
brahmma wrote: What am I missing?
Spy++.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Am I wrong here ?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
James R. Twine wrote: N.B. the standard MB_OK message box's OK button is really a Cancel button behind the scenes - that is why you can use the [X] button or the <esc> key to dismiss it.
In a normal message box with only the MB_OK style enabled, the [X] or pressing the <ESC> key too returns IDOK from the message box call, which is equivalent to pressing the OK button. I do not find it to act like a cancel button behind the scenes or any such thing.
See it for yourself:
DWORD dwRetValue = MessageBox("Hi there","Hello",MB_OK);
switch(dwRetValue)
{
case IDCANCEL:
AfxMessageBox("Cancel was selected");
break;
case IDOK:
AfxMessageBox("OK was selected");
break;
}
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Use MB_YESNOCANCEL instead of MB_YESNO
|
|
|
|
|
Hi all.
<br />
try<br />
{<br />
m_File = freopen(FileName,"rb",stdin);<br />
}<br />
catch(...)<br />
{<br />
m_nErrMsg = GetLastError();<br />
<br />
strcpy(m_sErrMsg,"ERROR:Cant Open File");<br />
<br />
return 1;<br />
}<br />
<br />
strcpy(m_Name,MyFile(FileName));<br />
strcpy(m_FullName,FileName);<br />
<br />
<br />
cin>>m_Bit00;
cin>>m_ModiperData; <br />
cin>>m_RecNum; <br />
cin>>m_HeadBitNum; <br />
cin>>m_RowBitNum; <br />
cin>>m_Resved; <br />
cin>>m_Transsaction; <br />
cin>>m_EncDenc; <br />
cin>>m_MultiUser[0]; <br />
cin>>m_MultiUser[1]; <br />
cin>>m_MultiUser[2]; <br />
cin>>m_ProductionIndex;<br />
cin>>m_LanguageID; <br />
cin>>m_ResFill; <br />
in this code I try to open MyDBF.dbf file
and read head of it, but afret reading m_Bit00 "cin" function dont read
others, it means if 'm_RecNum' wos -1 aftera reading it will -1 or if it wos 0 after reading it will 0 too.
can healp.
|
|
|
|
|
The freopen(...) function will not raise exceptions to report general failures, as it is a C-RTL function, not a C++-designed one; it will return NULL and close the specified file if something goes wrong.
If m_sErrMsg is a string object, it is likely that strcpy(...) to copy into it is a very bad idea.
The layout of your data file is not documented here, so we cannot tell if you are using the wrong types with the stream or not. If the layout is static/fixed, as it appears from your code snippet, there is no reason why you cannot fread(...) this data into a struct . It would likely be faster than using the stream operators multiple times on separate data items.
Lastly, cin is likely not your data file unless you have redirected the file into the application's standard input.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
hi
i want to know is there a way to execute an exe file in memory without extracting it to hard disk. i have created sfx which extracts the compressed file to the disk. i can extract file to memory but i don't know how to execute that in memory.
any idea??
|
|
|
|
|
near2world wrote: i want to know is there a way to execute an exe file in memory without extracting it to hard disk.
None that I've ever been able to find. That's not to say that one does not exist, however.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I don't know if this is impossible, but several time ago you could generate a virtual hard disk in the RAM area. would'nt this be a kind of solution? (I can't remember the instruction).
And in antoher hand, would'nt it be possible to use any of the libraries that exist in order to interact with zip,rar... and try to modify them in order to achieve that?
PS: I've never done that before, only thinking on those two possibilities...
|
|
|
|
|
actually i am writing a program that will protect an exe by attaching it to sfx. now when this sfx is launched it will ask password, if pass is correct sfx extracts the exe and executes.
now sfx can extract file to hard disk and launch it.very straight and very simple. but what if a user points out the extracted exe and copies it then the whole purpose is simply defeated.
i am struck what to do.
|
|
|
|
|
near2world wrote: but what if a user points out the extracted exe and copies it then the whole purpose is simply defeated.
True, but there are workarounds for this.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Just code your program to expect a command-line argument. When you run your program from inside of another, you would supply said argument. Those that save your program to try and run elsewhere would not know that it required a command-line argument nor what it should be. Make sense?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
this looks like an alternative solution to the problem.
thnx a lot.
|
|
|
|
|
uufff... as you know there are programs that decode the passwords for compressed files... moreover, surely there are lots of ways to get access to that exe while it is loaded...
I don't know, let's see if somebody can help you... I can't...
|
|
|
|