Type: Posts; User: LarryChen
Search took 0.07 seconds.
February 11th, 2015, 09:58 PM
According to the definition of clustered index, a clustered index is a special type of index that reorders the way records in the table are physically stored. It seems clustered index reorders...
February 2nd, 2015, 01:08 PM
Actually the tough part is that I can't access message processing in main window. As the result, in order to process WM_PAINT for child window, I have to process it in another thread. Since child...
February 2nd, 2015, 11:56 AM
Yes, my child window IS a modeless dialog. What do you mean "your child window messages even being processed in other thread"? What is exactly "other thread" here? Basically I have two threads. One...
January 30th, 2015, 05:26 PM
If child window messages are processed in the main thread, it will block parent window messages. As the result, parent window will hang there. Thanks.
January 30th, 2015, 05:06 PM
Because parent window belongs to the main thread and for some reasons I can't access the parent window message processing. So in order to process child window message, I have to have sub thread to...
January 30th, 2015, 04:16 PM
Ok, I have a parent window and a child window. The parent window belongs to the main thread and the child window belongs to a sub thread. The window messages in topic are processed in the sub...
January 30th, 2015, 03:31 PM
May I ask why window message processing should be performed in the main UI thread? What kind of problems I might run into if I choose not to process messages in main thread? Thanks
January 30th, 2015, 02:09 PM
Basically window message processing is put in another thread. So if I put the drawing job(for example, TextOut) in WM_PAINT, the main thread won't be very responsive since WM_PAINT is processed very...
January 30th, 2015, 02:00 PM
I thought I already explained to you... Yes, initially I thought I can make use of WM_INITDIALOG or WM_SHOWWINDOW to draw text and then I realized that is not the way to go. I already forget the...
January 30th, 2015, 01:24 PM
Check this out. https://msdn.microsoft.com/en-us/library/windows/desktop/dd162492(v=vs.85).aspx
I just don't know exactly how to do that. Any ideas? Thanks.
January 30th, 2015, 01:03 PM
Basically the documents say that both WM_INITDIALOG and WM_SHOWWINDOW are processed before WM_PAINT, so TextOut within either WM_INITDIALOG or WM_SHOWWINDOW won't do anything. But my questions IS...
January 30th, 2015, 12:31 PM
Did you mean that since WM_PAINT is processed after, then whatever is done within WM_INITDIALOG or WM_SHOWWINDOW will be erased because WM_PAINT does nothing? If that is the case, is it still...
January 30th, 2015, 12:07 PM
I call TextOut within WM_PAINT and it works. But if I call TextOut within WM_INITDIALOG or WM_SHOWWINDOW, it doesn't work. Here is the code,
HDC hdc =...
January 16th, 2015, 05:24 PM
It turns out the first argument of CreateDialog wasn't set up properly. Now I am able to create the dialog. But modeless dialog is not a solution. Basically in order to display the dialog all the...
January 16th, 2015, 01:01 PM
Yes. Is there other things I should be aware of? Thanks.
January 16th, 2015, 09:58 AM
Thanks for your replies. I think the problem is that when I called CreateDialog, it returns NULL handle because of the error ERROR_RESOURCE_TYPE_NOT_FOUND. I already included the dialog template in...
January 15th, 2015, 04:50 PM
Ok, I created a modoless dialog,
HWND g_hDlg = NULL;
g_hDlg = CreateDialogA(NULL, MAKEINTRESOURCEA(IDD_MYDLG), NULL, (DLGPROC)DlgProc);
DWORD ret = GetLastError();
January 14th, 2015, 05:05 PM
This is a typical way to create a window,
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
January 6th, 2015, 02:05 PM
Even I return TRUE in processing WM_ERASEBKGND, it still doesn't work. The window looks transparent but I expect it to be red. What went wrong? Thanks.
January 6th, 2015, 01:51 PM
SO I changed the code,
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
January 6th, 2015, 01:29 PM
Now I created my own custom window and then within window procedure I tried to process the window message WM_ERASEBKGND, here is the code,
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg,...
January 5th, 2015, 03:59 PM
Yes, it succeeds. Actually I can make use of the callback function CallWndRetProc to change the position of the dialog but I can't change the color of the dialog within the same callback function...
January 5th, 2015, 03:57 PM
The call to SetWindowHookEx and the call to the callback function CallWndRetProc are in the same process.
January 5th, 2015, 03:20 PM
Here is what I did,
oldHook = ::SetWindowsHookEx(WH_CALLWNDPROCRET, CallWndRetProc, NULL, ::GetCurrentThreadId());
Then within the...
December 29th, 2014, 09:39 PM
Here is the code,
void MergeArray(int arr, int l, int m, int r)
int* b = new int[r-1+1];
int i, j;
int index = 0;
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.