|
Hi,
What does ChartoBSTR do? Where does the returned pointer point to?
Can you post the function.
Cheers
|
|
|
|
|
Oh. ChartoBSTR is a simple function that does the said conversion. I copy pasted it into my Application. It has nothing to do with the problem, since in one function it works and in other function of the same file, it crashes. It's not about this function. I also tried without it, just making up some dummy string. And I got the same behavior.
With or without that function, calling back my VB function works from in the first case, and doesn't work in the second case. So... I'm kind of puzzled . Could it be that I can't call a VB function unless I called from VB first?
Since in the first case, I call a Visual C++ function, that, in turn, calls my function from VB. This works. But if I want to call the function from VB from that TimerProc (or from anywhere else for that matter), it doesn't work. I tried calling this from a HookProc too... if I do that, the process that contains the hook crashes. Grrrr : ).
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
I was taking a long shot there.
I thought a possibility was that ChartoBSTR was returning a pointer to a local variable that gets removed from the stack when the function returns.
This might cause your code to crash some times and work other times.
Good luck
|
|
|
|
|
Hm... so... any other ideas? Anybody??? : )
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Axonn Echysttas wrote:
ChartoBSTR
HI Axonn ,
What about using T2BSTR() defined in ATLCONV.h or CComBSTR("helloo").Detach().
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hello Alok : D. As I said, it has nothing to do with that function. Read my previous posts from within this thread...
Hm... I can't figure out what's going on, so I'm gonna have to work around the problem, since I can't really solve it.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
Greetings,
I have a window that contains a listview that I would like to have receive dropped files from an explorer window. I'm creating the listview in a function called from the WM_CREATE message of the main window, like this:
CreateWindowEx(
WS_EX_ACCEPTFILES,
WC_LISTVIEW, TEXT(""),
WS_VISIBLE | WS_BORDER | WS_CHILD | LVS_ICON | LVS_EDITLABELS | LVS_AUTOARRANGE,
100, 0, rcl.right - 200, rcl.bottom,
hWndParent, (HMENU)IDC_MAIN_LISTVIEW, hInst, NULL);
Nothing fancy here, the control is created and works, but the problem comes when I try to drop a file onto the control: it seems no WM_DROPFILES message is sent... If I set my main window to accept files then the WM_DROPFILES message fires, but I need the listview to receive the drops, not the main window (which is just a container any way.)
What am I missing? I've been searching all day and can't seem to find any specific information on this. Also, I'm working with (and prefer) the WinAPI (or MFC if absolutely necessary.)
Any insight would be greatly appreciated.
Thanks,
Matthew
|
|
|
|
|
How to use "AddFontResource" ?
I've read an article about it on MSDN Library, but I still confused with.
It's declared at wingdi.h (Included at windows.h)
int AddFontResource(<br />
LPCTSTR lpszFilename
);
I have a code:
<br />
...<br />
<br />
#define IDC_STATIC_TEXT 5007<br />
<br />
...<br />
<br />
case WM_CREATE:<br />
CreateWindow ("STATIC", "-- WinTest --\nApplication created by Inov",<br />
WS_CHILD | WS_VISIBLE | SS_CENTER,<br />
0, 40, 290, 120,<br />
hWnd, (HMENU) IDC_STATIC_TEXT, hInst, NULL);<br />
<br />
SendDlgItemMessage (hWnd, IDC_STATIC_TEXT, WM_SETFONT,<br />
(WPARAM) AddFontResource ("C:\\Fonts\\Verdana.ttf"), 0);<br />
break;<br />
<br />
...<br />
I am going to make my static text font to be Verdana, but I couldn't.
[ ++ Inov ++ ]
|
|
|
|
|
AddFontResource is used to add a font to the user's machine.
To set the font for a given control, use CreateFont + WM_SETFONT.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
How to extract dialog box from EXE file.
I have this EXE file it is for a game. When you run the game and you hit [ENTER] a dialog box popup to enter some chat. I would like to know where I can find this dialog box so I can edit its shape?
I appreciate your respond.
Note I used PE explorer but did not extarct dialog boxes only icon stuff and strings
|
|
|
|
|
Use Visual Studio to open the .exe as a resource.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
What version of Visual Studio I should use if my operating system is windows-Xp sp2.
oh is it on the net for free download??
thanks
After all, Today is the Tomorrow you worried about Yesterday
|
|
|
|
|
rain711 wrote:
What version of Visual Studio I should use if my operating system is windows-Xp sp2.
Whichever one is supported on that platform.
rain711 wrote:
oh is it on the net for free download??
If "it" refers to Visual Studio, the answer is no.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Resource hacker extrat dialog boxex and icon stuff
but I think when I disasmble my exe. It said thet the EXE has no dialog or any resources . But indeed when you execute the EXE and when I hit "Enter" on the keyboard a dialog box popup for chating and I have to hit "Enter" again if I want to send the message.
After all, Today is the Tomorrow you worried about Yesterday
|
|
|
|
|
hi all,
i would like to parse the html code to reach the url in the web page, i had get the html code already, so how do i parse till i get to the links?
thnx in advance
|
|
|
|
|
You can use regular expressions to do this. I don't have the exact formula offhand, but a quick search at Google returned this page, which should give you the idea.
Processing HTML using Regular Expressions
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
thnx Jack.
i know i can do it by hand, but it is a headache.
i've seen some vb6.0 code that do this parsing using classes like HTMLLinkElement,MSHTML.HTMLDocument. is there any classes in vc++ equivelant to thease?
|
|
|
|
|
I've never actually used HTML in vc++ for anything other than to simply display a page. (CHtmlView)
I just tried a search at CP, and it returned this article:
http://www.codeproject.com/internet/parse_html.asp
which looks like it might be what you're after, or should at least lead you to something you could use.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Thanks Jack for your help.
it is what i need
|
|
|
|
|
Hi,
I have created a stand alone application (exe) file using matlab,and VC++ compiler, but my problem is that it works only on my computer, On other computers it gives the following error:
The dynamic link liberary libmmfile.dll could not be found in the specified path c:\......
any suggestions friends?
Thanks and have a great week-end.
Irene
|
|
|
|
|
irene_haydon wrote:
The dynamic link liberary libmmfile.dll could not be found in the specified path c:\......
Distribute the file libmmfile.dll with the app.
"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
|
|
|
|
|
Hello, Irene
It looks like your application is dependent from one of the MatLab's libraries. So, if you want your application to work on other computers (where MatLab is not installed) you need to distribute these libraries with you application. Try to search MatLab documentation for redistributing applications created with MatLab or just copy all dll’s, which are missed. You can use "Dependency Walker" tool to resolve all needed libraries.
With best regards,
Andrew
|
|
|
|
|
I created an Studio 6.0 SDI program called ShowWinTest with the defaults. In the ClassWizard, I added a function for WM_SHOWWINDOW in both the CMainFrm and CShowWinTestView classes. Then I placed a ::MessageBox call in each of the OnShowWindow callbacks. When I run the program, I see the ::MessagesBox dialog boxes on startup as expected. When I hide (by clicking on a window BEHIND the ShowWinTest window), or show (by clicking the ShowWinTest task bar button), or iconify (by clicking the ShowWinTest MINIMIZE button), or restore the window ( again by clicking the ShowWinTest task bar button), no ::MessageBox dialogs appear! When I terminate the program (by clicking the CLOSE "X" button), I get the ::MessageBox dialog only for the MainFrm callback.
The docs clearly state the WM_SHOWWINDOW windows message will be sent (which should then call my OnShowWindow callbacks) when any of these hide/show activities are taking place:
"The framework calls this member function when the CWnd object is about to be hidden or shown. A window is hidden or shown when the ShowWindow member function is called, when an overlapped window is maximized or restored, or when an overlapped or pop-up window is closed (made iconic) or opened (displayed on the screen). When an overlapped window is closed, all pop-up windows associated with that window are hidden."
What am I missing?
Stephen Freeland
|
|
|
|
|
Hi all,
I'm a newbie programmer, somewhat comfortable programming my own applications from scratch in Win32API or .NET. What I'm having trouble though, is understanding and working with other people's code, like various SDKs and source code widely available on the internet. I just don't know what to do after I unzip the file.
For example, I'd download the source code of some open source application, unzip it in some directory, and notice that there's a bunch of directories, a bunch of project files, maybe a couple solution files, hundreds of .h files, hundreds of .c files and so on and so forth.
Forgive my ignorance, but what on earth am I supposed to be doing with all this? I understand that I'd need to compile something, probably, but which project or which solution am I supposed to compile? If I pick a random one and compile it, I end up with a bunch of errors I am clueless about. and then what? I'd have to figure out how the program works, but with hundreds of files floating around, where do I begin? (assuming no helpful documentation...)
I've learned to program mostly on my own, reading books and tutorials, but no books out there seem to talk about how to figure out stuff other's have written. Perhaps it's supposed to be obvious. Well, it isn't for me.
Anyhow, I know that this forum is filled with experienced programmers, and they all must have had a transition from being able to program things on their own to being able to work with stuff other's have written. So if anyone could share their experience with learning how to do this, I'd be much indebted!
|
|
|
|
|