Click here to Skip to main content
14,970,700 members
Everything / Desktop Programming / WTL

WTL

WTL

Great Reads

by Tim Smith
Color picker control for WTL applications including optional support for XP themes
by AlanW
A WTL tree control that supports Windows Vista style selection and multiple selection
by Ernest Laurentin
Full-fledged ATL Windowless ActiveX Container. Ideal for hosting Windows Media Player, Transparent Flash and Silverlight Animations.
by Michael Dunn
How to use power status notifications to make your applications conserve power when necessary.

Latest Articles

by Clifford Nelson
Shows how to set DataContext of View to itself using XAML and discusses the advantages of INotifyPropertyChanged to DependencyProperty
by Taehoon Kim 1004
Capture program using GDI
by Suarte
A hands on example of domain driven design - Part 3
by Timo Kunze
Use undocumented parts of the Windows Vista list view API to enhance your application.

All Articles

Sort by Score

WTL 

Please Sign up or sign in to vote.
13 Jun 2002
Tim Smith
Color picker control for WTL applications including optional support for XP themes
Please Sign up or sign in to vote.
9 Apr 2006
AlanW
A WTL tree control that supports Windows Vista style selection and multiple selection
Please Sign up or sign in to vote.
5 Mar 2009
Ernest Laurentin
Full-fledged ATL Windowless ActiveX Container. Ideal for hosting Windows Media Player, Transparent Flash and Silverlight Animations.
Please Sign up or sign in to vote.
25 Sep 2008
Rajesh R Subramanian
Of all your questions I've attempted, this is the toughest one, Christian.First off, .NET and C++ (I will say only C++ in this message. But, When I say C++, include the frameworks and libraries built on and around it - MFC, ATL, WTL, etc.,) are...
Please Sign up or sign in to vote.
29 Dec 2006
Michael Dunn
How to use power status notifications to make your applications conserve power when necessary.
Please Sign up or sign in to vote.
29 Jun 2009
Michael Dunn
Create custom tasks in your app's jump list on Windows 7
Please Sign up or sign in to vote.
16 Jul 2007
PrafullaT
This is a toolbar for the Internet Explorer which shows information from RSS taken from the Internet.
Please Sign up or sign in to vote.
31 Jan 2001
Less Wright
This article will show you how to make use of WTL’s DDX/DDV implementation using a real world example.
Please Sign up or sign in to vote.
20 Feb 2002
Jens Nilsson
An article on the framework for implementing snapping windows.
Please Sign up or sign in to vote.
21 Jun 2009
_oti
A WTL Hunspell-checked edit control.
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
The way I'd approach it is like this:1. Define functions that return random voewls and random consonants - here's a random vowel function:char RandomVowel(){ const char vowels[] = {'a', 'e', 'i', 'o', 'u'}; // Use rand() to get a number...
Please Sign up or sign in to vote.
12 Oct 2009
Jörgen Sigvardsson
In addition to what Stuart said, if you really don't want to change the function signature from floatto double, you can always use literals that are typed as float. If you add the suffix f to the floating point numbers, they will be typed float.Your examples would then be function(1.2f, 2f) and func
Please Sign up or sign in to vote.
3 Sep 2013
Nikolay Ananenko
Avoid horizontal scroll and effectivelly use whole horizontal control width: resize all columns except one to their content and this one to all remaining space.
Please Sign up or sign in to vote.
4 Apr 2002
Daniel Bowen
Issues and solutions when creating a new MDI child in a WTL application when the last active child was maximized
Please Sign up or sign in to vote.
22 Aug 2008
Perspx
I don't know about removing power but you can lock volumes with DeviceIoControl() with the FSCTL_LOCK_VOLUME which means that your process has exclusive access to that volume. Take a look at the documentation here. You could do this with the CD...
Please Sign up or sign in to vote.
17 Oct 2009
Rajesh R Subramanian
hanlei0000000009 wrote:I need my program sleep 1 microsecond, but Sleep() can not do this.Neither can any other API do this (under Windows). Windows was never designed to provide this kind of functionality (it is not a real-time OS). If you use something like Sleep(2), your program may sleep for 2 m
Please Sign up or sign in to vote.
19 Sep 2011
Yvan Rodrigues
How to install the WTL Wizard for Visual Studio 2010.
Please Sign up or sign in to vote.
27 Jun 2001
Rashid Thadha
An outlook control and framework that can be used in your WTL Application
Please Sign up or sign in to vote.
22 Aug 2008
Jijo.Raj
ameyakoshti wrote:1st of all i want to know whether it is possible to disable usb portsTo disable USB ports, check this[^]. You have to programatically access the registry and set the key.ameyakoshti wrote:and CD rom "POWER" through VC++.I hope...
Please Sign up or sign in to vote.
30 Jan 2009
CPallini
"text && text" If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.This is going on my arrogant assumptions....
Please Sign up or sign in to vote.
30 Sep 2002
Ernest Laurentin
Shows how to use Microsoft Script Hosting inside existing ATL/WTL Application
Please Sign up or sign in to vote.
22 Aug 2008
vikas amin
its simple by modifying the registery , check this linkhttp://forums.msdn.microsoft.com/en-US/vcgeneral/thread/15469774-bd67-4bed-b797-32a899eb79d3[^] Vikas AminMy First Article on CP" Virtual Serial Port "[^]modified on Thursday, July 24, 2008...
Please Sign up or sign in to vote.
2 Aug 2009
«_Superman_»
In an executable, there must be one entry point that can be called by the loader, runtime etc.There cannot be any ambiguity here.That is why we can have only one main function in a console program and only one WinMain function in a windows...
Please Sign up or sign in to vote.
8 Aug 2009
David Crow
See here. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." -...
Please Sign up or sign in to vote.
13 Feb 2009
«_Superman_»
SetEndOfFile can be used to extend or truncate a file. «_Superman_»
Please Sign up or sign in to vote.
8 Feb 2015
tkontos
A WTL based, XML driven shortcut replacement
Please Sign up or sign in to vote.
22 Dec 2001
David Y. Zhao
This is a simple tabbed MDI for WTL
Please Sign up or sign in to vote.
22 Apr 2009
Stuart Dootson
Use std::inserter[^] or std::back_inserter[^] for the output iterator. That causes the items to be inserted into the container without having to know what size it should be before you've constructed it.If you're using a vector or list as the...
Please Sign up or sign in to vote.
3 Aug 2008
hoxsiew
int count; // Loop counter variableint correct;char correct_answers[count] = {B, D, A, A, C, A, B, A, C, D, B, C, D, A, D, C, C, B, D, A}This can only cause problems. correct_answers[count] should probably be correct_answers[NUM_QUESTIONS] since...
Please Sign up or sign in to vote.
1 Aug 2009
Bacon Ultimate Cheeseburger
Simply make a call to GetObjectType().
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
Using Spy++ on a sample application I just built, it would seem that instead of edt1, you now want to use cmb13 (0x47c). I guess they decided that as that field is (now) actually a combo-box, that would be a better ID to use. Java, Basic, who...
Please Sign up or sign in to vote.
13 Oct 2009
Cedric Moonen
No, you can't select the type of the class this way. However, by using pointers (or references), you can manipulate all buildings the same way by manipulating pointers to the base class (this is called polymorphism, google for it if you want more information).What you want are virtual constructors,
Please Sign up or sign in to vote.
4 Sep 2010
Alain Rist
Hi,This bug in WTL 8.0 (Memory for dialog template is allocated using GMEM_FIXED flag and re-allocated without GMEM_MOVEABLE flag)[^] is fixed in the current (beta) WTL 8.1 files.If you want to stay on 8.0 you can download the fixed atldlgs.h at...
Please Sign up or sign in to vote.
28 May 2001
Ben Burnett
An article on the CodeMax editing control.
Please Sign up or sign in to vote.
19 Dec 2008
Stuart Dootson
I think you need to add the WTL include directory to the include directory path for the resource compiler. Right-click on the project, select 'Properties', select Resources->General in the properties window and add the WTL include directory to...
Please Sign up or sign in to vote.
21 Apr 2009
liquid_
1 alternative  
How to compute difference and intersection of two sets?There are functions set_difference and set_intersection which requires two pairs of iterators of source sets and output iterator of resulting set. Here, set can be any sorted container with...
Please Sign up or sign in to vote.
22 Sep 2008
Christian Flutcher
4 alternatives  
I am progressing with my C++ learning. I am stuck with the following code. void ChangeData(int** ptr){ int ab = 1000; // scope in this method *ptr = &ab;}int _tmain(int argc, _TCHAR* argv[]){ int a = 10; int* aPtr = &a; ChangeData(&aPtr); cout...
Please Sign up or sign in to vote.
22 Sep 2008
Russell'
The variable is destroyed, but not the contents.You know the abbress s you can continue to check it's value...but, as you sad, it is wrong, so do not do it. The system can use the same locatio of that variable in any moment after that the...
Please Sign up or sign in to vote.
22 Sep 2008
Cedric Moonen
Christian Flutcher wrote:I am confused how this is happening?Because you were lucky (or in your case, not ). In your ChangeData function, your local variable has a certain address which you store in your ptr variable. When the function exits,...
Please Sign up or sign in to vote.
10 Oct 2008
led mike
Gut Mikh Tappe wrote:Please let me know what to do Ok I will try. What you need to do is read the documentation.[^]Also reading this might help as well.[^]In my experience not all authors match every reader. So if you find reading those sources...
Please Sign up or sign in to vote.
10 Dec 2008
Kiran Pinjala
2 alternatives  
Hi,I have creted a MFC SDI project in VC 2008 and compiled in Vista OS. Now when i copied the project into XP OS system and opened. I can open all views(class view, solution explorer...) but the resource view...it is showing a MessageBox statingA...
Please Sign up or sign in to vote.
29 May 2009
«_Superman_»
Call GetLogicalDrives to get all the available drive letters.Call GetSystemDirectory to get the drive which contains the OS.Open the volume using CreateFile("\\.\C:", ...Here replace C: with the drive letter returned in GetSystemDirectory.Call...
Please Sign up or sign in to vote.
1 Jul 2009
David Crow
Caslen wrote:If it is my problem is there anyway to detect programatically whether a file is already open somewhere else?Open it exclusively. All other attempts will fail. "Old age is like a bank account. You withdraw later in life what you...
Please Sign up or sign in to vote.
1 Aug 2009
«_Superman_»
OnCreate is called just when the application requests that the Create function be called. So it is not guarenteed that the window is fully created. OnInitDialog is called after the window (in this case the dialog) is completely created.When you...
Please Sign up or sign in to vote.
16 Oct 2009
Stuart Dootson
Yeah, that's not happening...Why 1 microsecond, FFS? What are you trying to do? Because there may well be a better way.
Please Sign up or sign in to vote.
3 Apr 2009
David Crow
The union looks something like this:-----------------------| 512 |-----------------------| 00000010 | 00000000 |-----------------------| 2 | 0 |----------------------- "Old age is like a bank account. You withdraw...
Please Sign up or sign in to vote.
16 Oct 2010
Aescleal
If you're using C++ there's no reason to use printf or the whole god awful family of C relics. Use a stream. Then you get type safety and you won't try reading return addresses off the stack to interpret as strings. Consider rewriting along the lines of:int main(){ int d = 20; ...
Please Sign up or sign in to vote.
28 Oct 2010
Paul Heil
A look at the undocumented message hook functions for Windows Mobile
Please Sign up or sign in to vote.
7 Nov 2002
Rob Caldecott
Use this class in your WTL apps to retrieve a list of installed printers
Please Sign up or sign in to vote.
19 Dec 2008
josip cagalj
2 alternatives  
Hi to all. I'm trying to open some project wroted using WTL. When I try to rebuild it (using VS2008 on Win XP) I get the compile error as above. Now, "atlres.h" file is in directory which I added to my project settings properly and I don't know...
Please Sign up or sign in to vote.
26 May 2009
followait
1 alternative  
I tried as below, but ostream cannot be instantiate?ifstream ifs1("file1");ifstream ifs2("file2");ostream oss;oss
Please Sign up or sign in to vote.
26 May 2009
Stuart Dootson
ostream is an abstract base class - that's why you can't instantiate it. Also, you can't use the insertion operator on streams to get what you're wanting.So...what do you mean by "memory binary stream"? If you were using strings, then this should...
Please Sign up or sign in to vote.
15 Oct 2010
fantasy1215
4 alternatives  
Please run the code below.int main(int argc, char* argv[]){ int ii = 20; char tmp[32] = "loveing"; printf("[%d]hello[%s]\n", tmp); //no integer fill the %d format char szData[52] = {0}; sprintf(szData, "[%d]saying [%s]\n",ii);//no string fill the %s format printf("%s", szData); return 0;}The...
Please Sign up or sign in to vote.
9 Sep 2008
SandeepNK
4 alternatives  
Sample code is as follows:class TestClass{CCriticalSection m_csTest;void Fun1() { m_csTest.Lock(); Fun2(); MessageBox("In Fun1 critical section."); m_csTest.Unlock();}void Fun2(){ m_csTest.Lock(); MessageBox("In Fun2 critical...
Please Sign up or sign in to vote.
25 Sep 2008
Christian Flutcher
1 alternative  
I know .NET framework and C# well. Recently I started working with C++/CLI which I felt more interesting than C#. Since .NET framework is becoming popular, do you think MFC got obsolete? Are you guys doing any projects in MFC other than...
Please Sign up or sign in to vote.
10 Oct 2008
Mark Salsbery
In addition to super_ttd's reply...If you must use fopen(), then you should probably use a CStringA.CString has a generic internal character type, depending on whetherUNICODE or _UNICODE is defined.If you want to use the generic text CString,...
Please Sign up or sign in to vote.
7 Jan 2009
CPallini
I suppose it depends on color depth... See BITMAP struct definition [^], the bmBitsPixel member looks promising. If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. ...
Please Sign up or sign in to vote.
8 Jan 2009
Code-o-mat
Take a look at this[^], might be usefull. > The problem with computers is that they do what you tell them to do and not what you want them to do.
Please Sign up or sign in to vote.
8 Jan 2009
Hamid_RT
OR see CRichEditControl50W - A VC++ Rich Text Edit 4.1 MFC Control[^]. Of one Essence is the human racethus has Creation put the baseOne Limb impacted is sufficientFor all Others to feel the Mace(Saadi )
Please Sign up or sign in to vote.
27 Jan 2009
Garth J Lancaster
1) this sounds like homework - we dont do homework - at best we will give you hints, but if you're expecting us to jump in and solve all your issues, go to RentACoder or such 2) DONT GET IMPATIENT AND POST MORE THAN ONCE - most of us here have...
Please Sign up or sign in to vote.
22 Jun 2009
Stuart Dootson
Member 4399131 wrote:I assumed that the problem isn't in my coding technique, it must be generally in the algorithm I use!!!Yep.Member 4399131 wrote:Does somebody know a better algorithm to implement FindOneOf???Looking at their code (strpbrk -...
Please Sign up or sign in to vote.
2 Aug 2009
CPallini
Because there is only one application in your application... If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of...
Please Sign up or sign in to vote.
6 May 2010
sashoalm
Here's my try:#include using namespace std;int main(int argc, char* argv[]){ string name; static const int namelen = 15; static const char* letters[2] = { "bcdfghjklmnpqrstvwxyz", "aeiouy" }; static const letterlen[2] = { strlen(letters[0]), strlen(letters[1])...
Please Sign up or sign in to vote.
13 Aug 2009
softwaremonkey
1 alternative  
Hi,In an older (MSVC++6.0) project I used HideControl(edt1) to hide the filename edit control in a CFileDialog derrived class, which worked fine at the time.When I compile this project with MSDEV2008, the code complies OK but control is no longer...
Please Sign up or sign in to vote.
13 Aug 2009
Stuart Dootson
Could you do all of the automation, including creation of the Word object, on the worker thread?Basically you're running foul of COM single-threaded apartments and things, I think. This article[^] explains them well. Java, Basic, who cares - it's...
Please Sign up or sign in to vote.
31 Aug 2009
Moreno Airoldi
Consider this as a rough idea:#include void PrintArrayClockwise(int *array, int rows, int columns){ int r = 0; int rh = rows / 2; int i; while (r
Please Sign up or sign in to vote.
15 Aug 2009
Stuart Dootson
birajendu wrote:I want to write some code which will double click a desktop shortcut. or the alternate way is how can i run a desktop shurtcut using Createprocess() api.If you know the path to the desktop shortcut, then you should be able to use...
Please Sign up or sign in to vote.
16 Aug 2009
David Crow
The SetActivePage() method looks promising. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you...
Please Sign up or sign in to vote.
15 Jul 2008
CPallini
1.From the same article, below your quoted sentence.The LEA instruction uses hardwired address generation tables that makes multiplying by a select set of numbers very fast (for example, multiplying by 3, 5, and 9). Twisted, but true.That means...
Please Sign up or sign in to vote.
13 Mar 2009
Cedric Moonen
Which kind of string ? C style strings ? Then use strcat. std::string ? Then use the + operator. Cédric MoonenSoftware developerCharting control [v1.5]OpenGL game tutorial in C++
Please Sign up or sign in to vote.
10 Mar 2009
Iain Clarke, Warrior Programmer
I've just noticed you posted the same question four hours before. You really should have more patience! People volunteer to answer these questions. Asking the same one again in a short time is not helpful to you...Iain. Codeproject MVP for C++, I...
Please Sign up or sign in to vote.
10 Oct 2008
Maximilien
George_George wrote:I am developing for both x86 and x64. I stop mouse on size_t in the code, and "typedef unsigned int size_t" is always displayed. I think it is not correct for x64. Since x64 size_t is 64-bit and unsigned int on x64 is 32-bit....
Please Sign up or sign in to vote.
10 Oct 2008
Chris Losinger
from io.h (and crtdefs.h)#ifndef _SIZE_T_DEFINED#ifdef _WIN64typedef unsigned __int64 size_t;#elsetypedef _W64 unsigned int size_t;#endif#define _SIZE_T_DEFINED#endif image processing toolkits | batch image processing
Please Sign up or sign in to vote.
27 May 2010
Aescleal
If you're programming in C, then:strncpy( q, p, 499 );q[499] = '\0';will do the trick and work however long the string is. If you'd like to obfuscate things a bit more then you can combine the two lines into one by exploiting the return value of strncpy:strncpy( q, p, 499 )[ 499 ]...
Please Sign up or sign in to vote.
31 May 2010
Anu Koshy
if it is a text control, set "No Prefix" as True.That should solve the problem. :)
Please Sign up or sign in to vote.
3 Aug 2010
Jörgen Sigvardsson
You need to marshal calls across threads/apartments. See this[^] article for different ways to perform cross thread marshalling. CoMarshalInterThreadInterfaceInStream() would probably be the easiest approach. Look it up in the MSDN documentation. It's quite easy to use.
Please Sign up or sign in to vote.
9 Jul 2012
armagedescu
First you need to open the right theme from the current skin:hThm = OpenThemeData(hWnd, L"WINDOW");After that you may draw the needed thing with DrawThemeBackground,DrawThemeBackground( hThm, hDC, WP_CAPTION, CS_ACTIVE, &rc, 0 );
Please Sign up or sign in to vote.
5 Aug 2012
Anna-Jayne Metcalfe
Theme support in Visual Studio 2012
Please Sign up or sign in to vote.
8 Mar 2013
Sergey Alexandrovich Kryukov
For now, I can only answer your follow-up question on WTL documentation. WTL is not a Microsoft product anymore. This is open-source. Please see:http://en.wikipedia.org/wiki/WTL[^],http://sourceforge.net/projects/wtl/[^],http://wtl.sourceforge.net/[^].As to you main question, right...
Please Sign up or sign in to vote.
5 Oct 2013
Raymund Macaalay
How to use a Sybase with S#arp architecture and nHibernate
Please Sign up or sign in to vote.
10 Mar 2002
Rui Lopes
Class for Synchronizing the Active State of multiple windows.
Please Sign up or sign in to vote.
4 Jul 2009
Kannan Ramanathan
One more req I have to worry abt: The 64bit local server should be able to implement connection points (32bit client being the sink)...is this possible? Thanks.
Please Sign up or sign in to vote.
28 Jul 2008
sashoalm
MFC has issues with multiple threads and possibly also with dlls. In this case GetParentFrame() is the culprit as it makes an internal call to CWnd::FromHandle which looks like this:CWnd* PASCAL CWnd::FromHandle(HWND hWnd){ CHandleMap* pMap =...
Please Sign up or sign in to vote.
8 Aug 2008
Naveen
"_$h@nky_" wrote:HTREEITEM item = tc.GetSelectedItem(); Because you are setting the image of selected item. Use pnmtv->itemNew.hItemHTREEITEM item = pnmtv->itemNew.hItem; nave[OpenedFileFinder]
Please Sign up or sign in to vote.
5 Sep 2008
Ben Burnett
2 alternatives  
I was wondering if anyone knew of a straight forward way of calling (non-exported) functions in an executable from a DLL. We are building a, for lack of a better name, private plug-in system that will grant the plug-in access to all of a...
Please Sign up or sign in to vote.
5 Sep 2008
Garth J Lancaster
oohhh .. thats a hard one. Unless your executable exposes some sort of API I think you'd have to resort to using injection/hooking from the dll (which I presume is in another process) to access the functions in the executable, even then ......
Please Sign up or sign in to vote.
10 Oct 2008
DSPCottage
4 alternatives  
Dear AllIn visual C++ 2005 I want to change a CString file to char* I used following codeBut fopen needs a char* for its first parameterPlease let me know what to doRegards char...
Please Sign up or sign in to vote.
10 Oct 2008
super_ttd
It should do.So, what's wrong ? Do you get an error ?CString has an inner cast Operator (LPCTSTR) which converts the CString object to a const char* (if compiling ANSI) of const wchar_t* (if building unicode), so you should not have to do any...
Please Sign up or sign in to vote.
23 Dec 2008
CPallini
Merry Christmas to you, Iain (an anonymous fan ).Iain Clarke wrote:To those regulars who post great answers, thanks for educating me.To those posting interesting questions - thanks for helping me educate myself!BTW it looks like you missed the...
Please Sign up or sign in to vote.
8 Jan 2009
Iain Clarke, Warrior Programmer
Not quite sure where the question is here. It sounds like you're telling us about your day.Assuming you're needing some help with this...http://www.codeproject.com/KB/static/pphtmlstatic.aspx[^] should be of some help to you.Iain. Codeproject MVP...
Please Sign up or sign in to vote.
27 Jan 2009
arad.moradi
1 alternative  
i don't know what is the reason of of error.i write it with c++ & i send what is it about.it is the code:#include #include #include using namespace std;class cart{public: cart(char a[2]="paq"){ cout
Please Sign up or sign in to vote.
29 Jan 2009
calducciano
1 alternative  
Hi, I have a quick question. (well, hopefully the answer is as quick as my question as I'm sure I'm doing something dumb.)I have a direct sound application that runs just fine as a windows console app which makes sense because there is nothing...
Please Sign up or sign in to vote.
29 Jan 2009
Stuart Dootson
calducciano wrote:I know about MsgWaitForMultipleObjects but it just falls throughBut with what return code? That's what tells you if you a) have a message to process, or b) one of your handles has been signalled!For something like audio, I'd...
Please Sign up or sign in to vote.
29 May 2009
Madan Chauhan
1 alternative  
Hi all,My application is for windows Vista and XP. There are more than on Hard drive connected to my machine. I need to get Drive Letters of the Hard drive from which my system is booting. By using GetLogicalDriveStrings Function I can get the...
Please Sign up or sign in to vote.
2 Jun 2009
agetina
1 alternative  
I can read the prototypes for windows.h in the include folder (I have installed dev c++) but i want a list of explained functions. I don't know for what to use each of them.Thank you! modified on Wednesday, June 3, 2009 4:29 AM
Please Sign up or sign in to vote.
2 Jun 2009
CPallini
Well, usually you don't need to read the explanations of all Win32 API functions in order to be a developer. Anyway (you know) you may find help for each and every function online, for instance searching for EncodePointer (the first function I...
Please Sign up or sign in to vote.
22 Jun 2009
Ivan Ivanov 83
3 alternatives  
Hi AllI'm developing my own CString class. With the idea to make it "much" faster than the standard CString, easily upgradeable, and to include into it some non-standard parsing functions I often use in my work, those will be much better to be...
Please Sign up or sign in to vote.
22 Jun 2009
Skippums
Without knowing the logic behind the standard implementation, it is impossible to know why your algorithm is being beat. Perhaps the standard string stores data about specific searches so that, in your loop, it loads known results instead of...
Please Sign up or sign in to vote.
22 Jun 2009
Roger Stoltz
I think Stuart's advice to use the C runtime in this case is the best alternative.An algorithm can be optimized for different purposes and can also be better or worse in some scenarios. I guess the standard C runtime implementation is rather...
Please Sign up or sign in to vote.
6 Jul 2009
samvaidy
1 alternative  
can any body help me for, showing pop up window in taskbar..like the way windows media players shows songs and visualisation in minibar(when its minimised).
Please Sign up or sign in to vote.
6 Jul 2009
«_Superman_»
What you need is a Deskband.There are 4 types of deskband objects.3 of them reside inside internet explorer.The last one is on the desktop.Look at the second image in the article Implementing Shell Desk Band and Internet Explorer Bars[^]...
Please Sign up or sign in to vote.
13 Jul 2009
ksaw123
6 alternatives  
Hi allcan you help?part of my code i need to do this const char * p= "ddddd";char q[500];I want to copy the sting in p to q[]?
Please Sign up or sign in to vote.
20 Jul 2009
errdy
1 alternative  
hey guys,i hav being trying for a very long time to design a c++ programme that solves second order differential equations as a final year proj. I got some codes from the resource material i have been working with; i keep getting errors compiling...
Please Sign up or sign in to vote.
20 Jul 2009
Randor
At the top of your code you declare:extern double parse(CString,int,double [],int []);Where is this function implemented at? The linker does not know where it is. Check this resource material you mention and see if perhaps you missed copying a...
Please Sign up or sign in to vote.
24 Jul 2009
echo_yao
1 alternative  
[id(0x60060001...
Please Sign up or sign in to vote.
24 Jul 2009
«_Superman_»
In the IDL file it should be [in, out] SAFEARRAY(VARIANT)* oAxisComponentsArrayIn the .h and .cpp files it should be SAFEARRAY** oAxisComponentsArray «_Superman_»I love work. It gives me something to do between weekends.
Please Sign up or sign in to vote.
1 Aug 2009
japcrword
1 alternative  
Is there an easy way to find out what type of GDI object is referenced by HGDIOBJ handle i.e. is it a pen, brush, bitmap, font or region? I can't find WINAPI that does the job. Of course, I can always go the tricky way to determine the type of...
Please Sign up or sign in to vote.
1 Aug 2009
ForNow
1 alternative  
When Create controls for a Modless DialogDurning which message is it best to do SoOnInitdialog or OnCreateI meant which virtual functions ??
Please Sign up or sign in to vote.
13 Aug 2009
sashoalm
2 alternatives  
I'm automating Word and when I call a function that doesn't return for a long time (for example a call to app.Run(_T("FilePrint"));) it tends to freeze the UI of my app until it returns from the call, so I tried to run this code from a worker...
Please Sign up or sign in to vote.
13 Aug 2009
Baltoro
You definitely need to have a Window Proc to recieve your message, because it is associated specifically with a registered Windows class. The documentation over at MSDN should show you how. See this: Windows Procedures Overview[^]You can also...
Please Sign up or sign in to vote.
25 Aug 2009
Member 3911643
1 alternative  
What is the C++ syntax for "typeof(string)"? I'm patterning after the following line from SourceGrid sample #14. SourceGrid.Cells.Editors.ComboBox cbEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(string));I'm trying to setup a SourceGrid text editor in C++. I don't know how to make the co
Please Sign up or sign in to vote.
15 Aug 2009
Hristo-Bojilov
Into C++/CLI typeof(Something) goes to Something::typeid.You should post this kind of questions into Managed/ C++ CLI forum.It's native coding forum. Life is a stage and we are all actors!
Please Sign up or sign in to vote.
25 Aug 2009
sharp_k
1 alternative  
Do I have to use advance loops? I thought about it for quite a while but could not figure it out. Example:int numbs[4][4] = [1,2,3,4 5,6,7,8 9,10,11,12 13,14,15,16];When i print it, it should print like this. 1 2 3 4, then 8, 12,16, 15,14,13,9,5,67,11,10, (ie clockwise direction).The fu
Please Sign up or sign in to vote.
16 Aug 2009
Ahmed Charfeddine
1 alternative  
?Thanks. Easy Profiler : a compile-time profiler for C++www.potatosoftware.commodified on Sunday, August 16, 2009 5:41 PM
Please Sign up or sign in to vote.
25 Aug 2009
paolosh
1 alternative  
Hi all, I have a class, say GeneralBuilding, which could be one of the classes SmallBuilding, MediumBuilding, LargeBuilding, etc...., depending on the parameters passed to the Building constructor. SmallBuilding, MediumBuilding, and LargeBuilding have a common base class Building. Is it poss
Please Sign up or sign in to vote.
20 Dec 2006
pvn g
1 alternative  
i am preparing application to test sound at different speaker configuration for Windows vista and Windows XP.for doing this i am using API SetSpeakerConfig() to set the different configuration and API GetSpeakerConfig()for getting same...
Please Sign up or sign in to vote.
2 Jul 2008
subramanyeswari
1 alternative  
Hi,How to read a manifest file from executable using either vc++ or sdk?Regards
Please Sign up or sign in to vote.
2 Jul 2008
Nibu babu thomas
subramanyeswar...
Please Sign up or sign in to vote.
15 Jul 2008
George_George
4 alternatives  
Hello everyone,Two questions after readnig this article,http://www.microsoft.com/msj/0298/hood0298.aspx1.why using LEA to do multiplication is faster than using MUL?"Using "LEA EAX,[EAX*4+EAX]" turns out to be faster than the MUL...
Please Sign up or sign in to vote.
15 Jul 2008
Stephen Hewitt
George_George wrote:why using LEA to do multiplication is faster than using MUL?You'd have to know about the internal architecture and circuitry of the CPU to answer that; I don't and I doubt there would be many people except for people that work...
Please Sign up or sign in to vote.
15 Jul 2008
Rajesh R Subramanian
Some more read material: Pentium Optimization Cross-Reference[^].From the page: LEA is better than SHL on the Pentium because it pairs in both pipes, SHL pairs only in the U pipe.Also, as CPallini pointed out, the document states that lea can be...
Please Sign up or sign in to vote.
8 Feb 2009
Member 3375334
1 alternative  
Hello everyone,i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it's different. I...
Please Sign up or sign in to vote.
8 Feb 2009
Stuart Dootson
I'd just draw on a plain dialog surface. Create a dialog-based MFC application. Draw your lines and things in the dialog's OnPaint handler. Add button click handlers for the dialog.
Please Sign up or sign in to vote.
21 Feb 2009
Gary R. Wheeler
First question: Was pDict allocated as an array, i.e.pDict = new pDictType[size];You are using the array delete syntax (delete []pDict). If pDict is a simple pointer, then using the array delete will Do Bad Things.Other than that, the general...
Please Sign up or sign in to vote.
23 Feb 2009
hemlat
1 alternative  
Hi,I want to add Picture control Programmatically.Can any one suggest how to do it.Meanwhile I will also search. I am using following code for creating static control in MFC Dialog.CStatic * myStatic = new CStatic;myStatic->Create( _T("my...
Please Sign up or sign in to vote.
23 Feb 2009
Chandrasekharan P
Try using this piece of code. CStatic * myStatic = new CStatic;myStatic->Create(_T("my static"), WS_CHILD|WS_VISIBLE|SS_CENTER, CRect(10,10,150,50), this,1);
Please Sign up or sign in to vote.
3 Apr 2009
_8086
3 alternatives  
union u{ char ch[2]; int i;};int main(){ union u x={0,2}; cout
Please Sign up or sign in to vote.
3 Apr 2009
CPallini
Is doing politely what you asked with your code.The character array and the integer share the same memory space (at least the first two bytes), hence assigning one of the two will affect the other (you know that: it is a union, after all......
Please Sign up or sign in to vote.
3 Apr 2009
Iain Clarke, Warrior Programmer
Unions are powerful things, but until you realise that the parts share the same memory, you'll struggle. David's picture and Carlo's talk both help, I hope.They are very powerful in their limited way. Here's a sample of my code (no real secrets...
Please Sign up or sign in to vote.
25 Aug 2009
kumar sanghvi
2 alternatives  
If I have the following code: int* p;int w=10;p=&10;Will the memory allocation for both w and p will be on stack only? Please correct me if im wrong as I'm a newbie to C++, and please let me know when it is really useful to allocate memory dynamically using a pointer rather than allo
Please Sign up or sign in to vote.
23 Aug 2009
harold aptroot
kumar sanghvi wrote:int* p; //declared pointer to int (statement does nothing)int w=10; //declares and initializes an int to 10, but it won't exist unless you use itp=&10; //this is an error, you probably meant p=&w? p=&w would do, assuming p is...
Please Sign up or sign in to vote.
28 Feb 2009
Stuart Dootson
Here's a solution from Mr C++ himself[^]. Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
Please Sign up or sign in to vote.
13 Feb 2009
Nuri Ismail
You can use InternetGetConnectedState() by including wininet.h and using the following snippet:#pragma comment(lib,"wininet.lib") if (InternetGetConnectedState(INTERNET_CONNECTION_LAN | INTERNET_CONNECTION_MODEM,0) == FALSE){ // Not...
Please Sign up or sign in to vote.
14 Feb 2009
David Crow
See here. "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." -...
Please Sign up or sign in to vote.
14 Feb 2009
«_Superman_»
Check out the IsNetworkAlive API «_Superman_»
Please Sign up or sign in to vote.
14 Feb 2009
Hamid_RT
How To Detecting If You Have a Connection to the Internet[^]. Of one Essence is the human racethus has Creation put the baseOne Limb impacted is sufficientFor all Others to feel the Mace(Saadi )
Please Sign up or sign in to vote.
8 Feb 2009
simon alec smith
Hello, There are various good books that you can get from the big book stores that can take you right from the beginning to the end, that assumes you have no knowledge. then you can pick up the pieces from this site if you want to...
Please Sign up or sign in to vote.
15 Jul 2008
CPallini
Shouting will not help you. If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.This is going on my arrogant...
Please Sign up or sign in to vote.
8 Oct 2008
led mike
George_George wrote:I have searched for RTTI tutorials for 15 minutes, but find none. Wow 15 minutes! I suppose you want a medal? I spent several hours over several days looking for one specific thing just this week. led mike
Please Sign up or sign in to vote.
13 Oct 2009
Jörgen Sigvardsson
Don't start processes by simulating behaviors of the user, such as double clicking shortcuts. You never know what the shortcut points to!Also, insanity lives down that road. Sooner or later you'll be opening the control panel applet by simulating mouse clicks on the start menu...
Please Sign up or sign in to vote.
17 Nov 2009
Lim Bio Liong
Look up the API GetPrivateProfileSection().Bio.
Please Sign up or sign in to vote.
9 Jan 2010
Ajay Vijayvargiya
Since Windows Vista supports "India' English", and has the following definition:0x4009 India (IN) 0x10 SUBLANG_ENGLISH_INDIA Visual Studio takes this as the project's language.While creating new project, one should select 'English (US)' as 'Resource Language' in Project Wizard.
Please Sign up or sign in to vote.
21 Jan 2010
Avi Berger
I'm going to try to synthesis three other answers which each have an important point.There are situations where seemingly useless parenthesis are necessary for correctness in a macro definition. («_Superman_») In the cases that you have highlighted, however, they have no significant impact...
Please Sign up or sign in to vote.
8 Jun 2010
enowy
1 alternative  
Hi everyone.I have plan to make new desktop application based on ATL/WTL. From now on I want to use DHTML UI in this project (for example like CDHtmlDialog of MFC).How to use DHTML UI in this project (I can not use MFC in this project).Thank you.
Please Sign up or sign in to vote.
29 Jun 2010
aleksey_m_t
MSVS Add-in for Doxygen documentation system
Please Sign up or sign in to vote.
4 Sep 2010
olivier gg
2 alternatives  
Hello,I'im using the WTL 8 library, and I found there's a problem in one of the headers (atldlgs.h), which makes use of the GlobalReAlloc function.Basically, the function fails, returns a NULL pointer, and GetLastError() returns 8, which means "not enough memory". Of course I have plenty...
Please Sign up or sign in to vote.
15 Oct 2010
Niklas L
Static code analysis tools like Lint and the the one that ships with VS2010 Ultimate, might help you there, but I would say experience is your best friend. With experience you know which constructs to avoid, and which needs extra care. Format specifiers floating around inside a string of...
Please Sign up or sign in to vote.
10 Jan 2011
naaryan
1 alternative  
Hi,I am using WTL library and I have to implement tool tips, that contain information about property sheet. but the issue i am not getting any clue how to get focused property sheet.My property sheet inherited from CPropertyPageImpl class.class CMainDlg: public...
Please Sign up or sign in to vote.
19 Jan 2011
Sergey Alexandrovich Kryukov
After some thinking on your comment: there is one more completely different key thing to it.A key is your "outside the window". I don't know how you detect the condition of moving outside, but I don't thing you capture the mouse, right? (Otherwise you would mention that.) When a mouse...
Please Sign up or sign in to vote.
19 Jan 2011
Emilio Garavaglia
The WM_MOUSEMOVE message is generated by the mouse driver every time GetMessage is called (typically: at every turn of the message loop) if the mouse coordinates and state are found different.In your case, most probably, the "quick motion" makes the mouse to fall outside the widget surface...
Please Sign up or sign in to vote.
21 May 2011
barneyman
you're still going to have to template your CTransparentBtn if you go the other waytemplate class CTransparentBtn : public CWindowImplthentemplate class ATL_NO_VTABLE...
Please Sign up or sign in to vote.
8 Aug 2011
Esteban Alvarez
Low cost design of useful utility classes
Please Sign up or sign in to vote.
5 Aug 2012
armagedescu
As suggestions. If you return bool then you have to return false/true instead of FALSE/TRUE, because you are not using BOOL. Second, don't name the class Handle. Instead of CConnectionHandle use CConnection name, or even better CDatabase. Instead ir CStatementHandle use CStatement or CQuery, and...
Please Sign up or sign in to vote.
26 Nov 2012
chaau
Set pf2.cbSize = sizeof(PARAFORMAT2) after you ZeroMemory the pf2 and it should all work
Please Sign up or sign in to vote.
22 Oct 2013
Pablo Aliskevicius
I think you should start a survey, not ask a question.A few years ago, I used MFC a couple of times, until I stumbled upon WTL (in 2002 or 2003). I started to use WTL exclusively, and never looked back. In those early days, WTL looked much better (e.g., icons in the menus), and performed...
Please Sign up or sign in to vote.
11 Dec 2013
Steve S
I am trying to implement "copy to"/"copy from" functionality in an application. The idea is that certain files will be copied to (or from) an Android device (usually a Samsung S3, Note II or Tab 2.0, but not necessarily) under program control.I have "copy from" the device working, as I can...
Please Sign up or sign in to vote.
20 Apr 2016
Suarte
A hands on example of domain driven design - Part 3
Please Sign up or sign in to vote.
6 Sep 2000
Milan Gardian
Notes on updating your WTL installation
Please Sign up or sign in to vote.
3 Apr 2001
Maxime Labelle
A wizard to help getting started with PropertySheet Shell Extensions
Please Sign up or sign in to vote.
15 Oct 2001
Laurent Kempé
Port of the window sizing framework from Paul DiLascia
Please Sign up or sign in to vote.
4 Dec 2009
Emilio Garavaglia
In the most of the cases, if you're running more than 256 colors, it will be 32 bits (one processor word, even if the color itself is represented by 3 bytes of the four). Otherwise, for 256 colors, 1 byte;and for 16 colors 1 bit of four different bytes (one per color plane, also named RGBI)
Please Sign up or sign in to vote.
8 Dec 2009
samitriani
2 alternatives  
Hi All,I'm working on an ATL ActiveX component which is composed by a controller class and a DialogBox class. I'm trying to create the dialogbox in the controller but it doesn't work. I'll put here the interesting parts of the code.CAxTestControl class:class ATL_NO_VTABLE...
Please Sign up or sign in to vote.
8 Dec 2009
«_Superman_»
Call GetLastError for the error code.
Please Sign up or sign in to vote.
8 Dec 2009
samitriani
I've done that followed by FormatMessage and the message is "Invalid handle".Now I've resolved the problem. I had a RichEdit in my DialogBox, the fact that I remove it makes the Create work !!! I still don't understand why the hell it doesn't work !
Please Sign up or sign in to vote.
29 Dec 2009
RxQVW
1 alternative  
Is it possible to convert WTL window applicationto ActiveX control that can be embedded in IE browser ?
Please Sign up or sign in to vote.
21 Jan 2010
«_Superman_»
Go through the following links -http://everything2.com/title/Seemingly+useless+parenthesis+in+%2523define+macros[^]http://docs.freebsd.org/info/cpp/cpp.info.Macro_Parentheses.html[^]http://www.cprogramming.com/tutorial/cpreprocessor.html[^]
Please Sign up or sign in to vote.
2 Feb 2010
KingsGambit
I think you can create a new ATL Control project and use any reusable code from the existing WTL Application project.
Please Sign up or sign in to vote.
31 Mar 2010
Eugen Podsypalnikov
szh121 wrote:There is a class inherits from CPropertySheetImplWhy not from CPropertySheet ? :)
Please Sign up or sign in to vote.
2 Apr 2010
Alain Rist
See the doc for PropertySheet Function[^], and notice:For modal property sheets, the return value is as follows: >=1 Changes were saved by the user. 0 No changes were saved by the user. -1 An error occurred To retrieve extended error information, call GetLastError.cheers,AR
Please Sign up or sign in to vote.
17 Apr 2010
Shaffiq
I need to create a Main window container which contain flash control. Main window should be chromeless. It needs to show only activex flash control.Thanking you for solutions
Please Sign up or sign in to vote.
27 May 2010
Anu Koshy
strcpy(q,p); works fine.but if(strlen(p)>500)then strncpy(q, p, 499);q[500-1] = '\0';q has to be terminated with '\0'
Please Sign up or sign in to vote.
28 May 2010
tsh185
const char * p= "ddddd"; char q[500]; memset(q,0,500) ; size_t plen = strlen(p) ; strncpy(q,p,plen); cout
Please Sign up or sign in to vote.
23 Jun 2010
Emilio Garavaglia
What you did is correct: for every lock there is an unlock.Multiple locks simply result in multiple increments of the thread lock count. That are compensate by multiple decrements in unlock.Your code is simply avoiding Fun1 and Fun2 to be used simultaneously by different threads.Even in...
Please Sign up or sign in to vote.
24 Jun 2010
ravichavan
nothing second time also try to lock critical section.
Please Sign up or sign in to vote.
26 Jun 2010
Tangwang
When i draw listview i encountered a problem. I have a class derived from wtl CListViewCtrl and I am doing all paint by myself. when select item, the selected item's background Highlight and other normal. All item is fine except the first item. I find the problem is when mouse...
Please Sign up or sign in to vote.
13 Jul 2010
henry_sea
1 alternative  
I am working in a new company. Now I should use WTL to finish my work.In the past years , I didn't know what is WTL , I only use the MFC to solve my problems. Now , Who can help me to find a way to study the WTL quickly ? What should I do ?
Please Sign up or sign in to vote.
13 Jul 2010
Sandeep Mewara
Well, GOOGLE [^]would be a good start...First link: WTL for MFC Programmers, Part I - ATL GUI Classes[^]Apart from books, online tutorials and articles should help you out.
Please Sign up or sign in to vote.
3 Aug 2010
Jörgen Sigvardsson
You will have to implement much of the boiler plate code yourself I'm afraid. This[^] is a good starting point. Prepare yourself to fight use COM. :)
Please Sign up or sign in to vote.
4 Aug 2010
bleedingfingers
To add to what others said, try this with and without the printf(...) within the ChangeData(...)void ChangeData(int **p){ int g = 100; *p = &g; printf("changed to %d\n", **p);}void main(){ int *q; ChangeData(&q); printf("changed to %d\n",...
Please Sign up or sign in to vote.
8 Sep 2010
olivier gg
Hi,thanks a lot for the informations.Best regards,Olivier.
Please Sign up or sign in to vote.
9 Sep 2010
DragonII78
Hi Michael, I want to use MFC class,CList,in my WTL project, but when I include AFXTempl.h, VC++ 6.0 also prompt that CList is an undeclared identifier. Can you tell me how to solve this problem.Thanks so much!
Please Sign up or sign in to vote.
16 Oct 2010
Ajay Vijayvargiya
Perform Code Analysis with your code with /analyze switch with your Visual C++ compiler. You need to have Team System or the Ultimate version to do that.
Please Sign up or sign in to vote.
29 Dec 2010
mbue
Use COM and you have to export only one function like DllGetClassObject to connect to all your interfaces.
Please Sign up or sign in to vote.
10 Jan 2011
#realJSOP
Have you tried google ("wtl propertysheet")? The first link (after a reference to your question here) is this CodeProject article:WTL for MFC Programmers, Part VIII - Property Sheets and Wizards[^]
Please Sign up or sign in to vote.
19 Jan 2011
anonymous1310
4 alternatives  
Hi, I have a dialog based application in which when i move cursor over one widget a description about that is shown by me but when i move the cursor from that widget quickly outside the window the description just get stuck ,means that the OnMouseMove() function does not get called,I tried...
Please Sign up or sign in to vote.
19 Jan 2011
Sergey Alexandrovich Kryukov
This is possible.I don't think your event is missing. You simply process the event too slowly, so when next hardware interrupts from mouse happen, your application is still hanging in handling the event triggered by some earlier hardware interrupt -- pretty usual thing.You cannot avoid...
Please Sign up or sign in to vote.
3 Feb 2011
DEGROUX
Comment out this line in the PreCreateWindow of your CFrameWnd derived class //cs.lpszClass = AfxRegisterWndClass(0);Michel Degroux
Please Sign up or sign in to vote.
1 Mar 2011
shindesagar
1 alternative  
Hi,I used ListView to display items with CheckBox.My problem is I want to display the scrollbar vertically. By default it shows horizontal scrollbar, I want it displayed verticaly.Can any one suggest to do it?I set view property List.Thank you.
Please Sign up or sign in to vote.
1 Mar 2011
Yusuf
See this CP article : Owner Drawn ListViews In WTL[^]
Please Sign up or sign in to vote.
11 Apr 2011
Debojyoti Majumder
In your project settings, check your "Additional Dependency".I guess you are missing some .lib files there ( refer to old project settings.)
Please Sign up or sign in to vote.
25 May 2011
bartello
1 alternative  
Hi all!I have a button, clicking on which displays the popup WTL::CMenu.The width of menu is automatically changed based on the width of the longest menu item. But if the largest item's (in menu drop-down list) width is smaller than button's width the menu looks ugly.So I'd like...
Please Sign up or sign in to vote.
28 May 2011
Alain Rist
Hi,The simplest way to achieve your goal is to add a tab or some spaces at the end of your shortest menu item.Otherwise you can use an Owner-Drawn menu item; the menu owner window should derive from WTL::COwnerDraw. The WTL::CMenuT and WTL::CMenuItemInfo classes in atluser.h can help...
Please Sign up or sign in to vote.
24 Jun 2011
lokoArt
1 alternative  
Hello.I'm use Richedit50 and class WTL::CRichEdit.I'm want add rtf text to richedit.ATL::CString strText = _T("{\\rtf {\\field{\\*\\fldinst HYPERLINK \"http://vk.com/\"}{\\fldrslt Click me!}}}");m_cRichEdit.SetTextEx(strText, ST_DEFAULT, CP_UTF8);This is code added text "{\rtf...
Please Sign up or sign in to vote.
29 Jun 2011
anonymous1310
1 alternative  
Hi. I have a dynamic URL (e.g. http://www.xyz.com/a?bcdefghijk) that redirects to a specific image file (http://www.xyz.com/images/1.gif ORhttp://www.xyz.com/images/2.gif) under certain circumstances. Doesanyone have any ideas how I can get that final image filename ?Thanks in advance.
Please Sign up or sign in to vote.
29 Jun 2011
donay
I think this Will help you.String Pathtext = "http://www.xyz.com/images/1.gif";String Filename = System.IO.Path.GetFileName(Pathtext);
Please Sign up or sign in to vote.
6 Aug 2011
mj0008
{\rtf {\field{\*\fldinst HYPERLINK "http://vk.com/"}{\fldrslt Click me!}}}
Please Sign up or sign in to vote.
7 Sep 2011
Arun Parthasarathy
Plesase go to the Tools->Options menu.Options dialog opens.Choose projects and solutions.Choose VC++ directories.In "show directories for : ", choose "Include Files".Here add the directory path where your file exits.and give ok.Now try to build your project.
Please Sign up or sign in to vote.
4 Nov 2011
naaryan
1 alternative  
Hi All,As I am using shellexecute function to open one feedback form in the default browser and it work fine but the issue, when we un-install our application from add removed program. "add removed program" windows hanged until feedback form is closed because add removed program wait for all...
Please Sign up or sign in to vote.
4 Nov 2011
Richard MacCutchan
See here[^].
Please Sign up or sign in to vote.
19 Dec 2011
Chuck O'Toole
Just because the API definition of select() takes its timeout value in microseconds, that doesn't mean that every operating system that supports the Socket API has to provide microsecond resultion on their timers. In fact, almost no operating system does.As Rajesh said, Windows (Unix,...
Please Sign up or sign in to vote.
13 Jan 2012
perry.p
U can add minimize/maximize button on top of the dialog box from the property of the dialog box.
Please Sign up or sign in to vote.
30 Jan 2012
Yuri Granovsky
How to implement flat combobox on the toolbar for IE using WTL ?
Please Sign up or sign in to vote.
19 Apr 2012
mrbll
2 alternatives  
I have a library function (that does not know anything about the application its linked to) that sometimes opens a window.If the application's main window is closed while the library window is open, the process gets into a weird state that wont exit, even after the library function widow is...
Please Sign up or sign in to vote.
18 Apr 2012
nv3
You can use the system call EnumWindows to find all of your top-level windows. After your application has closed all its own windows, no other window should remain. If EnumWindows detects anything, then it's probably the additional window that your function has created.If you know the window...
Please Sign up or sign in to vote.
18 Apr 2012
Albert Holguin
You should be able to call AfxGetMainWnd() from the exported function and get the top-level window from the thread calling the exported function (may return NULL if there's no window associated with the thread).See...
Please Sign up or sign in to vote.
20 Apr 2012
Sergey Alexandrovich Kryukov
Please take a look at this CodeProject article:A WTL Game Loop[^].—SA
Please Sign up or sign in to vote.
22 Apr 2012
mrbll
Answer is the & operator was overloaded to return a different type.from stackoverflow.com.Also, since the & operator did not produce the address of the object, a workaround:CLASSfoo foo[1];CLOSSfoo *pfoo = foo; //since C still treats arrays as pointer to first element.
Please Sign up or sign in to vote.
22 Apr 2012
mrbll
Thanks to several people on several forums who supplied helpful answers to this and several spawned questions. The real problem as all too often was something completely different.See comments for additions needed.Gotcha #1 was & operator does not work on WTL classesGotcha #2, is never...
Please Sign up or sign in to vote.
8 Jul 2012
lin98666521
1 alternative  
hello!i have a problem.My window that don't have the style "WS_CAPTION",i want it have the shadow of aero,how can i To achieve that effect.i want to provide a picture,but this don't Support.the effect i want look like the shadow of system window,my Operating system is window...
Please Sign up or sign in to vote.
3 Aug 2012
JackDingler
My advice is to test the code yourself first, to see if it solves the problem you are addressing.I've had little need in the last decade, to do much with the ODBC layer. Using Wizard generated code such as MFC generated classes based on CRecordset, save a lot of time, and perform well enough...
Please Sign up or sign in to vote.
14 Aug 2012
eschenhe
2 alternatives  
how to choose multiple line in listview
Please Sign up or sign in to vote.
14 Aug 2012
Abhinav S
The listview has a multiselect property that you can turn on - http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.multiselect.aspx[^].
Please Sign up or sign in to vote.
14 Aug 2012
Richard MacCutchan
The default for a List View is to allow multiple selections, so unless you specifiy LVS_SINGLESEL when you create it it is already set up to do it.
Please Sign up or sign in to vote.
4 Sep 2012
Zac Gery
The Gestalt Principles are based on the observation that people actively and subconsciously organize things into patterns and objects.  These principles are organized into Proximity, Similarity, Closure, Good Continuation, Common Fate, and Good Form.  They can be applied to all avenues of life.
Please Sign up or sign in to vote.
25 Nov 2012
lin98666521
1 alternative  
hello everyone.i have a problem,i can not find the Solutions. PARAFORMAT2 pf2; ZeroMemory(&pf2, sizeof(PARAFORMAT2)); pf2.dwMask = PFM_LINESPACING; pf2.bLineSpacingRule = 4; pf2.dyLineSpacing = 300; SetSel(iBPos,iEPos); SetParaFormat(pf2);when i expand the line...
Please Sign up or sign in to vote.
28 Nov 2012
lin98666521
1 alternative  
hi,i want to change the color and size of the bullets in a richedit,and do not change the text.i do not get a effective method to do it.I found that ,i can change the font ,color and size of bullets in word,and i want to get the effect look like the word.who can help me? ...
Please Sign up or sign in to vote.
5 Dec 2012
lin98666521
i have Solve the problem by myself.i find that,the color and size of the bullets are the same to the last "\r",so i remeber the position ,and find the first "\r" from the position to set it color and...
Please Sign up or sign in to vote.
7 Jan 2013
lin98666521
hi Recently, I have a question.i want to do something when i click a ole in a richedit,but i find that i can not get the accurate position of ole.Now,one way to get the position like this.the "rcLastUpdate" is the i am using.sometimes,it is not accurate,when the ole is not...
Please Sign up or sign in to vote.
6 Feb 2013
lan yuan
1 alternative  
The start reason is that I want to change a WTL exe project to dll project so that I could use it as plugin in another project. Those code worked well in the exe, but got exception in the DLL. I tracked it down, initialization is fine, when it goes to the CWindowImpl::create->...
Please Sign up or sign in to vote.
22 Feb 2013
lin98666521
i want to use the control named windowlessrechedit.i will call the function "CTxtWinHost::SetClientRect" When the window size changes,than the Caret always flickers.the code //it will be called,When the window size changes.//OnSize will call it.void CxRichEdit::CxSetRect(RECT...
Please Sign up or sign in to vote.
26 Feb 2013
lin98666521
hi,My English is not good, if the problem can not be Bunderstood please reply to me.I ran into a problem.I insert a picture into my richedit,than Scroll bars are displayed.I move the scroll bar until Image the lower half of the display,than i call the function...
Please Sign up or sign in to vote.
6 Mar 2013
lan yuan
This problem has been solved, the reason is No call to InitializeCriticalSection(...);for I used the loadlibrary(*.dll),which leave the global variables(_AtlWinModule,_AtlBaseModule,_AtlComModule which is used by ATL components later) uninitialized. So in this situation, Adding _CRT_INIT to the...
Please Sign up or sign in to vote.
11 Mar 2013
MCGRADYV5
1 alternative  
There are many errors when I compile those programs with VC6.0, the article that the author writes is "WTL for MFC Programmers"?
Please Sign up or sign in to vote.
11 Mar 2013
Manfred Rudolf Bihy
Well I don't know which article you read, but I just skimmed over the beginning of part one in his series and found this:This is the stuff I want you to read first, before proceeding on or posting messages to this article's discussion board.This series of articles originally covered WTL...
Please Sign up or sign in to vote.
7 Apr 2013
MCGRADYV5
void CMyListBox::MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct) {CDC* pDC = GetDC();}error C2440: 'initializing' : cannot convert from 'struct HDC__ *' to 'class WTL::CDCT *'I write this code in VC6.0, how to get the dc of a control?
Please Sign up or sign in to vote.
7 Apr 2013
Member 9972250
dear: How Can I make the subWindows fullfill the whole Client area of the mainWindow,even if the subWindow was draged to another position to dock . ..? waiting for your respose! thank you! (my english is poor,so beg for your pardon if their exist something wrong words.) (I...
Please Sign up or sign in to vote.
8 Apr 2013
MCGRADYV5
1 alternative  
class CMyListBox : public CWindowImpl, public COwnerDraw{public: BEGIN_MSG_MAP(CMyListBox) MSG_WM_MOUSEMOVE(OnMouseMove) CHAIN_MSG_MAP_ALT(COwnerDraw, 1) DEFAULT_REFLECTION_HANDLER() ...
Please Sign up or sign in to vote.
8 Apr 2013
Kumar Anitesh
I think you have missed the message mapping for OnTimer() function.In BEGIN_MSG_MAP section please add "MSG_WM_TIMER(OnTimer)", and try if it is working.
Please Sign up or sign in to vote.
1 May 2013
Style-7
see:WTL for MFC Programmers, Part I - ATL GUI Classes[^]
Please Sign up or sign in to vote.
1 May 2013
Richard MacCutchan
Your question is really far from clear, but perhaps you are talking about WM_USER[^].
Please Sign up or sign in to vote.
7 May 2013
S Leistikow
Four tier IOC application.
Please Sign up or sign in to vote.
23 Jul 2013
KarstenK
look at this WTL for MFC Programmers, Part IX - GDI Classes, Common Dialogs, and Utility Classes[^]For a preview print in a menory DC and bitblt to an window in onpaint.
Please Sign up or sign in to vote.
31 Jul 2013
KarstenK
consider asking at the right place: http://sourceforge.net/projects/wtl/[^]you can try to switch the UAC off for testing.
Please Sign up or sign in to vote.
2 Sep 2013
lin98666521
I am making a atl control in which I can show image in richedit. To support copy & paste I implemented :public IPersistStreamInitImpl,public IPersistStorageImpland overrideHRESULT IPersistStreamInit_Load(LPSTREAM pStm, const ATL_PROPMAP_ENTRY* pMap);HRESULT...
Please Sign up or sign in to vote.
16 Jan 2014
Singh, Yashpal
1 alternative  
Hi,I design a custom TreeView control that wraps the text string of a tree item when the tree is resized, and to achieve that I draw the tree items in OnPaint() handler, I use CDC::DrawText() to draw the text strings and CDC::FillRect() on the same rectangle to draw a selected tree item. In...
Please Sign up or sign in to vote.
16 Jan 2014
Richard MacCutchan
See the remarks section under CDC::Rectangle[^], particularly The interior of the rectangle is filled using the current brush.. So you need to add the text as the very last action.
Please Sign up or sign in to vote.
1 May 2014
Singh, Yashpal
1 alternative  
Hi,I am working on an help viewer kinda app that is developed and maintained using ATL/ WTL library. The application uses some help content in form of XHTML pages that is installed separately in the system independent of the help viewer itself. Now we are planning to put the content on some...
Please Sign up or sign in to vote.
6 May 2014
KarstenK
An easy way is using URLDownloadToFile.At the first step download an info-file into the Temp and check for the update and proceed if an update is available. Dont ferget to delete the downloaded files after you are done. ;-)
Please Sign up or sign in to vote.
4 Jul 2014
dverma05
2 alternatives  
I am creating a listview control using WTL as belowhwnd = CWindowImpl::Create(0, rcDefault, _T("Parameters"), WS_VISIBLE|LVS_REPORT|LVS_SHOWSELALWAYS|TVS_TRACKSELECT, WS_EX_TOOLWINDOW);Background: I am having one MFC executable application containing...
Please Sign up or sign in to vote.
4 Jul 2014
Richard MacCutchan
The style tag TVS_TRACKSELECT is 0x0200 which equates to LVS_EX_REGIONAL as described in http://msdn.microsoft.com/en-gb/library/windows/desktop/bb774732(v=vs.85).aspx[^].
Please Sign up or sign in to vote.
4 Jul 2014
dverma05
Thanks Richard for your solution. But I have tried all the possible combination one by one. Even I have tried creating this listview only with LVS_REPORT and this was also failing.
Please Sign up or sign in to vote.
8 Apr 2015
RajaPratap
I got stuck with an issue in property sheet .I want to load different cursor when the mouse position is within the client area and load another when moves out of the client area.In the porpetysheet I added four page. In the first page when I click next I am loading cursor of IDC_WAIT type...
Please Sign up or sign in to vote.
8 Feb 2006
Michael Dunn
A tutorial on using GDI and common dialogs in WTL.
Please Sign up or sign in to vote.
21 Apr 2004
Armen Hakobyan
Using SQL-DMO to shrink SQL Server transaction logs.
Please Sign up or sign in to vote.
20 Apr 2005
mark novak
A psychological journey into a project crafted from start to finish.
Please Sign up or sign in to vote.
4 Nov 2002
Rob Caldecott
A small template allowing you to easily add system tray icon support to your WTL application