|
That compiler error will have displayed a line number. Post the code from that line so we can have a look.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
hi i've been looking for an example of a menu bar, but really it have a lot of controls, and i need to know what are the basic controls to make, this, what do i need to make a menubar derived from a toolbar?
|
|
|
|
|
check menu control in CP.
http://www.codeproject.com/menu/
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hello All,
I am trying to locate some VC++ 6.0 example that would show me how to read & write these shortcut LNK files.
In particular I am looking at how to read/write these application ICON files that can be seen on the Windows 95/98/2000 desktop and that are stored the users desktop directory.
These files, I think, are similar to the old PIF files but are now written in binary format and hold the particulars of an application or URL link.
Can anyone please assist?
Thanks,
Lonnie
--
Lonnie Cumberland
OutStep Technologies Incorporated
EMAIL: Lonnie@OutStep.com
: Lonnie_Cumberland@yahoo.com
The Basis Express Virtual Office
&
Data Backup and Recovery Services
URL: http://www.basis-express.com
"The Virtual Office without boundaries!!!"
|
|
|
|
|
The explorer shell functions probably provide you with more than you could ask for. However i'm not 100% sure...Mike Dunn has some cool tut's on Shell extensions so maybe read up on them.
If you wanted to read and write them using CFile or something similar then you'll probably have pretty good luck locating the file structure Here
This is a list of just about every file structure known to man.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Look up IShellLink interface in MSDN, also check out Mike Dunn's excellent article at http://www.codeproject.com/com/comintro.asp
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
I have for the last 2-3 days tried to figure out the CControlBar in hopes of designing a custom toolbar, however I have decided time is running out and I must move on, but still refuse to use the standard MFC/common control toolbars.
I figure I will derive my class from CWnd instead of CCOntrolBar, docking isn't really required, I just thought it'd be neat. If neat gives me heart aches, forget about it, i'll dumb it down a little.
For any controlbar it's absolutely essential that if it doesn't dock it alteast re-adjusts itself and the Frame windows client area IMO anyway. While exploring the CControlBar and MFC specific messages I ran across WM_SIZEPARENT which is sent by the parent(Frame) to all child windows within target ID range. Does this mean I could derive from Cwnd (Save myself some brain cells) and as long as my ID was withint range I can receive this message...?
I'm pretty sure this is how this works.
What I really wanna know is...When I have 2 or 3 other control bars (Status, Toolbar and custom dialogbar) when they are all positioned or docked they update the FrameWnd Client area (grow/shrink). It is this rect that is passed in as lParam in WM_SIZEPARENT...?
I tried this earlier and I kept getting the rect for the entire client area, so my custom bar would overlap the others...not a very desiarble effect. Does the frameWnd call RepositionBars each WM_SIZE it receives...? RecalcLayout adjusts the client area...?
Anybody have any ideas or suggestions...? Except Why don't I use CToolBarEx2 or something
Thanx in advance
Have a day!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
What are your needs? If you just need a toolbar, perhaps w/ simple controls (entry fields/combo boxes), consider just building it from scratch w/ code:
- Create CToolBar w/ appropriate styles
- Create and populate image list(s) w/ neccessary icons
- Build list of strings (if you want text for some/all buttons)
- Build and populate array of TBBUTTON structures describing attributes of buttons and separators (separators also as placeholder for controls)
- Add all these to the toolbar
- Autosize the toolbar ctrl
This works nicely in almost all situations.
If you need something fancier, please attempt to use a library already written. There are some very nice (and free) ones out there. MFC's dockbar support is a horrible, crypic mess of undocumented spagetti code, hard-coded values, and ugly workarounds; it will permanantly scar your mind. I'd be willing to bet that someone unfamiliar with the code could more quickly implement the entire system from scratch than understand the existing one.
Ok, maybe i'm just dull, but in any case, life is too short, and MFC is dying. Don't make things any harder for yourself than necessary!
And if words were wisdom, I'd be talking even more. The Offspring, I Choose
|
|
|
|
|
can anyone tell me how to debug and test recrusive functions??? i have trying putting trace statements and using the VC++ debugger but i always get lost on what i was doing. i trying looking at the call stacks but it is useless. Can anyone tell me what's the most efficient and the most easiest way to debug my recrusive function????
Thank you very much,
John
Aloha from Hawaii
|
|
|
|
|
I like to put a static nesting counter in temporarily to tell how many iterations deep I am. If a problem appears, I record how many levels deep I am, then it becomes easier to set breakpoints for the particular iteration.
Other than that I like to initialize the values in the function during runtime to test all of my exit cases.
|
|
|
|
|
Hi,
I have a Genius NewSketch 1212 HR III V2 tablet connected to COM1. The driver for this tablet maps the 6000x6000 resolution to that of the screen 1024x768. Is there any way to read the full resolution of the tablet?
The tablet comes only with a user's manual, and there is no documentation for programmers on the web site.
An utility that comes with the tablet does read the 6000x6000 coordinates, though.
|
|
|
|
|
Hi, i have this error message when i try to open ClassWizard:
Parsing error: Expected end-of-line.
Input Line: "enum {IDD = IDD_MY454PROJECT_DIALOG};
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)"
Here is my code in:
...Dlg.cpp
BEGIN_MESSAGE_MAP(CMy454ProjectDlg, CDialog)
//{{AFX_MSG_MAP(CMy454ProjectDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_START_BUTTON, OnStartButton)
ON_BN_CLICKED(IDC_STRICT_2PL_RADIO, OnStrict2plRadio)
ON_BN_CLICKED(IDC_2PL_RADIO, On2plRadio)
ON_BN_CLICKED(IDC_LOCK_X_RADIO, OnLockXRadio)
ON_BN_CLICKED(IDC_LOCK_S_X_RADIO, OnLockSXRadio)
ON_LBN_DBLCLK(IDC_WAITQUEUE, OnDblclkWaitqueue)
ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
And ....Dlg.h:
// Dialog Data
//{{AFX_DATA(CMy454ProjectDlg)
enum { IDD = IDD_MY454PROJECT_DIALOG };
CListBox m_WaitQueue;
CButton m_Strict2PL_RadioControl;
CButton m_LockSX_RadioControl;
CButton m_LockX_RadioControl;
CButton m_2PL_RadioControl;
int m_LengthOfSimulation;
int m_NumOfDBObject;
int m_NumOfUsers;
int m_NumOfOp_MAX;
int m_NumOfOp_MIN;
int m_WriteOpTime;
float m_PercentOfWrite_MAX;
float m_PercentOfWrite_MIN;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy454ProjectDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
Can you help me???
|
|
|
|
|
Move the enum { IDD = IDD_MY454PROJECT_DIALOG }; outside the //{{AFX_DATA(CMy454ProjectDlg) section:
enum { IDD = IDD_MY454PROJECT_DIALOG };
CListBox m_WaitQueue;
CButton m_Strict2PL_RadioControl;
CButton m_LockSX_RadioControl;
CButton m_LockX_RadioControl;
CButton m_2PL_RadioControl;
int m_LengthOfSimulation;
int m_NumOfDBObject;
int m_NumOfUsers;
int m_NumOfOp_MAX;
int m_NumOfOp_MIN;
int m_WriteOpTime;
float m_PercentOfWrite_MAX;
float m_PercentOfWrite_MIN;
cheers,
Chris Maunder
|
|
|
|
|
Hi all!
I have a cd.
On it is the introductory HTML pages for the software.
I need to make some kind of autorun that'll work for
Win95/98/millenium/2000/XP to start the main HTML page
when the user puts the cd into the computer.
Help is as always, greatly appreciated.
Thanks!
Antoine
|
|
|
|
|
Use ShellExecute and pass the name of your .html file.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
Create an autorun.inf file. Put it in the root directory of the CD. Put in this:
[autorun]
open=default.html
replace default.html with whatever file you want to run. This should open up the page in the users default web browser.
--
David Wengier
Sonork ID: 100.14177 - Ch00k
|
|
|
|
|
I am a intermediate programmer who figured out an easy way to control font and print styles for the printer. I will share this info to all if someone can find me someone to share with me bar code 129 source code.
|
|
|
|
|
I'm trying to write a function that will make Visual C++ open a file, and select some text on a particular line.
This function is to run in another application (not a macro or Addin)...
So far I can cause an existing instance of visual C++ to open the file, but I cannot get the selection object...
Heres the code so far...
void EditFile( const char *filename, long line, int col, int span )
{
try
{
IXApplication app;
if (app.OpenDispatch("MSDev.Application"))
{
IDocuments docs( app.GetDocuments() );
COleVariant var1(0L,VT_ERROR);
var1.scode=DISP_E_PARAMNOTFOUND;
COleVariant var2(0L,VT_ERROR);
var2.scode=DISP_E_PARAMNOTFOUND;
COleVariant var3, var4;
_bstr_t ctext;
ctext = filename;
ITextDocument tdoc( docs.Open(ctext, var1, var2 ) );
if (line >= 0)
{
ITextSelection tsel( tdoc.GetSelection() );
tsel.Cancel();
if (col < 1) col = 1;
tsel.MoveTo( line, col, var1 );
if (span > 0)
{
var3 = (long)1;
var4 = (long)span;
tsel.CharRight( var3, var4 );
}
}
}
}
catch (...)
{
}
}
Unfortunatly, the tdoc.GetSelection() call throws a DISP_E_MEMBERNOTFOUND exception.
Does anyone know how to do this... (or where to look for inspiration)?
Thanks...
BTW... IXApplication is a subclass of IApplication which provides OpenDispatch which finds an existing instance of the application instead of creating a new instance (ala CreateDispatch).
Blade[DMS]
|
|
|
|
|
Arrgghh... what happened to all my nice tabs???
How do you submit formatted code to the forums??
Blade[DMS]
|
|
|
|
|
Blade[DMS] wrote:
How do you submit formatted code to the forums??
With <pre> and </pre> tags.
Tomasz Sowinski -- http://www.shooltz.com ** If you're going to rape, pillage and burn, be sure to do things in that order. **
|
|
|
|
|
|
Can anyone give me a step-by-step instruction on how to create help files in c++? I managed to get as far as creating an .rtf file. How do I create a MAP file and compile everything into an .hlp file? I'm using MSVC++6.0 for this. Thank you,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
Have you looked into using HTMLHELP? This is the new help format that Microsoft recommends, and I think that it is alot easier to manage than the old help system. There are activeX controls that are written for the HTML help that help you access the help system from your code as well.
You can download the HTMLHELP workshop from www.micorsoft.com.
|
|
|
|
|
Use the Help Workshop under the tools menu where VC++ was installed. Check out its help file for more information.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
Homepage: imputek.com
|
|
|
|
|
I found this article quite instructive.
http://bit.tekotago.ac.nz/~sam/teaching/se2/lectures/helplecture/helpmain.html
It gives step-by-step instruction on how to create help files in Windows 95 style.
As Tim said, you should switch to *.chm which has a nicer look. Check this article out for how to make *.chm step-by-step.
http://www.mvps.org/htmlhelpcenter/char_hhw.zip
|
|
|
|