|
Hy, i really need help in this addin, i just dont get it!
What i want to do: an addin for the VC++ debugger, which, when i (while debugging) rightclick on a variable appears
in the context menue, and when i click my addin there, i want to calculate some things with the value of the variable. So my questions are:how do i bring my addin in the contextmenue, and how can i gain access to the value of the variable (on which i rightclicked) in the debugged code ?
any advice??
thanx a lot
andreas
|
|
|
|
|
Hi,
I'm trying to make an app which uses SDI + Splitter windows. I've successfully got the split I want, which is a full hight left pane, and the right pane being split into two panes top and bottom.
I did this by:- Initialising a Static type CSplitterWnd in my CMainFrame::OnCreateClient. The left pane gets a View, the right pane gets a CRightFrame (which i created&derived from CFrameWnd). The CRightFrame creates a top/bottom split and two views.
So far so good.
I think there is something not quite right with my window styles in the CRightFrame class. If you look at this screengrab http://draft.monster.co.uk/jon/samp.gif[^] you'll see that the right hand panes are framed with a thick line. I've fiddled with loads of different windows styles in the PreCreateWindow member of CRightFrame, but to no avail.
Can anyone point me in the right direction to get rid of these lines please?
Thanks
Jon
#include <beer.h>
|
|
|
|
|
I think the problem is, that the CFrameWnd draws a client edge and also the splitter does draws a client edge inside the views.
Perhaps removing WS_CLIENTEDGE from CFrameWnd does the job,
you could use a custom drawn splitter or change the method of creating the second splitter inside the CFrameWnd.
|
|
|
|
|
Thanks for the input. Unfortunately, it can't be that since my implementation of PreCreateWindow already removed that style:-
cs.dwExStyle &= ~WS_EX_CLIENTEDGE;
#include <beer.h>
|
|
|
|
|
Take a look at this example.
http://www.codeproject.com/splitter/flatsplitter.asp
You can use that class or modify your own class.
Kuphryn
|
|
|
|
|
Hi,
I have a problem in casting CDBVariant string object.
CDBVariant name<br />
...
recset.GetFieldValue("Name",name);<br />
CString str = name.m_pstring;<br />
CString str = (CString&)name.m_pstring;
Thank you in advance.
|
|
|
|
|
m_pstring is of type CString * , so
CString str = *(name.m_pstring); should work fine if the pointer is ok.
rechi
|
|
|
|
|
Hi everybody
I don't understand why this morning when i tried to start my dialog based application, the message box has opened with the following message:
Uhandled exception in Fractal_v1_0.exe:0xC000005: Access Violation
So i've found that this problem comes from the following line of code in the function InitInstance:
m_pMainWnd=&Dlg;
The big problem is that my application used to run before, so is anybody could explain me where could this problem come?
Thanks in advance
gerald
|
|
|
|
|
Have you added any controls to the dialog which would cause CreateDialog to fail?
You can add "no fail create" style (in the more styles box) to your dialog and see
if any bits of it don't appear or cause your OnInitDialog / DoDataExchange functions
to die.
Good luck,
Iain.
|
|
|
|
|
For your first question i answer : yes
I'm sorry, but i'm not sure to understand exactly what you mean by adding "no fail create" style how could i do that?
|
|
|
|
|
Open the relevant dialog in VC++.
Select the dialog itself. Press return and bring up the options box.
One of the tabs at the top of the options box says "More styles".
One if the checkboxes there says "no fail create".
This sets a style flags telling windows not to fail on CreateDialog
even if it can't create a part of the dialog box.
OK?
Iain.
|
|
|
|
|
Your method works if i choose Win32 Release mode for debugging my application, but with debug mode it doesn't work anymore, why?
|
|
|
|
|
I don't know exactly why, but there is an obvious place to start. In debug mode, newly
allocated memory is filled with CC in each byte.
In Release, it is filled with 00 in each byte. So you may have a variable that you have
not explicitly initialised, but Release sets it to 0 / NULL. Maybe you've missed a
DDX_Control?
You'll need to put breakpoints in your dialogs constructor, OnInitDialog, etc and see
where it dies in more detail.
If you are really stuck, email me your project, and I'll have a look see.
Iain.
|
|
|
|
|
How i will get to know that my Windows OS is hooked by some other application? Can anyone help me for the same PLZ.
Thank you.
Vilas Shewale.
|
|
|
|
|
:-OI am developing a MFC application( SDI and style is explorer.) I want the list of all the computers (systems ) if whole network ?
I need to make a similiar applicaion like "Network Neigbourhood"
ie. how to list all the n.w
Is there any feature available in VC++ for this ???
|
|
|
|
|
I've just had a quick look, and the article
Enumeration of Computer Names and their IP address
[^]
looks like it may be what you want.
If you want to browse for a computer,
SHBrowseForFolder () with a flag of BIF_BROWSEFORCOMPUTER will
give you what you want. You can use SHGetSpecialFolderPath (CSIDL_NETWORK)
to get the PIDL of Network Neighbourhood.
Good luck,
Iain
|
|
|
|
|
I've searched the Internet and found no help on this particular subject. I need to justify my text so as both the left and right margin are aligned. I can do left align, right align and centering but unable to do justify. Can anyone please help. Thank you in advance!
|
|
|
|
|
I have a class derived from CRichEditCtrl, and am attempting to set its default font by filling CHARFORMAT's yHeight and calling CRichEditCtrl::SetDefaultCharFormat, but I can't seem to find an actual way to convert my value (which is in points) to the value it needs ("twips", apparently) to match the size of the font when used in other areas of my client screen (multiplying the pts value by ten causes it to be around the same size, but it seems bold, for example).
Can anybody pass down a little wisdom on this idea? I'm at somewhat of an impasse in that branch of my project. Thanks.
- Jason
(SonorkID 100.611)
The Code Project - Orange makes the art grow fonder
|
|
|
|
|
how about using yHeight=points*12 and dwEffects=0 ?
|
|
|
|
|
From the CHARFORMAT docs - - yHeight
- Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
So 20 twips == 1 point.
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I tried yours and Moak's suggestions, but the text is still in bold. Any further ideas? Thanks for helping, and especially for taking the time to go and dig that up from the MSDN.
- Jason
(SonorkID 100.611)
The Code Project - Orange makes the art grow fonder
|
|
|
|
|
Nevermind, thanks.. got it
- Jason
(SonorkID 100.611)
The Code Project - Orange makes the art grow fonder
|
|
|
|
|
Hi,
I have a simple button in a dialog box. I want to paint a bitmap on the button. I created the bitmap in Resource Editor. It is ready to be imported to the program.
How do you paint a bitmap to a button?
I tried SetBitmap(), but it wants an HBITMAP structure.
Thanks,
Kuphryn
|
|
|
|
|
|
use LoadImage() to load the bitmap resource.
m_hBitmap = (HBITMAP)LoadImage (AfxGetInstanceHandle(),
MAKEINTRESOURCE (IDB_MYBITMAP),
IMAGE_BITMAP,
0,
0,
LR_DEFAULTCOLOR);
if (m_hBitmap)
m_MyButton.SetBitmap(m_hBitmap);
CPUA 0x5041
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|