|
SetWindowPos() and MoveWindow() are but two ways.
|
|
|
|
|
Does anybody know where one can get the file formats for the tables created by database engines such as ISAM, etc.
|
|
|
|
|
|
I have looked there but the file types I am looking for aren't there. I am looking for the files created by MySQL
|
|
|
|
|
Hi,
I'm looking for (free) helper classes to support parsing strings etc. into tokens. It's nothing to complex, basically a list of name=value; %comment , but values can stretch over multiple lines, I need to switch between different separator token sets, and things like "comment token inside string", i.e.
s = "A double slash like this: // indicates a comment"; // double-slash for comment
Any ideas?
[edit] something CString-compatible would fit in perfectly..[/edit]
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
I was going to tell you to RTFsite, as there are quite a few parsers in the "General C++/MFC"[^]
section. Then I realised you aren't a newbie, so I'll be a little more polite...
I've had a quick look see there, and you should still be able to find something useful!
Iain
|
|
|
|
|
Iain Clarke wrote:
Then I realised you aren't a newbie, so I'll be a little more polite...
ouch! point taken...
Well, I was more in "does anyone know of an article (here or otherwise) that's good for my problem at hand?" mode (aka "do my work please " mode)
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
peterchen wrote:
Well, I was more in "does anyone know of an article (here or otherwise) that's good for my problem at hand?" mode (aka "do my work please " mode)
I'm too lazy to do my own work! Why do you think I'm attacking the forums!
Iain.
ps. I reckon RTFWS should replace RTFM in the new shiny internet age...
|
|
|
|
|
I've got an application, that I'd like to convert to C++ as a learning exercise.
I've got 1 dialogbox template that I'd like to use 8 times at once on the screen.
1 want 1 main windows, and to (I guess) attach these 8 windows (with a thread to control each one) to the main window.
Where can I find an example of doing this Create Main and attach stuff.
Thanks
|
|
|
|
|
With or without MFC ?
If MFC, the main window should be SDI or a dialog ?
~RaGE();
|
|
|
|
|
I don't really mind. I'd prefer straight Win32code, but really it is for learning, so MFC would also be fine.
I just would like to see an example of how to do it.
|
|
|
|
|
in MFC Version
Create your main and template resources. Create a class for each of them, CMainDlg and CTemplateDlg.
In InitInstance() , launch your maindlg with a
CMainDlg dlg;
dlg.DoModal();
In the CMainDlg::OnInitDialog()
Create your dlgs like this :
CTemplateDlg dlg1;
dlg1.Create(...);
do this for each dlg to set their special features. If they are all identical, you can create a table of 8 CDTemplateDlg and loop on them to launch them one after another.
Would be the same if the main dialog was from a doc/view architecture (SDI may be better in this case). In the CMainFrame::PreCreateWindow function, launch the 8 dialogs as explained.
In Win32, it is a little bit more complicated to get this, but it is nearly the same, except you will have to catch the Winodws messages by yourself.
~RaGE();
|
|
|
|
|
I'm really sorry.
I get what your saying, I just can't fill in the blanks.
Are there any full example projects that do this?
|
|
|
|
|
I want to load the icon resource form an application.
What I know by now is that I will use LoadIcon function
HICON LoadIcon(HINSTANCE hInstance, LPCTSTR lpIconName);
how to get hInstance from an application (for example for WORD 2000)?
Please help
|
|
|
|
|
Actually, you might be better off using ExtractIcon()
For an MFC application....
<br />
int nIconIndex = ICON_INDEX;<br />
CString strExeFilename = APPLICATION_FILENAME;<br />
<br />
HICON hIcon = ::ExtractIcon(AfxGetInstanceHandle(), strExeFilename, nIconIndex);
Edited to add : Check out ExtractIconEx() too - this allows you to obtain small and large icons.
|
|
|
|
|
Martyn Pearson wrote:
For an MFC application....
I was about to give the same answer as you, but somwthing told me that the guy who has asked it was not programming using MFC. Then I looked for how to get the hInstance from another application that the own (which is needed with ::LoadIcon() ), and ... I did not find how to do it. Do you know how to do this ? I mean, retrieveing the hInstance of another running instance (with or without MFC) ?
~RaGE();
|
|
|
|
|
I have never extracted an icon from an application because I never had to do it but I do know that ExtractIcon works for API as well. I also remember that if I wanted to get get the module of an application using API I would call HMODULE GetModuleHandle( LPCTSTR pModuleName )
where pModuleName would be the name of a dll or exe. If you use null then you get the current module. This is what I remember doing two years ago, because after that I started working on Unix machines and I kind of forgot most of the API that I knew. I didn't know much anyways.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Thank for your advices. They are perfect and works fine
So i have another task for you Lets say I have a file and I want to represnt this file (in the list control) by using the icon of the application which this file is related to. (sic anyone understands ?). How to find the application which is the "parent" of a particular file.
Please help
|
|
|
|
|
There could be a function that does this for you - have a browse through the shell functions and interfaces to see if anything pops out. However, you could use this method....
Say for example, you are representing an MS Word document, myfile.doc
If you look up ".doc" in the registry under HKEY_CLASSES_ROOT, you will find the default value is something like "Word.Document.8" - it is on my machine, this may well vary depending on the version of MS Word you have installed.
If you then find "Word.Document.8" under HKEY_CLASSES_ROOT, you will find it has a number of subkeys. Navigate through these subkeys to find the default value for the entry shell/Open/command. (in this case, the full registry path is HKEY_CLASSES_ROOT/Word.Document.8/shell/Open/command)
This contains the name of the executable, which you can then interrogate for the icon!
Hope this helps!
|
|
|
|
|
Thanks but someone helped me already. There is a fuction ExtractAssociatedIcon which does exactly what I need.
Tank you for your help. I really apreciate that.
|
|
|
|
|
Hello i am trying to use the gdiplus.h but i'am not sure how to setup the vc project. I have downloaded the gdiplus.dll but i think that is not enough. Any ideas or link where i could get the relevant settings to use gdi+ in my project
Any help would be a life saver!!
|
|
|
|
|
|
Thanks for your help, I have found good material and i have managed to start work and get every thing to link and compile.
|
|
|
|
|
I have a ".txt" file with m-rows and n-columns of integer values. I want to load them as a m x n matrix. Each value is between tabs.
I would like an implementation of that.
Thank you very much!
|
|
|
|
|
Something like :
int table[m][n];
FILE *f=fopen("file.txt","rt");
if (f!=NULL)
{
for (int i=0;i<m;i++)
{
for (int j=0;j<n;j++)
{
sscanf(f,"%i[here is a tab]",&table[i][j]);
}
}
}
fclose(f);
This is pure C, since I do not know what our app is like. This does not work as is, but it should give you a way to implemente it.
~RaGE();
|
|
|
|