LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-03-2003, 11:14 AM   #1
josh89
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Rep: Reputation: 15
creating menu's and links with c++


hi, i'm recently learning c++. im using the C++ tutorials at www.cplusplus.com, i'm on 2.3. I was wondering, all the tutorials make u make the application in msdos-form how can i make it in normal windows. also how can i make menu's what is the code for it? a example would help. and 1 last thing, creating links, how?

thanks,
josh89
 
Old 11-03-2003, 11:38 AM   #2
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
The applications aren't in MSDOS format. MSDOS executables are
16-bit. They do run in text only mode this is *the* normal mode.
There is no such thing as "normal windows". You'll have to be
more specific, choose a toolkit like GTK or QT. My advice to you
though is to continue learning C++ and wait till you're a little more
advanced to try GUI programming. To create a hardlink use the
link() function. To create a symlink or soft link use symlink().
Note that these aren't win32 shortcuts.

#include <unistd.h>
int link(const char *oldpath, const char *newpath);
int symlink(const char *oldpath, const char *newpath);
 
Old 11-03-2003, 04:16 PM   #3
chewysplace
Member
 
Registered: Sep 2003
Distribution: Slackware 10 w/ Kernel 2.6.8
Posts: 176

Rep: Reputation: 30
what are you trying to make the program for? windows or linux?

Last edited by chewysplace; 11-03-2003 at 04:18 PM.
 
Old 11-03-2003, 06:52 PM   #4
josh89
LQ Newbie
 
Registered: Oct 2003
Posts: 27

Original Poster
Rep: Reputation: 15
well, right now for windows, so i can get the hang of it. i will for linux later. but info for doing it in windows would help.
 
Old 11-03-2003, 07:21 PM   #5
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
Creating a win32 shortcut is a pain, you have to use
COM. It's a PITA. See here:
http://www.codeproject.com/shell/csh...t=%22%2Elnk%22

As for win32 gui stuff
http://www.winprog.org/tutorial/
The APIs for working with menu are astonishingly called:
CreateMenu
AddMenuItem
AppendMenuItem
DestroyMenu

You'll need this:
http://win32assembly.online.fr/files/win32api.zip

BTW there's a great search engine called google I got these links
from the first page of each search. http://www.google.com/
Except for the API reference which I just happen to know the location.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd - creating links that can be used remotely ereeno Linux - Software 5 10-16-2008 06:38 AM
Mandriva and creating desktop links - as root araczek Linux - Newbie 6 11-24-2005 04:04 AM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 01:10 PM
creating virtual links? JSkalka Linux - Newbie 2 01-17-2004 06:58 PM
deleting orphan files and creating soft links cuss Linux - General 6 02-24-2003 10:43 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration