Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My collection of unresolved Windows API questions...

Status
Not open for further replies.

TuxedoTemplar

Programmer
Apr 9, 2003
14
US
Well I'm relatively new at API programming, so bear with me here. I'm doing a few C++ windows API programs that I had been planning to do for a while now, but I've hit been running into more problems than I think I can get resolved in a reasonable time frame, so I've instead been collecting them so I can get some help from someone who would hopefully know these (they're fairly easy I would imagine.) I read theForger's win API tutorial for everything that I know already about win API programming, just so you can see where I'm coming from. Anyway here they are:
  • How do I open an URL in a web browser from within my program?
  • Having gotton the Open and Save dialogs to work (gets the file's name), how do I perform file IO? (like what functions do I use and some important things I might need to know about them, but not the full gory picture :p)
  • Besides for displaying bitmaps, why would I want to use a graphics context and how would I go about doing it (in a nutshell)?
  • What function(s) would I use to toggle a menu command on/off (grayed or un-grayed)?
  • What are a list of functions for editing/changing a dialog's controls (like their properties, values, fields, size, location, color, font, alignment, etc.)?
  • What function do I use to switch between open dialogs within the parent window?

    For Microsoft Visual C++ resource editor, how do I:
  • Make resource a dialog and its controls scale when I resize the parent window or the dialog itself (like if I wanted a list box to always be located 25% of the way inward inside the dialog and if I wanted it also to scale at its 25% position according to the dialog's size)?
  • How do I stop MSV C++ from reverting all my IDs to their raw integer equivalents? (that is, if I enter in "ID_BLAHBLAH", with the value 102 in its definition, and once I reopen that resource the ID field where I entered "ID_BLAHLBAH" has now changed to 102)

Thx a lot to whoever can help me out!
 
[*]How do I open an URL in a web browser from within my program?
ShellExecute/Ex
[*]Having gotton the Open and Save dialogs to work (gets the file's name), how do I perform file IO? (like what functions do I use and some important things I might need to know about them, but not the full gory picture :p)
STL iostream library
[*]Besides for displaying bitmaps, why would I want to use a graphics context and how would I go about doing it (in a nutshell)?
To perform in memory image manipulation, Obtain a handle to a Device Context GetDC(...)/CreateDC(...) then use the various GDI functions to manipulate the DC
[*]What function(s) would I use to toggle a menu command on/off (grayed or un-grayed)?
EnableMenuItem(…)
[*]What are a list of functions for editing/changing a dialog's controls (like their properties, values, fields, size, location, color, font, alignment, etc.)?
Dialog controls are windows and can be manipulated as all windows can using their HWND
[*]What function do I use to switch between open dialogs within the parent window?
SetFocus(…)

For Microsoft Visual C++ resource editor, how do I:
[*]Make resource a dialog and its controls scale when I resize the parent window or the dialog itself (like if I wanted a list box to always be located 25% of the way inward inside the dialog and if I wanted it also to scale at its 25% position according to the dialog's size)?
No such resource exists, you have to write code that creates that behavior
[*]How do I stop MSV C++ from reverting all my IDs to their raw integer equivalents? (that is, if I enter in "ID_BLAHBLAH", with the value 102 in its definition, and once I reopen that resource the ID field where I entered "ID_BLAHLBAH" has now changed to 102)
No idea what you mean by that

-pete

 
Hey thx alot for the help, even if it didn't completely answer all my questions (I didn't figure it would, but its a start, which is better than nothing.) Anyway I have one more and I'll stop bugging all of you, and this one I need to get resolved rather quickly:

How do I make a control that functions like a windows-style explorer? Say I want to list certain types of items according to whatever properties I define them to have. Lets say for understanding purposes they are basically strings, and I want them listed in an explorer-style control box according to either their size, lexographic position (alphabetic order), index number (their position in the file they come from), and context (another thing I have defined). Basically in the list I want to have it like Explorer->View->Details, such that you can see the list of items by their name in one column, and then their properties in the other columns. I suppose to make the question easier I'll ask this: is there already something to do this or would I have to make it from scratch (from other dialog controls, I mean)?

Thx again for the help!
 
The UI of Explorer uses two controls: A tree view control on the left and a list view control on the right. Look at the list view control documentation for how to use the LVM messages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top