16,012,015 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by JOHN 602 (Top 29 by date)
JOHN 602
10-Oct-12 22:02pm
View
In that articles people say that There is no way to interact directly with the controls on the ribbon( I mean there is no way to change it's state).
But a reasonable question comes to my mind: Why is there an edit control if I can't change text in it ?? It's looks like foolishly.
I deem I've tried all the ways I found to get access to the ribbon control
CString pBoxOne;
GetParentFrame()->GetDlgItemText(ID_CR_EDIT,pBoxOne);//no use
What else I should try? I don't believe that there is no way to overcome this obstacle.
JOHN 602
10-Oct-12 21:29pm
View
Ive found that window class is Afx:RibbonBar:1370000:8:10003:10
If I try do
HWND hTray;
hTray = ::FindWindow(L"Afx:RibbonBar:1360000:8:10003:10", NULL);
if(hTray)
{
::SetDlgItemText(hTray,ID_CR_EDIT,L"mn,m");
}
hTray returns NULL;
JOHN 602
10-Oct-12 20:36pm
View
::SetDlgItemText(GetParent()->GetSafeHwnd(),ID_CR_EDIT,L"adasdaasd");
and ID_CR_EDIT is the same as it set in properties and of course it defined in Resource.h as #define ID_CR_EDIT 32784
Then I preset the text in properties window and try to read at runtime
CEdit* pBoxOne;
pBoxOne = (CEdit*) GetDlgItem(ID_CR_EDIT); in debug mode I see that is NULL
It returns NULL 'cause the prog begin searching the Edit control in same window. But what class handles Edit if it's on the ribbon panel. Looks like I should call it if I directly set the right class
I confused with all that It seems the simplest thing, but WTF ?
JOHN 602
9-Oct-12 13:54pm
View
yeah exactly
owing to my efforts to optimization I ain't see some evident things
tnx
JOHN 602
9-Oct-12 13:36pm
View
Do I need use ValidateRect() every time I need to redraw the window? Maybe there is another way once fix it and than sometime unfix it ? (in may way unfix picture when I need to load a new image)
JOHN 602
9-Oct-12 7:50am
View
Only I want to fix the area where the image is. If I do it therefore no flicker won't occur.
JOHN 602
9-Oct-12 7:46am
View
Don't you see that this code
pDC->BitBlt(0, 0, cImg.GetWidth(), cImg.GetHeight(), &memDC, 0, 0, SRCCOPY);
is the approach to realization of so-called double-buffering? (Or maybe am I wrong ?)
And why do you offer me a solution for .NET. As you can see I use Native C++( +MFC). That solution where a half of work is done by CLR.
JOHN 602
8-Oct-12 19:39pm
View
Where Does The World Go, ha ?
JOHN 602
7-Oct-12 9:20am
View
Oh dude thanks a lot. I've been thinking that I'd never find the way how to do it.
О,чувак, спасибо. А то я думал никогда уже с этой шнягой не разберусь.
JOHN 602
3-Oct-12 14:13pm
View
I've solved the problem. The theme is closed.
The main impediment was with the receiving the right context.
Several hours debugging led me to the working code. hurray! :)
JOHN 602
2-Oct-12 16:45pm
View
Hey bro
I be quite honest with you didn't go into the heart of you code. But as I know one of the proved method to communicate between the processes - using Pipes.
JOHN 602
2-Oct-12 16:39pm
View
It looks like that if smb don't want do smth by him/herself and first of all go and post it on the site. Maybe there is a simpleton who will scribble the answer.
Your question it is just a nonsense.You may found how to operate with the arrays, I bet, on the first 50 pages of any book related to C#
JOHN 602
2-Oct-12 14:51pm
View
Isn't possible to run some operation in a separate thread in GUI?
Are you kidding? Maybe I misunderstood you.
But the simplest example is push the button->create new thread->run a procedure in a single thread
JOHN 602
2-Oct-12 14:42pm
View
Where did you see that C++ isn't suitable for multi-threading. C++ is a powerful tool in skillful hands. But it demands some more diligence and knowledge.
OpenMP,MPI,CILK++ and others shows a greater performance than similar approaches on C# or smth else.
But of course,as I mentioned before, GUI Programming with C++ a little more complex than simple drugging controls with Form Designer(but MFC offers you do it as well,about Qt i have no info)
Look this, maybe it will useful for you
http://en.wikipedia.org/wiki/Intel_Threading_Building_Blocks
JOHN 602
2-Oct-12 10:30am
View
Of course you can,as freelancer for instance.
I don't know in what sphere you specialize in.
But If I were a potential employer, I'd like to be confident in your professional skills before giving you a real task to do.
If you have some certificates (like MCT,MCSD (from Microsoft) or others) it is a great plus for you and guarantee that you smth know
JOHN 602
30-Sep-12 13:12pm
View
Oh.. finally It works how it should do.
Somehow, msvcr100d.dll was lost in System32.(maybe I've made a hash of similar looking msvcP100d.dll)
After I copied it there,the Debug mode works properly.
Thanks guys for your support.
JOHN 602
30-Sep-12 11:28am
View
I know about Cmake and I've already made an attempt and got a heap of errors during the compiling process. This way will be the last in my solutions list.
JOHN 602
30-Sep-12 11:09am
View
Oh,Sergey, your suggestion about this extension has really helped me. As I see you are an expert without any doubts.
But I after extension installation, my code works fine only with Release mode. When i switch to Debug, VS again requires this "MSVCR100D.dll". Of course It is possible to work in Release, but I'm sure there is a way to do normally, is it? And thank you for your reply.
JOHN 602
18-Sep-12 17:46pm
View
Just set libs extensions properly
Now in In Linker->Input in field "Addition Dependencies" :
ws2_32.lib;CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_bzlib_xt_.lib;CORE_DB_coders_.lib;CORE_DB_filters_xt_.lib;CORE_DB_jbig_xt_.lib;CORE_DB_jp2_xt_.lib;CORE_DB_jpeg_xt_.lib;CORE_DB_lcms_xt_.lib;CORE_DB_libxml_xt_.lib;CORE_DB_png_xt_.lib;CORE_DB_tiff_xt_.lib;CORE_DB_ttf_xt_.lib;CORE_DB_wand_xt_.lib;CORE_DB_wmf_xt_.lib;CORE_DB_xlib_xt_.lib;CORE_DB_zlib_xt_.lib ;%(AdditionalDependencies)
After compiling I got LNK1104: cannot open file 'CORE_DB_bzlib_xt_.lib' WTF ??
JOHN 602
18-Sep-12 17:30pm
View
Yeah man. You know smth has changed. I excluded %USERPROFILE%\ from "Additional Library Directories".Started program and got "Missing CORE_RL_bzlib_lib". I exclude all CORE_RL_-libs from "Addition Dependencies" because they initially are absent in Magick++ due to I built it from binaries and checked "For multithreading static libs" instead of just for single thread(Don't remember how checkbox was called).
Instead of CORE_RL_bzlib_lib in assembled Magik++ exist CORE_bzlib_xt_lib and this ain't important.(Of course I need to add coorect name of.lib with "_xt_").
But now I got errors like:
error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl Magick::InitializeMagick(char const *)" (__imp_?InitializeMagick@Magick@@YAXPBD@Z) referenced in function _main
error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (__imp_??0Image@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main
Before writing this, I've checked smth info this errors type... Nothing useful
JOHN 602
18-Sep-12 15:15pm
View
Wes Aday, nice answer ahah
JOHN 602
18-Sep-12 15:03pm
View
As much as I know you may reject using Designer and try to write the code describing your Control (your label for instance).
Did you try directly set need properties to the LAbel?
If it won't help, then the problem is someone else. If I have smth like this, I will try coding without Designer
JOHN 602
18-Sep-12 14:42pm
View
Of course I did
See:
Project->"MyProject" Properties->Configuration Properties->
than in VC++ Directories :
in field "Include directories" I set
"C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9;C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\VisualMagick\lib;C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\Magick++\lib;$(IncludePath)"
in field "Library directorie" i set:
C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\Magick++\lib;$(LibraryPath)
Than in Linker(tab)->General in field "Additional Library Directories" I set
%USERPROFILE%\C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\VisualMagick\lib;%USERPROFILE%\C:\Users\Administrator\Desktop\New folder\ImageMagick\libxml\win32\dsp\libxml2;%(AdditionalLibraryDirectories)
In Linker->Input in field "Addition Dependencies" i set
ws2_32.lib;CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_bzlib_.lib;CORE_DB_coders_.lib;CORE_DB_filters_.lib;CORE_DB_jbig_.lib;CORE_DB_jp2_.lib;CORE_DB_jpeg_.lib;CORE_DB_lcms_.lib;CORE_DB_libxml_.lib;CORE_DB_png_.lib;CORE_DB_tiff_.lib;CORE_DB_ttf_.lib;CORE_DB_wand_.lib;CORE_DB_wmf_.lib;CORE_DB_xlib_.lib;CORE_DB_zlib_.lib;CORE_RL_bzlib_.lib;CORE_RL_coders_.lib;CORE_RL_filters_.lib;CORE_RL_jbig_.lib;CORE_RL_jp2_.lib;CORE_RL_jpeg_.lib;CORE_RL_lcms_.lib;CORE_RL_libxml_.lib;CORE_RL_magick_.lib;CORE_RL_Magick++_.lib;CORE_RL_png_.lib;CORE_RL_tiff_.lib;CORE_RL_ttf_.lib;CORE_RL_wand_.lib;CORE_RL_wmf_.lib;CORE_RL_xlib_.lib;CORE_RL_zlib_.lib;%(AdditionalDependencies)
Than in filed "Add module to assembly" I set
CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_wand_.lib;X11.lib;%(AddModuleNamesToAssembly)
JOHN 602
13-May-12 5:42am
View
jkirkerx all is OK. I've improved my code.But the loaded icons looks somehow wrong(washed pictures). Seems like I've done all steps correctly(load icons in Resource-file:Add->Source->Import->then I selected all the icons and inserted them). I can't get it where is the mistake.Have any ideas ?
JOHN 602
13-May-12 5:22am
View
THANX for you answer I very appreciate you for your attention////
I've already tried your code... it helps me
JOHN 602
13-May-12 3:19am
View
Here is the listview code(in separate file):
<pre>
hFileListView=CreateWindow(WC_LISTVIEW,
NULL,
WS_CHILD | WS_VISIBLE | LVS_REPORT|WS_HSCROLL|WS_BORDER|WS_VSCROLL
| ES_AUTOHSCROLL | ES_AUTOVSCROLL,
150,
70,
630,
220,
hWnd,
(HMENU) 500,
hInst,
NULL);
lvc.mask = LVCF_TEXT | LVCF_SUBITEM | LVCF_WIDTH | LVCF_FMT;
lvc.fmt = LVCFMT_LEFT;
//Name
lvc.iSubItem = 0;
lvc.cx = 280;
lvc.pszText = TEXT("Name");
ListView_InsertColumn(hFileListView, 0, &lvc);
//Data Modified
lvc.iSubItem = 1;
lvc.cx = 150;
lvc.pszText = TEXT("Data Modified");
ListView_InsertColumn(hFileListView, 1, &lvc);
//Type
lvc.iSubItem = 2;
lvc.cx = 100;
lvc.pszText = TEXT("Type");
ListView_InsertColumn(hFileListView, 2, &lvc);
//Size
lvc.iSubItem = 3;
lvc.cx = 100;
lvc.pszText = TEXT("Size");
ListView_InsertColumn(hFileListView, 3, &lvc);
</pre>
How to bind listview handle with that class defined above.(I mean send it as a parameter in callback function).
JOHN 602
9-May-12 9:02am
View
Thanx you very much. Your great experience saved me. Now all work good.
JOHN 602
9-May-12 7:19am
View
You were right about return value of LoadIcon(). It returns NULL.
I'm not an expert in Win32 and I'm sorry that I spent your time.
But where is the mistake. Icons are in project folder.Maybe smth wrong with path/
JOHN 602
9-May-12 6:57am
View
I have added your code,but icons are still concealed. What I do wrong ???
Maybe the problem in icons path/
I placed icons in project folder.
Show More