|
Strangely enough, it works!
I just didn't think of that option because I am limiting my application to one instance only in InitInstance and I thought that the thread wouldn't be destroyed as fast as it does and it would block the launch of a new one. But it doesn't. Thanks.
MCP, MCSD
|
|
|
|
|
Hmm, in that case it's worth testing rigourously (especially on slower machines) as it may end up failing some of the time.
Another solution would just to be to run a secondary application (or batch file) that's job is to just pause until the main app is quit, and then relaunch it
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hello,
Please help to understand the ways of the Rich Edit OLE...
I'm able to insert and item into my Rich Edit Control (I'm using a dialog-based app) by creatig IRichEditOle and the rest and then using ->InsertItem()... (its from MSDN)
Now, it does seem to insert it (by looking at the rtf string before saving), but after I actually save, the file size gets bigger and bigger, but I don't see anything I've inserted (instead there's just a single space for each item I've inserted).
My guess is that objects do get saved, but I just don't know how to read them back and the Rich Edit Control (v2) doesn't do that automatically. I've tried using GetObjectCount() and then GetObject(), but the first function returns a 0.
Can anyone direct me to any samples or articles please?
Thank you in advance,
Dennis
MCP, MCSD
|
|
|
|
|
Hi
I have to get know whether some process is running. I want to identify the process by the name which is shown in Task Manager. The problem is I don't know how to find out whether the process is running using the name from Task Manager. Thanks for any hints.
Mariusz Popiolek
|
|
|
|
|
Search MSDN for Q175030. You'll find code there for this.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
A bit complicated but should work, thanks!
Mariusz Popiolek
|
|
|
|
|
I read a CP post a long time ago about a neat little trick in VS.NET. You could make it autogenerate GUIDs everytime you started to type "uuid(" and the like.
Please help me remember!
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
It must be inside an attribute declaration, like this: [uuid(" and VS.NET will fill it for you
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Argh. Why did they not put this feature in IDL-files?
I think I'll do some VB.NET-scripting within the near future!
--
standing so tall, the ground behind
no trespassers, on every floor
a garden swing, and another door
she makes it clear, that everything is hers
A place of abode, not far from here, Ms. Van de Veer
|
|
|
|
|
How can I make that the user can not change the width of a column of a list view control (CListCtrl )?
I have a list view control with a non sortable header (with the LVS_NOSORTHEADER flag) and want to make that the user can not change the width of the only column I have.
How?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Create another listCtrl that handles that message and that's all.
1. Create new class.
2. Select MFC class.
3. choose the CListCtrl as the base class.
4. implement the pretranslatemessage function in that new class in order to filter/handle the allowed messages. (use the spy++ in order to get the messages you want to eliminate.)
5. include your header file in the dialog/view you want to use it.
6. (if you are using a dialog), insert a normal listctrl in the dialog editor.
7. assign a variable to that listctrl and in the type of the variable choose your new class.
that's all.
(I suppose you'd know al those steps, and probably they are not the best ones to reach your purpose, but doing this you'll have all the data needed in order to be able to do it...)
Hope this helps.
|
|
|
|
|
Thanks! I will try it!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi Thomas,
I guess the easiest way for you to access dBASE is to use MFC database classes (CDatabase, CRecordset etc.) together with dBASE ODBC driver.
I suggest you search for "links, examples and more" yourself using Google or any other Web-based search tool. Just specify "dbase", "ODBC", "MFC", "example" as keywords, and I'm pretty sure you'll get hundreds. Doing it yourself will help you develop skills that are important for every programmer.
Best regards
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
Hex is for sissies. Real men use binary. And the most hardcore types use only zeros - uppercase zeros and lowercase zeros.
Tomasz Sowinski
|
|
|
|
|
How can one use *.fon font in VC++ application?
How to load fon font?
Thanks
|
|
|
|
|
I have this below CString data
<br />
CString m_str; <br />
m_str += "CAST";<br />
I need to change m_str to hex CString data. So I use this below function
<br />
CString m_hexstr<br />
m_hexstr.Format("%02X", m_str); <br />
So I get m_hexstr = {"BC3E5C"}
But I want to ask about how to change back from hex CString data {"BC3E5C"} to CSting data {"CAST"}.
Thank you for your reply.
|
|
|
|
|
I think I get the wrong answer.
Because "CAST" should result in 8 letters. (2 per ASCII character).
I think Format does not work ok this way.
So I want to ask. Is there a way to convert m_str = {"CAST"} to hex character and how to change back?
Thank you for your reply.
|
|
|
|
|
You want to save your strings characters as their ASCII-representation to a hexadecimal base?
Converting into hex is easy: Make a std::map<char, string> and look up the translation.
For the opposite direction, use another std::map<string char> and look up the chars for every hex-digit.
|
|
|
|
|
loop on the chars, read each char, cast it into an int, format that int into a string using %2X and concatenate all the resulting chars
Same idea to bo back but reversed
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does WinCE support ownerdraw list view controls (CListCtrl)?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello Friends,
I have a very intresting question .
The problem is that i have written an application(.exe) it uses a .dll file i.e few functionality are provided in the dll file . as the file is used it is loaded dynamically now the problem is that i want to change this dll without unloading the application is this possible??? i have done some changes in the dll so without unloading the application can i unload the dll and again reload it. but as the dll is loaded it is not replaced by the new dll in that folder .
can any one suggest me a option for it????
i have to change the dll and not swap.see i have a folder called ABC in this abc folder i am having my application app.exe and all called xyz.dll.
now my applixcation app.exe is running and it is using the xyz.dll.so the xyz.dll is loaded .Now i want to replace this xyz.dll in the folder and that loaded in the application i.e is app.exe. is it possible???
Tryout are also welcome.Please suggest some technique to do this
|
|
|
|
|
When I asked you to stop asking here over and over, I did not mean for you to write the same question to me privately. I've told you several times here I don't think you can do it, did you expect a different answer by emailing me ?
I don't think it can be done, because the OS owns the file while it is open. I also suspect the folder is more Windows/System than ABC, why else would you be unable to stop the program from running for 10 seconds ?
If I had an answer, I would have given it, as would many others here. You asked again today AFTER someone replied. Has it occured to you that no-one has helped you because no-one is able to ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
hey come why are u so angry???
when i came today i saw alot of queries and mine was far back . i thought i might have been missed by some persone who knows something more like u did. so i just posted the query today. and by mistake due to the net connection i have posted it twice.
any way i think u should cool down this query being really important for me i was willing the solution from u and thought that u might not check it as today is new day and there was no reply from u when i have wrtten a reply over there so i just thought that u might have missed it so i just mailed u . if u dont like these mails why do u visit such site???else give the mail id which u dont like. else u should promptly reply that u dont know the further part.
any way
dont worry. i wont mail u any more
|
|
|
|
|
maxyi wrote:
if u dont like these mails why do u visit such site???
AFAIK, one of the reasons Christian visits this site is to help people like you. If you read the messages he posts or article he writes you'll quickly find out that he knows what he is saying. His reply to you contains an answer, and even if this answer ("the file is controlled by OS, so there's no guaranteed way of replacing the DLL") is not what you want to hear, you just have to accept it. Posting the same question again and again is not the best way of getting help. Why not reading (MSDN documentation[^])?
Christian pointed you to another aspect of your problem: sometimes instead of solving the problem directly it's better to check if it's correct to make such task at all. If somebody comes with a question "how do I write to a file that is exclusively open by other user", it's silly to search for a solution: the task is invalid and will be denied by any decent operating system. So I suggest you look at your problem once again: why do you need to break into a field that is controlled by an operating system? Can't you revise your problem instead of waiting for somebody to show you a back door?
Best regards
Vagif Abilov
MCP (Visual C++)
Oslo, Norway
Hex is for sissies. Real men use binary. And the most hardcore types use only zeros - uppercase zeros and lowercase zeros.
Tomasz Sowinski
|
|
|
|
|
:-Dyou mean you want to change the dll file while the application which load the dll is running.
I think it is impossible to complete it directly.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
As it's already established that Windows will probably not let you unload, unlock, swap, and reload the same DLL file, can't you just make it load a differently named DLL that has the same functionality
I.e.
* App using xyz.dll in folder blegh\
* you add xyz2.dll into folder blegh\
* you select a "load new dll" option in the app, and pick xyz2.dll
* App unloads xyz.dll and loads xyz2.dll instead
--
Help me! I'm turning into a grapefruit!
|
|
|
|