|
this is all very nice and if u really want to then search for skinnable dialogs and skinnable apps howto's
HOWEVER i think its a very bad idea for a few reasons...
1). if i set my desktop theme and u ignore it im going to be unhappy
2). windows has a standard look and feel for a good reason - it makes it easy for people to figure out how to use new apps
just my 2cents worth
"there is no spoon" biz stuff about me
|
|
|
|
|
|
I've created a MFC app with the Appwizzard.
The main view is a child of CFormView.
In the associated dialog i've created a listbox, and created the control variable for it.
the app's name is "hilos"
In hilosView.cpp i include a class called "hilos.h" as i need to create an object of that class and use it's member functions.
In "hilos.cpp" i need to be able to write in the listbox, but as in hilosView.cpp i include the header of that file, i can't include in hilos.h the file hilosView.h to see the listbox.
the listbox's control variable name is m_list, and it's a member of the (CHilosView : public CFormView) class. I can't declare an extern in hilos.cpp to be able to use it.
what could i do?
thanks!
|
|
|
|
|
do a forward declaration...
e.g. in the header file
class CHilos;
class CHilosView : public CFormView
{
// etc
};
and then put the include in the cpp file.
Hope this helps,
Andy
|
|
|
|
|
Hey,
I am using the "Printing without the Document/View Framework" tutorial, and I was wondering if anyone knows how to print text from edit and combo boxes in a nice grid type layout.
Thanks for the help
|
|
|
|
|
hi everyone
i try to set button control to unicode text (Persian) in VC .NET,but i cant.how do it
thanx
|
|
|
|
|
I have been working with the same VC++ project, modifying as I needed.
Now when I try to used one of the dialogs, I get an unsupported operation error.
The log file tells me that the dialog I was trying to use is not registered CDdialog_put_text
I am not a programmer - just someone that has to modify existing projects occasionally.
If anyone can help, it would be greatly appreciated
|
|
|
|
|
Hi,
I have installed the iTunes application on my PC and it has the Aquablue (Mac) look & feel.
I would like to know how I can create a windows application that has the same look&feel. Can anyone point me in the right direction?
Thanks!
|
|
|
|
|
See this[^] article. SkinMagic[^] is a commercial product that may be worth investigating. (I haven't used it).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Just ownerdraw everything yourself. (Seriously.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
That's what I thought...but I was hoping for a simpler (miracle) way to do it.
Thanks!
|
|
|
|
|
One simpler way could be to find someone else to do it for you.
Dirty Job but someone has to do it
|
|
|
|
|
Hi guys,
in my software I need to measure time duration between two hardware signals (which come via RS232 connection). And I'd need that with accuracy to millisecond. I'm wondering what's a reasonably good way (meaning good accurate results) to go about it? I'm now only thinking of using SetTimer() and KillTimer() with a counter variable to count the time, would that be able to provide a good accuracy?
Thanks
|
|
|
|
|
QueryPerformanceCounter does a good job.
Take a look at this article.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
One way would be to use either the _ftime() or _ftime64() function.
e.g.
__int64 getCurrentMilliTime()
{
__timeb64 time;
_ftime64(&time);
__int64 seconds = (__int64)time.time;
return (seconds * 1000) + time.millitm;
}
_ftime()/_ftime64()
|
|
|
|
|
On NT/W2K/XP, you can use GetTickCount()
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I'll have to remember that one. That's a bit more friendly than the method I gave. (Though not as useful if you actually want the time. )
|
|
|
|
|
thanks alot guys, very helpful
|
|
|
|
|
Can anybody show me how to write "\\" to a regitry.
I tried this:
reg.SetStringValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\MyReg\\","NetDirection",std::string("\\MyServer\\Direc\\path").c_str());
but it only writes \MyServer\Direc\path
I want
\\MyServer\Direc\path
Using C++, console application
any help is greatly appreciated
|
|
|
|
|
The answer is more simpler than you can imagine.
The backslash character '\', when occuring in a string, represents a command for the compiler (tabulator = '\t'). To print a backslash character, you need to use a double-backslash in the string '\\'. To print a double-backslash, you need to use a triple backslash in there '\\\'.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Antti Keskinen wrote:
To print a double-backslash, you need to use a triple backslash in there '\\\'.
Actually you need four. Each pair of backslashes is interpreted as the literal character '\' by the preprocessor.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Use ("\\\\MyServer\\Direc\\path") .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
A friend has an interesting problem. He has a site that allows people to register, and once they register they can download an application that will consume data from the site. What he needs is a way for the site to somehow stamp a user's ID onto the application so that when it's downloaded and first run it will immediately know to access the website using that person's info.
I can think of a number of dodgy (and potentially not cross-browser friendly) solutions such as using cookies, dynamically building an install file on the fly in order to include a resource file with the user ID, or even simply asking the user when they first run the app to enter their details, but there must be a simple, neat way that my caffeine starved brain is missing.
cheers,
Chris Maunder
|
|
|
|
|
Here's an (admittedly simple-minded) approach:- The process of registration causes the site to create a user-specific copy of the download app. If the app is
foo.exe , the registration process creates the file foo_1234.exe (where 1234 is the user specific id), if it doesn't already exist.
- The app sends the user's id (gleaned from its filename) in its HTTP request to download data, causing the host to respond with user-specific content.
[edit]
Of course, you should use something more cryptic than just the user's id. Maybe add a timestamp and a checksum at the end.
[/edit]
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I thought of that one too but because the user's ID is part of the filename it's open to abuse/spoofing, unless you seed and encrypt the id.
cheers,
Chris Maunder
|
|
|
|