Click here to Skip to main content
15,886,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp on GetAsyncKeyState(...) Pin
Uday Janaswamy11-Jul-06 21:50
Uday Janaswamy11-Jul-06 21:50 
AnswerRe: Help on GetAsyncKeyState(...) Pin
Hamid_RT11-Jul-06 22:19
Hamid_RT11-Jul-06 22:19 
GeneralRe: Help on GetAsyncKeyState(...) Pin
Uday Janaswamy11-Jul-06 23:19
Uday Janaswamy11-Jul-06 23:19 
GeneralRe: Help on GetAsyncKeyState(...) Pin
FarPointer12-Jul-06 0:08
FarPointer12-Jul-06 0:08 
GeneralRe: Help on GetAsyncKeyState(...) Pin
Hamid_RT12-Jul-06 0:59
Hamid_RT12-Jul-06 0:59 
AnswerRe: Help on GetAsyncKeyState(...) Pin
see me11-Jul-06 22:29
see me11-Jul-06 22:29 
QuestionObtaining USB flash IDs Pin
Sonic_amiga11-Jul-06 21:32
Sonic_amiga11-Jul-06 21:32 
QuestionCombineRgn for 4 regions [modified] Pin
hell_admin11-Jul-06 21:28
hell_admin11-Jul-06 21:28 
Hello,
could someone help me to solve this problem
i have four regions and i need t make a window consisting of two rectangles pixels width one inside another , like

<p><br />
_______________<br />
| A            |<br />
|  ----------- |<br />
|  |B  ----  | |<br />
|  |   | C | | |<br />
|  |   ----  | |<br />
|  |_________| |<br />
----------------<br />
</p>

A - first recangle
B - A hole in the window
C - is a second rectangle
it also must be a D - area inside C but it is to complicated to show it here

i use this code:
[CODE:]
h = CreateWindow("Highliter","", WS_VISIBLE, 10, 10, 200, 200, NULL, NULL, hInstance,NULL);

HRGN r3 = CreateRectRgn(0,0, 0, 0);
HRGN r4 = CreateRectRgn(0,0, 0, 0);
HRGN r1 = CreateRectRgn(0,0, 200, 200);
HRGN r2 = CreateRectRgn(12,12,198,198);
CombineRgn(r1,r1,r2,RGN_XOR);
int res = CombineRgn(r3,r3,r1,RGN_OR);

SetWindowRgn(h,r3,true);
MessageBox(NULL,"After First Region","",MB_OK);

r1 = CreateRectRgn(20,20, 150, 150);
r2= CreateRectRgn(25,25,130,130);
CombineRgn(r1,r1,r2,RGN_XOR);

res = CombineRgn(r4,r3,r1,RGN_OR);
SetWindowRgn(h,r4,true);
MessageBox(NULL,"After Second Region","",MB_OK);

[/CODE]

res returned second time is ERROR, i dont understand why?






-- modified at 3:32 Wednesday 12th July, 2006
QuestionRe: CombineRgn for 4 regions Pin
Hamid_RT11-Jul-06 22:09
Hamid_RT11-Jul-06 22:09 
AnswerRe: CombineRgn for 4 regions Pin
hell_admin11-Jul-06 22:20
hell_admin11-Jul-06 22:20 
GeneralRe: CombineRgn for 4 regions Pin
Hamid_RT11-Jul-06 22:52
Hamid_RT11-Jul-06 22:52 
Questionhelp in threads Pin
Nirmal Khatri11-Jul-06 21:17
Nirmal Khatri11-Jul-06 21:17 
AnswerRe: help in threads Pin
Abhi Lahare11-Jul-06 21:35
Abhi Lahare11-Jul-06 21:35 
AnswerRe: help in threads Pin
Hamid_RT11-Jul-06 22:01
Hamid_RT11-Jul-06 22:01 
Questiondocumentation Pin
MozhdehQeraati11-Jul-06 20:39
MozhdehQeraati11-Jul-06 20:39 
AnswerRe: documentation Pin
eusto11-Jul-06 21:29
eusto11-Jul-06 21:29 
QuestionSHGetSpecialFolderLocation Pin
Maxime Labelle11-Jul-06 20:32
Maxime Labelle11-Jul-06 20:32 
AnswerRe: SHGetSpecialFolderLocation Pin
Don Box11-Jul-06 21:23
Don Box11-Jul-06 21:23 
GeneralRe: SHGetSpecialFolderLocation Pin
Maxime Labelle11-Jul-06 21:54
Maxime Labelle11-Jul-06 21:54 
AnswerRe: SHGetSpecialFolderLocation Pin
Jonas Hammarberg11-Jul-06 21:29
professionalJonas Hammarberg11-Jul-06 21:29 
GeneralRe: SHGetSpecialFolderLocation Pin
Maxime Labelle11-Jul-06 21:53
Maxime Labelle11-Jul-06 21:53 
GeneralRe: SHGetSpecialFolderLocation [modified] Pin
Jonas Hammarberg11-Jul-06 22:20
professionalJonas Hammarberg11-Jul-06 22:20 
GeneralRe: SHGetSpecialFolderLocation Pin
Maxime Labelle12-Jul-06 3:36
Maxime Labelle12-Jul-06 3:36 
QuestionDifficult to understand PrintPreview without Doc/View Pin
mikobi11-Jul-06 20:15
mikobi11-Jul-06 20:15 
QuestionSELECT * FROM - Tablename which has spaces Pin
Tara1411-Jul-06 20:09
Tara1411-Jul-06 20:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.