|
The only thing I can think of is that maybe the 2. is also causing an out of bounds indirection but the crash does not show as p_MyDialog is being created in the stack.
It's hard to say what the cause of the problem could be with that little information. Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Better yet, post the code of CMyDialog and we'll have a better chance to spot some bug.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Try with "Rebuild all", sometimes precompiled headers do funny things like this.
Damn precompiled headers, a clean rebuild sorted it out, I should have guessed. Thanks for the help.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Hi all,
Given a string containing the shortcut name, how do I get the shortcut target path?
I tried to use BOOL SHGetShortcutTarget(...) but to no avail... My MSC++ couldn't find it, even after including Shellapi.h and linking to Shortcut.lib.
Any one has a clue on how to do this?
Thx!
/T
|
|
|
|
|
AFAIK SHGetShortcutTarget is for WinCE only. I assume you're not using WinCE cos you'd probably have said so...
Frankly, i'd use the CShellLink class available on this site.
You'll also note that links like those which link to microsoft office are in fact special kinds of links which the API can't decode. and they're not documented. It's annoying.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Hi, all.
=======
I need to:
void DoIt()
{
1) Grayscale_All ( desktop, windows, ...);
2) Open_My_New_Colored_Window_And_Dont_Ever_Lose_Focus();
}
OS: Win2000.
My problem is... number 1 .
Where should I start? What should I do ?
10x.
BTW: come to #CodeProject on DalNet (mIRC)
|
|
|
|
|
Yes , It is again I ,
The nagger with the DLLs in VC++ for Delphi .
I at last succesed to find out what was the problem with my DLL by the generous help of Tom Nuydens,
Well,
When the VC++ linker generates its output it changes the names of the export functions If you gave to a function the name "foo" it will look something like "_foo@4" and This is the name you haveto import in your Delphi app client program. To see the export table, you have run :
"dumpbin.exe /exports mydll.dll" from the command line.
_________________________________________________________________-
Simple ?
Not exactly !
I , for example , dont success to run "dumpbin.exe" im order to find out the export table of my DLL to see the names of the functions.
Is Someone know how to do it exactly ?
|
|
|
|
|
You can force your DLL to export the function names without any decoration just by declaring it to be extern "C" like this:
extern "C" {
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you ,
I would try it,
But nevertheless I'm want to know how can to know the names of the export functions whith the addition of VC++.
|
|
|
|
|
|
The name is the result of the _stdcall calling sequence. The @4 means that four bytes must be subtracted from the stack pointer by the calling code when the function returns.
Make sure that your functions look something like this :
__declspec(dllexport)
int __stdcall foo( int argument )
{
return 0;
}
This will insure that they are exported.
What problem are you having with dumpbin ? If it is not showing any exports then the problem is most likely with the dllexport statement.
|
|
|
|
|
Hi:
I use InternetOpenUrl to get a HTTP file.
But in Windows 98 if InternetOpenUrl fail, I call ShellExecute will hang.Some one know the problem?
Give me some hints.Thanks
|
|
|
|
|
Hello Everybody,
I'm trying to insert a CView object
inside a TabControl.
I follow the following step:
a) Create a Dialog;
b) Inserted a TabCtrl
c) Created a CMyTabCtrl derived from CTabCtrl
d) Inserted a CView Object in CMytabCtrl.
e) Used CView->Create(...) to create a Child window inside the tab control
Is this the only way to create a view in the tabControl? Why the View position
is not perfectly inside the Tab Control Client Area?
BYE.
Have a good day
|
|
|
|
|
Please advise me how am I convert the modeless dialogs to modal dialogs.
1. i hid the modeless dialogs by using the ShowWindows(FALSE)
2. How ever the program icon disappear in the task bar.
3. I thinking of making the modeless dialogs so that it appear in the task bar.
thank you.
please advise
|
|
|
|
|
Are you using MFC? Is this the main app's dialog box? Have you tried just changing the code to use DoModal instead of Create? If you show some code, I may help you better.
Regards,
Alvaro
|
|
|
|
|
Hi.
Let say there is a standard STL vector contain with data in it. How do you assign a character arrays the data inside the vector contain either through value or pointer?
I need to do that so I could write the data to a file in binary mode.
Thanks,
Kuphryn
|
|
|
|
|
I'm not sure I've understood your request, but if what you're after is getting a char * to the contents of a vector , then the expression &v[0] does the trick (v being the vector ), as in
std::vector<char> v;
...
fwrite(&v[0],1,v.size(),fp); Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I have an SDI 'windows explorer'-like application (generated by the AppWizard), with a left pane (CLeftView) and a right pane (CRightView).
Here are my questions :
- When the user opens a new file, a file selector is automatically openned. How can I choose the file type (*.xxx instead of *.*) ?
- I would like that when the user chooses to save the file, no matter which view is active, the same method is called. But, with the ClassWizard, the function to react to the 'OnCommand' for a menu is different for each view. How can I have a unique method for the 'File save', no matter which view is active ?
Thank you in advance for your help !
Jerome
|
|
|
|
|
- When the user opens a new file, a file selector is automatically openned. How can I choose the file type (*.xxx instead of *.*) ?
I assume you are using CFileDialog, look at its m_ofn member, this is of type 'OPENFILENAME' structure. The 'OPENFILENAME' has two members you need to modify lpstrFilter and lpstrCustomFilter.
How can I have a unique method for the 'File save', no matter which view is active ?
Create a static function somewhere to do the work, and then call it from everywhere else.
Regards
Ray
"Je Suis Mort De Rire"
|
|
|
|
|
Hello,
Is the clipboard in WinNT unicode? ie. can I copy - paste Japanese characters from one editor to another (both editors support unicode) without loss of data or junk characters filling the data?
Regards,
~A.
|
|
|
|
|
Yes.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
I use ATL COM Appwizard to create ActiveX,
I insert new "full controll" and in the "Stock Properties"
tab I add "Background color" and "Background Style".
when I test ActiveX in "ActiveX control text container"
there were not any propertypage for background color and
background style.
Should I add any code for it?
|
|
|
|
|
When you select background color and style the appwizard includes a few more lines of code so that you can set the background color and style from the container.
Create a project with those options enabled and one without and then do a diff (windiff) between the two projects to see the difference.
Todd Smith
|
|
|
|
|
I could create propertysheet for backcolor but it is
disable and I cann't choose color from it?
|
|
|
|
|
How can I find the user defined point size for message boxes (set under Display Properties, Appearance). I have checked GetSystemMetrics and SystemParametersInfo and have tried the following code:
HFONT font = (HFONT)GetStockObject(SYSTEM_FONT);
LOGFONT lf;
GetObject(font, sizeof(LOGFONT), &lf);
HDC hdc = GetDC(NULL);
int ptsize = MulDiv(72, lf.lfHeight, GetDeviceCaps(hdc, LOGPIXELSY));
ReleaseDC(NULL, hdc); SYSTEM_FONT always results in 12 and DEFAULT_GUI_FONT is the menu font.
|
|
|
|
|
hi all,
i would like know how i can change the font size in a editbox.
could anyone give me an idea?
thanks,
jim
|
|
|
|